How to authenticate the BL CLI in CI environments
Last updated: February 26, 2026
To use the BL CLI in CI/CD environments for automating tasks like pushing sandbox images, you need to authenticate using an API key.
Using the GitHub Action (Recommended)
The easiest way to integrate BL CLI into your CI pipeline is to use our official GitHub Action:
https://github.com/blaxel-ai/bl-action
Manual Authentication
If you prefer to set up authentication manually or are using a different CI platform, follow these steps:
Create a dedicated workspace API key at https://app.blaxel.ai/profile/security
Set the API key as an environment variable and login:
export BL_API_KEY=your-api-key-here bl login your-workspaceAfter successful login, you can run any BL CLI commands in your CI environment
For security best practices, we recommend using a dedicated workspace API key specifically for CI/CD automation rather than your personal API key.