Skip to content

Commit f1516d5

Browse files
mishushakovclaude
andauthored
refactor(cli): remove ensureAccessToken from template create (#1400)
## Summary Removes the `ensureAccessToken()` call (and its now-unused import) from `e2b template create`. The command authenticates solely via the API key (`ensureAPIKey()`), so the access-token check was redundant. ## Changes - Drop `ensureAccessToken` import and call in `packages/cli/src/commands/template/create.ts`. - Add a patch changeset for `@e2b/cli`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6c04e31 commit f1516d5

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

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+
Remove `ensureAccessToken` call from `e2b template create`: the command now relies solely on the API key for authentication.

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as boxen from 'boxen'
22
import * as commander from 'commander'
33
import { defaultBuildLogger, Template, TemplateClass } from 'e2b'
4-
import { connectionConfig, ensureAccessToken, ensureAPIKey } from 'src/api'
4+
import { connectionConfig, ensureAPIKey } from 'src/api'
55
import {
66
defaultDockerfileName,
77
fallbackDockerfileName,
@@ -68,8 +68,6 @@ export const createCommand = new commander.Command('create')
6868
}
6969
) => {
7070
try {
71-
// Ensure we have access token
72-
ensureAccessToken()
7371
process.stdout.write('\n')
7472

7573
// Validate template name

0 commit comments

Comments
 (0)