bl) is a command line tool to interact with the Blaxel APIs.
Install
Install on Mac
Install on Mac
Install Blaxel CLI by running the two following commands successively in a terminal:
Install on Linux
Install on Linux
Install Blaxel CLI by running the following command in a terminal (non-sudo alternatives below):If you need a non-sudo alternative (it will ask you questions to configure):If you need to install a specific version (e.g. v0.1.21):
Install with cURL
Install with cURL
Install Blaxel CLI by running the following command in a terminal (non-sudo alternatives below):If you need a non-sudo alternative (it will ask you questions to configure):If you need to install a specific version (e.g. v0.1.21):
Install on Windows
Install on Windows
For the most reliable solution, we recommend adapting the aforementioned Linux commands by using Windows Subsystem for Linux.First install WSL (Windows Subsystem for Linux) if not already installed. This can be done by:
- Opening PowerShell as Administrator
- Running:
wsl --install -d Ubuntu-20.04 - Restarting the computer
- From the Microsoft Store, install the Ubuntu app
- Run the command line using the aforementioned Linux installation process. Make sure to install using sudo.
Update
Update on Mac
Update on Mac
Update Blaxel CLI by running the following command in a terminal:If you need to update to a specific version (e.g. v0.1.21):You can also upgrade using Homebrew:
Update on Linux
Update on Linux
Update Blaxel CLI by running the following command in a terminal:If you need to update to a specific version (e.g. v0.1.21):
Update on Windows
Update on Windows
For the most reliable solution, we recommend adapting the aforementioned Linux commands by using Windows Subsystem for Linux.First make sure WSL (Windows Subsystem for Linux) is installed if not already. This can be done by:
- Opening PowerShell as Administrator
- Running:
wsl --install -d Ubuntu-20.04 - Restarting the computer
- From the Microsoft Store, install the Ubuntu app
- Run the command line using the aforementioned Linux installation process. Make sure to install using sudo.
Shell autocompletion
To enable shell autocompletion for Blaxel CLI commands, run one of the following:Get started
First, create a workspace on the Blaxel console. Then, login to Blaxel:| Command | Purpose |
|---|---|
bl new | Scaffold a new local project (code + blaxel.toml) |
bl deploy | Build image + push image + create/update resource + watch logs |
bl push | Build image + push image to Blaxel registry (no resource created or updated) |
bl apply | Declarative resource creation/update using YAML files, similar to kubectl apply |
bl serve | Local execution (not available for sandboxes) |
bl deploy is an all-in-one command that packages local files into an image, pushes it as a template, and deploys it as a resource on Blaxel. Use the --skip-build flag to skip image rebuilding. Use bl push instead to only build and push the image.
Interact with existing resources in your workspace:
