# Blaxel Cli

> Manage Blaxel resources from the command line using the bl CLI. Deploy agents, sandboxes, jobs, and MCP servers. Also installs the Blaxel CLI if not present.

- **Type:** Skill
- **Install:** `agentstack add skill-blaxel-ai-agent-skills-blaxel-cli`
- **Verified:** Pending review
- **Seller:** [blaxel-ai](https://agentstack.voostack.com/s/blaxel-ai)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [blaxel-ai](https://github.com/blaxel-ai)
- **Source:** https://github.com/blaxel-ai/agent-skills/tree/main/skills/blaxel-cli

## Install

```sh
agentstack add skill-blaxel-ai-agent-skills-blaxel-cli
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Blaxel CLI

A CLI to manage Blaxel cloud resources from the command line: agents, sandboxes,
jobs, MCP servers, drives, and more.

## Prerequisites

The `bl` command must be available on PATH. To check:

```bash
bl version
```

If not installed, install via the official install script:

```bash
curl -fsSL https://raw.githubusercontent.com/blaxel-ai/toolkit/main/install.sh | sh
```

Or via Homebrew:

```bash
brew tap blaxel-ai/blaxel && brew install blaxel
```

After installation, log in to your workspace:

```bash
bl login my-workspace
```

## Global Flags

All commands support these flags:

| Flag                     | Description                              |
| ------------------------ | ---------------------------------------- |
| `-o, --output `  | Output format: pretty, yaml, json, table |
| `-w, --workspace ` | Override workspace for this command      |
| `-v, --verbose`          | Enable verbose output                    |
| `-u, --utc`              | Enable UTC timezone                      |
| `--skip-version-warning` | Skip version warning                     |

## Non-Interactive Mode

For commands that prompt for input (confirmations, selections), add `-y` or
`--yes` to auto-confirm. This is required when running in non-interactive /
no-TTY environments (scripts, CI, agents).

## Available Commands

```
bl apply       # Apply configuration changes to resources declaratively using YAML files.
bl chat        # Start an interactive chat session with a deployed agent.
bl connect     # Open an interactive terminal session to a sandbox
bl delete      # Delete Blaxel resources from your workspace.
bl deploy      # Deploy your Blaxel project to the cloud.
bl drive       # Manage drives and drive mounts on sandboxes.
bl get         # Retrieve information about Blaxel resources in your workspace.
bl login       # Authenticate with Blaxel to access your workspace.
bl logout      # Remove stored credentials for a workspace.
bl logs        # View logs for Blaxel resources.
bl new         # Create a new Blaxel resource from templates.
bl push        # Build and push a container image to the Blaxel registry without creating a deployment.
bl run         # Execute a Blaxel resource with custom input data.
bl serve       # Start a local development server for your Blaxel project.
bl share       # Share Blaxel resources with other workspaces in your account.
bl token       # Retrieve the authentication token for the specified workspace.
bl unshare     # Remove shared Blaxel resources from other workspaces.
bl upgrade     # Upgrade the Blaxel CLI to the latest version.
bl version     # Print the version number
bl workspaces  # List and manage Blaxel workspaces.
```

## Reference Documentation

- [apply](references/apply.md) - Apply configuration changes to resources
  declaratively using YAML files.
- [chat](references/chat.md) - Start an interactive chat session with a deployed
  agent.
- [connect](references/connect.md) - Open an interactive terminal session to a
  sandbox
- [delete](references/delete.md) - Delete Blaxel resources from your workspace.
- [deploy](references/deploy.md) - Deploy your Blaxel project to the cloud.
- [drive](references/drive.md) - Manage drives and drive mounts on sandboxes.
- [get](references/get.md) - Retrieve information about Blaxel resources in your
  workspace.
- [login](references/login.md) - Authenticate with Blaxel to access your
  workspace.
- [logout](references/logout.md) - Remove stored credentials for a workspace.
- [logs](references/logs.md) - View logs for Blaxel resources.
- [new](references/new.md) - Create a new Blaxel resource from templates.
- [push](references/push.md) - Build and push a container image to the Blaxel
  registry without creating a deployment.
- [run](references/run.md) - Execute a Blaxel resource with custom input data.
- [serve](references/serve.md) - Start a local development server for your
  Blaxel project.
- [share](references/share.md) - Share Blaxel resources with other workspaces in
  your account.
- [token](references/token.md) - Retrieve the authentication token for the
  specified workspace.
- [unshare](references/unshare.md) - Remove shared Blaxel resources from other
  workspaces.
- [upgrade](references/upgrade.md) - Upgrade the Blaxel CLI to the latest
  version.
- [version](references/version.md) - Print the version number
- [workspaces](references/workspaces.md) - List and manage Blaxel workspaces.

## Discovering Options

To see available subcommands and flags, run `--help` on any command:

```bash
bl --help
bl deploy --help
bl get --help
bl get agents --help
```

## Common Workflows

### Create a sandbox, run a command, and get its logs

```bash
# 1. Create a sandbox with bl apply
bl apply -f - '` requires the JSON payload
to survive **shell quoting**. As soon as the command embeds nested quotes,
backslashes, multiple lines, or interpreters like `sh -lc` / `python3 -c`,
inline `--data` becomes brittle and the API rejects the request with
`400 Bad Request: invalid character ... in string escape code`.

**Decision rule for an agent:**

1. Command has **no single quotes, no backslashes, no newlines** → use
   `--data '{"command": "...", "waitForCompletion": true}'` directly.
2. Anything more complex (nested quotes, escapes, multiline, scripts) → **write
   the JSON payload to a file** with your Write/file-creation tool (this
   bypasses the shell entirely), then run with `--file`.

```bash
# Step 1 — agent writes /tmp/process.json with content like:
# {
#   "command": "sh -lc 'python3 -c \"print(\\\"hello\\\")\"'",
#   "name": "cve-check",
#   "waitForCompletion": true
# }
#
# Step 2 — execute it
bl run sandbox my-sandbox --path /process --file /tmp/process.json
```

### Deploy an agent

```bash
bl new agent my-agent
cd my-agent
bl serve --hotreload    # Test locally
bl deploy               # Deploy to cloud
bl chat my-agent        # Chat with it
```

### Manage sandboxes

```bash
bl get sandboxes                    # List all
bl get sandbox my-sandbox --watch   # Watch status
bl connect sandbox my-sandbox       # Interactive terminal
bl logs sandbox my-sandbox --follow # Stream logs
bl delete sandbox my-sandbox        # Clean up
```

### Multi-workspace deployment

```bash
bl workspaces dev     # Switch to dev
bl deploy             # Deploy to dev
bl workspaces prod    # Switch to prod
bl deploy             # Deploy to prod
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [blaxel-ai](https://github.com/blaxel-ai)
- **Source:** [blaxel-ai/agent-skills](https://github.com/blaxel-ai/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-blaxel-ai-agent-skills-blaxel-cli
- Seller: https://agentstack.voostack.com/s/blaxel-ai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
