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:e2b auth login. The CLI shows an interactive list of your projects and stores the one you select as the active project, so subsequent CLI commands use that project’s API key. You need to be logged in first for this command to work.