Skip to main content

bl login

Login to Blaxel

Synopsis

Authenticate with Blaxel to access your workspace. A workspace is your organization’s isolated environment in Blaxel that contains all your resources (agents, jobs, sandboxes, models, etc.). You must login before using most Blaxel CLI commands. Authentication Methods:
  1. Browser OAuth (default) - Interactive login via web browser
  2. API Key - For automation and scripts (set BL_API_KEY environment variable)
  3. Client Credentials - For CI/CD pipelines (set BL_CLIENT_CREDENTIALS)
The CLI automatically detects which authentication method to use:
  • If BL_CLIENT_CREDENTIALS is set, uses client credentials
  • If BL_API_KEY is set, uses API key authentication
  • Otherwise, shows interactive menu to choose browser or API key login
Without a terminal (for example when a coding agent runs the command), nothing can be asked. With a workspace argument, bl login uses BL_CLIENT_CREDENTIALS or BL_API_KEY when one is set, and the browser login otherwise. Without a workspace argument it uses the browser login, then your current workspace if the login can use it, or else the first of your workspaces by name, and says which one. The browser login prints the login URL on its own line and how long it waits for you to confirm in the browser. Without a workspace argument, if browser login succeeds but your account has no workspaces, bl login opens the Console so you can create or join one. It checks every three seconds for up to five minutes, then uses the same workspace selection described above. If the browser cannot open, visit the printed Console URL. Press Ctrl+C to cancel and run bl login again after your workspace is available. Credentials are stored securely in your system’s credential store and persist across sessions. Use ‘bl logout’ to remove stored credentials. Examples:
After logging in, all commands will use this workspace by default. Override with —workspace flag: bl get agents —workspace other-workspace

Options

Options inherited from parent commands

SEE ALSO

  • bl - Blaxel CLI - manage and deploy AI agents, sandboxes, and resources
Last modified on October 12, 2026