Skip to content

Commit b65f190

Browse files
authored
Add dependency notice to migrate command (#995)
Current instructions would fail unless e2b was already installed <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Add `e2b` install instructions to template init/migrate outputs and README, with minor wording tweaks and a patch changeset. > > - **CLI (templates)**: > - Update `template init` and `template migrate` post-run output to include installing `e2b` (`npm install e2b` or `pip install e2b`). > - Reword headings to “To get started with your template” and clarify build command labels (run dev/prod build). > - **Docs/Templates**: > - Add “Installing Dependencies” section to `packages/cli/src/templates/readme.hbs` with language-specific `e2b` install instructions. > - **Release**: > - Add patch changeset for `@e2b/cli`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 68d3093. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 17d6e63 commit b65f190

File tree

4 files changed

+33
-6
lines changed

4 files changed

+33
-6
lines changed

.changeset/heavy-cycles-joke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/cli': patch
3+
---
4+
5+
add dependency notice to template migrate command

packages/cli/src/commands/template/init.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,13 @@ export const initCommand = new commander.Command('init')
288288
console.log(
289289
`\nTemplate created in: ${asPrimary(`./${templateDirName}/`)}`
290290
)
291-
console.log('\nYou can now build your template using:')
291+
console.log('\n🔨 To get started with your template:')
292292

293293
switch (language) {
294294
case Language.TypeScript:
295+
console.log(
296+
` ${asPrimary('npm install e2b')} (install e2b dependency)`
297+
)
295298
console.log(
296299
` ${asPrimary('npm run e2b:build:dev')} (for development)`
297300
)
@@ -301,6 +304,9 @@ export const initCommand = new commander.Command('init')
301304
break
302305
case Language.PythonAsync:
303306
case Language.PythonSync:
307+
console.log(
308+
` ${asPrimary('pip install e2b')} (install e2b dependency)`
309+
)
304310
console.log(
305311
` ${asPrimary('make e2b:build:dev')} (for development)`
306312
)

packages/cli/src/commands/template/migrate.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,26 @@ export const migrateCommand = new commander.Command('migrate')
209209

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

212-
console.log('\n🔨 You can now build your template using:')
212+
console.log('\n🔨 To get started with your template:')
213213
if (language === Language.TypeScript) {
214214
console.log(
215-
` ${asPrimary('npx tsx build.dev.ts')} (for development)`
215+
` ${asPrimary('npm install e2b')} (install e2b dependency)`
216216
)
217217
console.log(
218-
` ${asPrimary('npx tsx build.prod.ts')} (for production)`
218+
` ${asPrimary('npx tsx build.dev.ts')} (run development build)`
219+
)
220+
console.log(
221+
` ${asPrimary('npx tsx build.prod.ts')} (run production build)`
219222
)
220223
} else {
221224
console.log(
222-
` ${asPrimary('python build_dev.py')} (for development)`
225+
` ${asPrimary('pip install e2b')} (install e2b dependency)`
226+
)
227+
console.log(
228+
` ${asPrimary('python build_dev.py')} (run development build)`
223229
)
224230
console.log(
225-
` ${asPrimary('python build_prod.py')} (for production)`
231+
` ${asPrimary('python build_prod.py')} (run production build)`
226232
)
227233
}
228234

packages/cli/src/templates/readme.hbs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ Before you begin, make sure you have:
1616
E2B_API_KEY=your_api_key_here
1717
```
1818

19+
## Installing Dependencies
20+
21+
```bash
22+
{{#if isTypeScript}}
23+
npm install e2b
24+
{{else if isPython}}
25+
pip install e2b
26+
{{/if}}
27+
```
28+
1929
## Building the Template
2030

2131
```bash

0 commit comments

Comments
 (0)