Repository navigation
Minor Changes
-
c0211e9: The CLI now authenticates every request with your login's access token instead of a stored API key.
e2b auth loginopenshttps://e2b.dev/auth/cli(orhttps://$E2B_DOMAIN/auth/cli). TheE2B_DOCS_BASEoverride is removed.- Access tokens are refreshed automatically before they expire, including during long-running commands such as
sandbox logs --follow,sandbox metrics --followand an attachedsandbox createsession. Refreshes are serialized across concurrente2bprocesses, so running several commands at once no longer risks signing you out. --project,E2B_PROJECT_IDand the project chosen withe2b auth configureselect the project for each request.- The project API key in
~/.e2b/config.jsonplays no role any more: it is neither used for requests nor written bye2b auth login. After downgrading to a CLI version that authenticates with it, rune2b auth loginagain. E2B_API_KEYstill works and takes precedence, for CI/CD and other non-interactive use.
-
29fe119:
E2B_ACCESS_TOKENauthenticates the CLI with an OAuth access token, for CI and other places without a login. It needsE2B_PROJECT_ID, which is the project for every request, likeE2B_API_KEYdecides the project on its own; setting both credentials is refused, and a stored login is ignored while the token is set.e2b workspace listande2b project listwork with the token alone, to find the project to set;e2b project usedoesn't work with it. The token is used as is: once it expires, set a new one. The variable once held the dashboard's access tokens, which no longer work: such a value is ignored with a warning, as if the variable were unset. -
07dc47a: Upgrade commander to v15. Commands now reject unexpected extra positional arguments (e.g.
e2b sandbox pause <id> <extra>) with an error instead of silently ignoring them. -
6a976f3:
e2b template listande2b template deletenow use the SDK'sTemplate.list()andTemplate.delete().TemplateInfogainsmaxCpuCount(max_cpu_countin Python) for resizable templates.Breaking:
e2b template list -f jsonnow prints the SDK'sTemplateInfoobjects (templateId,buildId,names, …) instead of the raw API response (templateID,buildID,aliases,createdBy, …), and the pretty table drops theCreated bycolumn (the API deprecated the creator's email). -
805da6c: Add commands for workspaces and projects:
e2b workspace list # workspaces you can access e2b project list [--workspace <ws>] # projects, the current one marked with * e2b project use [project] [-w <ws>] # set the project commands run in, or pick one e2b project info # the current project
A project can be given by its ID,
prj_ID, slug or name.project usewithout a project asks for the workspace and then the project;--workspacepicks from that workspace only and scopes a name to it. Commands run in the project fromE2B_PROJECT_ID, then the one chosen withe2b project use(ore2b auth configure, which picks it interactively). WithE2B_API_KEYset, the API key determines the project. -
d7dbb7e:
e2b auth loginande2b auth configurelist your workspaces and projects from workspace-api instead of the API'sGET /teams, which created a new API key in every project on each call.- Login asks for the workspace and then the project, with your personal workspace and its project preselected. Without a terminal, the personal project (or your only active one) is used.
e2b auth configureasks the same way, with the current project preselected. Blocked projects show a warning. - Requests go to the selected project's own control plane, so projects outside the default region work.
E2B_PROJECT_ID(and--projectwhere available) accepts a project's ID,prj_public ID, slug or name.- workspace-api is reached at
workspace-api.e2b.dev(forE2B_DOMAINe2b.appande2b.dev), or atE2B_WORKSPACE_API_URL. Logging in needs it: on any otherE2B_DOMAIN, useE2B_API_KEY.
- Login asks for the workspace and then the project, with your personal workspace and its project preselected. Without a terminal, the personal project (or your only active one) is used.
-
678d579: Validate all CLI options and arguments with zod. Invalid values now fail before the command runs, with a message naming the option, e.g.
error: option '-l, --limit <limit>' argument 'abc' is invalid. --limit must be a non-negative integer.Inputs that used to be silently accepted are now rejected:
--limitonsandbox listandsandbox snapshot listmust be a non-negative integer (non-numeric values used to becomeNaN).-e, --enventries without=(e.g.-e KEY) are rejected instead of ignored.-m, --metadatapairs without=are rejected instead of ignored, and values may now contain=.- Integer options no longer accept forms like
1e3or0x10.
--format(case-insensitive),--level, thetemplate createname and an odd--memory-mbare now rejected when parsed, not after the command starts. Invalide2b.tomlfiles list every invalid field instead of only the first.template_idanddockerfilemust be non-empty, andcpu_count/memory_mbmust be integers (quoted numbers like"2"are still accepted). -
6ee9a4b: Add resizable templates: build a template with
maxCpuCountand pick each sandbox'scpuCounton create.e2b template listshows aMax vCPUscolumn.
Patch Changes
- ede6629: Interactive prompts (
template init,template migrate,template delete/publishconfirmations, project pickers) now use@clack/promptsinstead of Inquirer. Canceling a prompt (Ctrl+C or Esc) printsCanceledand exits with code 130. - 8382945: Stop showing
(default: {})for the repeatable-e, --envoption ine2b sandbox create,connectandexechelp. - 07dc47a:
e2b sandbox listande2b sandbox killnow reject unknown--statevalues (anything other thanrunningorpaused) instead of sending them to the API. - 419e939: Fix
e2b template create --no-cachenot skipping the build cache - Updated dependencies [6a976f3]
- Updated dependencies [1b3b2a4]
- Updated dependencies [6ee9a4b]
- Updated dependencies [106efea]
- Updated dependencies [cf7208a]
- Updated dependencies [c513ae1]
- Updated dependencies [e50db00]
- e2b@2.64.0