Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/heavy-cycles-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@e2b/cli': patch
---

add dependency notice to template migrate command
8 changes: 7 additions & 1 deletion packages/cli/src/commands/template/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,13 @@ export const initCommand = new commander.Command('init')
console.log(
`\nTemplate created in: ${asPrimary(`./${templateDirName}/`)}`
)
console.log('\nYou can now build your template using:')
console.log('\n🔨 To get started with your template:')

switch (language) {
case Language.TypeScript:
console.log(
` ${asPrimary('npm install e2b')} (install e2b dependency)`
)
console.log(
` ${asPrimary('npm run e2b:build:dev')} (for development)`
)
Expand All @@ -301,6 +304,9 @@ export const initCommand = new commander.Command('init')
break
case Language.PythonAsync:
case Language.PythonSync:
console.log(
` ${asPrimary('pip install e2b')} (install e2b dependency)`
)
console.log(
` ${asPrimary('make e2b:build:dev')} (for development)`
)
Expand Down
16 changes: 11 additions & 5 deletions packages/cli/src/commands/template/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,26 @@ export const migrateCommand = new commander.Command('migrate')

console.log('\n🎉 Migration completed successfully!')

console.log('\n🔨 You can now build your template using:')
console.log('\n🔨 To get started with your template:')
if (language === Language.TypeScript) {
console.log(
` ${asPrimary('npx tsx build.dev.ts')} (for development)`
` ${asPrimary('npm install e2b')} (install e2b dependency)`
)
console.log(
` ${asPrimary('npx tsx build.prod.ts')} (for production)`
` ${asPrimary('npx tsx build.dev.ts')} (run development build)`
)
console.log(
` ${asPrimary('npx tsx build.prod.ts')} (run production build)`
)
} else {
console.log(
` ${asPrimary('python build_dev.py')} (for development)`
` ${asPrimary('pip install e2b')} (install e2b dependency)`
)
console.log(
` ${asPrimary('python build_dev.py')} (run development build)`
)
console.log(
` ${asPrimary('python build_prod.py')} (for production)`
` ${asPrimary('python build_prod.py')} (run production build)`
)
}

Expand Down
10 changes: 10 additions & 0 deletions packages/cli/src/templates/readme.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ Before you begin, make sure you have:
E2B_API_KEY=your_api_key_here
```

## Installing Dependencies

```bash
{{#if isTypeScript}}
npm install e2b
{{else if isPython}}
pip install e2b
{{/if}}
```

## Building the Template

```bash
Expand Down
Loading