Skip to main content
Blaxel CLI is a command line tool to interact with the Blaxel APIs.

Install

To install Blaxel CLI, you must use Homebrew: make sure it is installed on your machine. We are currently in the process of supporting additional installers. Check out the cURL method down below for general installation.
Install Blaxel CLI by running the two following commands successively in a terminal:

brew tap blaxel-ai/blaxel


brew install blaxel

Install Blaxel CLI by running the following command in a terminal (non-sudo alternatives below):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| BINDIR=/usr/local/bin sudo -E sh
If you need a non-sudo alternative (it will ask you questions to configure):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| sh
If you need to install a specific version (e.g. v0.1.21):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| VERSION=v0.1.21 sh
Install Blaxel CLI by running the following command in a terminal (non-sudo alternatives below):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| BINDIR=/usr/local/bin sudo -E sh
If you need a non-sudo alternative (it will ask you questions to configure):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| sh
If you need to install a specific version (e.g. v0.1.21):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| VERSION=v0.1.21 sh
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

To update Blaxel CLI, you must use Homebrew: make sure it is installed on your machine. We are currently in the process of supporting additional installers. Check out the cURL method down below for general installation.

brew upgrade blaxel

Update Blaxel CLI by running the following command in a terminal (alternatives below):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| BINDIR=/usr/local/bin sudo -E sh
If you need a non-sudo alternative:
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| sh
If you need to update to a specific version (e.g. v0.1.21):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| VERSION=v0.1.21 sh
Update Blaxel CLI by running the following command in a terminal (non-sudo alternatives below):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| BINDIR=/usr/local/bin sudo -E sh
If you need a non-sudo alternative:
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| sh
If you need to update to a specific version (e.g. v0.1.21):
curl -fsSL \
https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh \
| VERSION=v0.1.21 sh
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:
echo 'eval "$(bl completion zsh)"' >> ~/.zshrc

Get started

To get started with Blaxel CLI, your must first create a workspace on the Blaxel console. Then, login to Blaxel using this command:
bl login
In case you have multiple workspaces, the one you logged in to will be used automatically in every command you used with our CLI. You can login to as much workspace as you want To set your context to a different workspace you already logged in to, use the following command:
bl workspaces your-workspace

### You can retrieve the list of all your workspaces by running:
bl workspaces
You can now run any command to interact with Blaxel resources in your workspace. For example, to list agents:
bl get agents

Options

-h, --help               Get the help for Blaxel
-w, --workspace string   Specify the Blaxel workspace to work on.
-o, --output string      Output format. One of: pretty, yaml, json, table
-v, --verbose            Enable verbose output
I