Documentation Index
Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt
Use this file to discover all available pages before exploring further.
bl deploy
Build, push, and deploy your project to Blaxel
Synopsis
Deploy your Blaxel project to the cloud.
This command packages your code, builds a container image, and deploys it
to your workspace. The deployment process includes:
- Reading configuration from blaxel.toml
- Packaging source code (respects .blaxelignore)
- Building container image with your runtime and dependencies
- Uploading to Blaxel’s container registry
- Creating or updating the resource in your workspace
- Streaming build and deployment logs (interactive mode)
A blaxel.toml configuration file is required. By default, the command looks
for it in the current directory. Use -d to specify a subdirectory containing
the blaxel.toml (useful for monorepo setups).
Interactive vs Non-Interactive:
- Interactive (default): Shows live logs and deployment progress with TUI
- Non-interactive (—yes or CI): Runs without interactive UI, suitable for automation
Environment Variables and Secrets:
Use -e to load .env files or -s to pass secrets directly via command line.
Secrets are injected into your container at runtime and never stored in images.
Monorepo Support:
Use -d to deploy a specific subdirectory, or -R to recursively deploy
all projects in a monorepo (looks for blaxel.toml in subdirectories).
Examples
# Basic deployment (interactive mode with live logs)
bl deploy
# Non-interactive deployment (for CI/CD)
bl deploy --yes
# Deploy with environment variables
bl deploy -e .env.production
# Deploy with command-line secrets
bl deploy -s API_KEY=xxx -s DB_PASSWORD=yyy
# Deploy without rebuilding (reuse existing image)
bl deploy --skip-build
# Dry run to validate configuration
bl deploy --dryrun
# Deploy specific subdirectory in monorepo
bl deploy -d ./packages/my-agent
# Deploy specifying a resource type
bl deploy --type sandbox
# Deploy with Docker build args from a .env.build file
bl deploy --build-env-file .env.build.production
# Recursively deploy all projects in monorepo
bl deploy -R
Options
--build-env-file string Path to a build env file with Docker build args (default: auto-detect .env.build)
-d, --directory string Deployment app path, can be a sub directory
--docker-config string Path to a Docker config.json file with registry credentials
--dryrun Dry run the deployment
-e, --env-file strings Environment file to load (default [.env])
--experimental Enable experimental features (e.g. USER directive support)
-h, --help help for deploy
-n, --name string Optional name for the deployment
-r, --recursive Deploy recursively (default true)
-c, --registry-cred stringArray Registry credentials (format: registry=username:password, repeatable)
-s, --secrets strings Secrets to deploy
--skip-build Skip the build step
--timeout string Timeout for build and deployment monitoring (e.g. 30m, 1h). Defaults to 15m
-t, --type string Resource type (sandbox, agent, function, job). Defaults to blaxel.toml type or 'sandbox'
-y, --yes Skip interactive mode
Options inherited from parent commands
-o, --output string Output format. One of: pretty,yaml,json,table
--skip-version-warning Skip version warning
-u, --utc Enable UTC timezone
-v, --verbose Enable verbose output
-w, --workspace string Specify the workspace name
SEE ALSO
- bl - Blaxel CLI - manage and deploy AI agents, sandboxes, and resources