Files
e2b-dev--e2b/packages/cli
Mish Ushakov 04827ab163 chore(cli): remove dead e2b.toml write path (#1569)
## Description

The CLI no longer writes `e2b.toml` anywhere, so this removes the dead
code around it:

- `saveConfig` and its `getConfigHeader` helper in
`packages/cli/src/config/index.ts` had zero callers — removed along with
now-unused imports.
- The `team_id` field is dropped from the config schema and the unused
`localConfigTeamId` parameter from `resolveTeamId` — nothing consumed it
since the legacy `template build` command was removed. Team resolution
is now: `--team` flag → `E2B_TEAM_ID` env → `~/.e2b/config.json` (the
last only when `E2B_API_KEY` isn't set). yup ignores unknown keys, so
legacy tomls containing `team_id` still parse.

Parsing (`loadConfig`, `deleteConfig`, `getConfigPath`) is intentionally
kept as the backward-compatibility read path for legacy projects:
`template migrate` (its whole purpose), `template publish`, `template
delete`, and `sandbox create`. No user-facing behavior changes; includes
a `@e2b/cli` patch changeset.

## Test

Format, lint, and typecheck pass; CLI tests: 88 passed, 8 skipped (one
pre-existing backend integration suite fails only due to missing
`E2B_API_KEY` in the environment).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 17:06:07 +02:00
..
2026-07-15 09:27:07 +00:00

E2B Logo

E2B CLI

This CLI tool allows you to build manager your running E2B sandbox and sandbox templates. Learn more in our documentation.

1. Install the CLI

Using Homebrew (on macOS)

brew install e2b

Using NPM

npm install -g @e2b/cli

2. Authenticate

e2b auth login

Note

To authenticate without the ability to open the browser, provide E2B_ACCESS_TOKEN as an environment variable. You can find your token in Account Settings under the Team selector at e2b.dev/dashboard. Then use the CLI like this: E2B_ACCESS_TOKEN=sk_e2b_... e2b template create.

Important

Note the distinction between E2B_ACCESS_TOKEN and E2B_API_KEY.

3. Check out docs

Visit our CLI documentation to learn more.