feat(cli): deprecate --team flag and scope template commands to API key team#1571
feat(cli): deprecate --team flag and scope template commands to API key team#1571mishushakov wants to merge 3 commits into
Conversation
…ey team The --team flag on template list/publish/unpublish/delete is now a no-op that prints a deprecation warning; E2B_TEAM_ID and the config file team ID are no longer read. The API scopes these endpoints to the authenticated API key's team, so the explicit teamID param was redundant. publish, unpublish, and delete now require an API key up front via ensureAPIKey() and show a login hint instead of a raw 401. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 800a786 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit 800a786. Bugbot is set up for automated code reviews on this repo. Configure here. |
Package ArtifactsBuilt from a29d8eb. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.35.1-cli-e2b-team-id-usage.0.tgzCLI ( npm install ./e2b-cli-2.13.4-cli-e2b-team-id-usage.0.tgzPython SDK ( pip install ./e2b-2.34.0+cli.e2b.team.id.usage-py3-none-any.whl |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4c4363e5c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Adds a mock-API test that --team prints the deprecation warning and sends no teamID query param, and no-credential tests (isolated HOME) that publish/unpublish/delete show the login hint instead of a 401. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…l output (#1577) ## Summary Copy-only rename of the remaining user-visible "team" strings to "project" in the CLI (EN-1891) — part of the Teams → Projects rename, following the dashboard copy pass. 12 string literals across `auth login`, `auth info`, `auth configure`, and `template publish`; no flag, env var, config key, API call, or exit-code behavior changes. Explicitly untouched (owned by other PRs): `--team` flag + help text (#1571), `~/.e2b/config.json` keys (#1570), `e2b.toml` `team_id` (#1569), internal identifiers and API `Team` types. Best merged after #1569–#1571 to keep their rebases trivial. ## Usage examples ``` $ e2b auth login Logged in as you@e2b.dev with selected project Your Project $ e2b auth info You are logged in as you@e2b.dev, Selected project: Your Project (a1b2c3d4) $ e2b auth configure ? Select project Your Project (a1b2c3d4) (currently selected project) Project Your Project (a1b2c3d4) selected. $ e2b template publish⚠️ This will make the template public to everyone outside your project ``` ## Testing - No new tests — strings only, not functionality (per review). Existing suite passes except the pre-existing backend-integration suites that need live sandbox access (fail identically on main). - Patch changeset included.
|
closing in favor of less-intrusive #1580 |
Summary
Deprecates the
--teamflag ontemplate list,template publish,template unpublish, andtemplate delete: the flag is still accepted but is now a no-op that prints a deprecation warning, and theE2B_TEAM_IDenv var and config-file team ID are no longer read. These commands are always scoped to the currently active project — the one the authenticated API key belongs to; verified against prod thatGET /templatesreturns the identical template set with and without an explicitteamIDparam, soresolveTeamId()and theteamIDquery param were removed as redundant.template publish,template unpublish, andtemplate deletenow callensureAPIKey()up front, showing the "rune2b auth login" hint instead of failing with a raw 401 from the API. Switching projects remains available viae2b auth configureor by settingE2B_API_KEYto another project's key.Usage
Testing
New
team_option.test.tscovers the deprecated flag against a mock API server (warning printed, flag accepted, noteamIDquery param sent) and theensureAPIKey()guards for publish/unpublish/delete with credentials fully isolated (emptyHOME, no E2B env vars).🤖 Generated with Claude Code