Option 1: browser authentication
Run the following command to sign in through your browser:Option 2: setup environment variables
This is the recommended option for non-interactive environments like CI/CD pipelines, servers, and containers. Set a single environment variable with your API key:e2b auth login. Use CLI version 2.12.1 or later.
Learn more about obtaining and managing your API key on the API Key page.
Switch the active project
If your E2B account has access to more than one project, you can choose which one the CLI uses. When you sign in, the CLI selects the project in your personal workspace (if you only belong to SSO workspaces, you pick one).e2b project list --workspace <workspace> lists the projects in one workspace. e2b auth configure does the same as e2b project use, with an interactive list. A project can be given by its ID, prj_ ID, slug or name. These commands need e2b auth login.
To use a different project for a single command, set the E2B_PROJECT_ID environment variable:
E2B_API_KEY is set, the API key decides the project instead.