The executable is bxc. The compatibility alias bcompute accepts the same commands.
bxc [--json] COMMAND [OPTIONS]Global options
| Option | Meaning |
|---|---|
--json |
Emit machine-readable JSON for commands that return data. It can appear before or after the command. |
-V, -v, --version |
Print the installed CLI version. |
-h, --help |
Show help. Use bxc help COMMAND, such as bxc help sandbox or bxc help audit, for command help. |
Authentication and maintenance
bxc login
Start browser device authorization. bxc auth and bxc auth login are equivalent.
| Option | Meaning |
|---|---|
--url URL |
Connect to this BoxCompute web origin. Defaults to the saved origin, then https://app.boxcompute.ai. The value must be an absolute HTTP or HTTPS origin without credentials, a path, query, or fragment. |
--no-open |
Print the approval URL without trying to launch a browser. |
The CLI supports native browser launchers on macOS, Linux, Windows, and WSL. Failure to launch a browser does not stop authorization; open the printed URL manually.
bxc logout
Revoke the saved credential through Sandbox API v2, then remove the local credential and configuration files. bxc auth logout is equivalent. Logout requires a working connection so that access is revoked server-side.
bxc doctor
Verify authentication by listing Sandboxes. Human output shows the connected origin and number of Sandboxes. JSON output has this shape:
{"connected":true,"url":"https://app.boxcompute.ai","sandboxes":2}bxc whoami
Show the account and API key behind the saved credential. It takes no options. Human output is
the account’s email (or name or ID) and ID, then the key’s name, ID and scopes. JSON output is the
unwrapped { "account": {...}, "apiKey": {...} } object from GET /api/v2/me.
bxc update
Read the latest package version from npm and, when it is newer, run a global install of that exact version. bxc up is equivalent. This command does not require BoxCompute authentication.
bxc version
Print the installed version and exit. bxc --version is equivalent.
Discover resources
bxc workspaces
List workspaces owned by the authenticated account:
WORKSPACE_ID<TAB>NAMEUse a workspace ID with bxc sandbox start. In JSON mode, the result is { "workspaces": [...] }.
bxc sandboxes
List owned Sandbox instances:
SANDBOX_ID<TAB>STATE<TAB>NAMEbxc list and bxc ls are aliases. In JSON mode, the result is { "sandboxes": [...] }. A Sandbox
state is cold, pending, running, or expired. New VM creation can remain pending while provisioning.
Credit, wallet history, and usage
CLI 0.8.0 added the cost commands below, and 0.10.0 added credits, billing transactions and
usage. These account-owned reads require usage:read, remain available
at zero credit, and never start or resume compute. See credit and wallet history
for monetary units, null estimates, and the difference between wallet deductions and observed AI costs.
bxc credits
bxc --json billing transactions --bucket promo --limit 20
bxc usage --days 7
bxc costs --from 2026-10-01T00:00:00Z --to 2026-10-11T00:00:00Z| Command | Options and JSON output |
|---|---|
bxc credits (or bxc billing) |
No filters; { "billing": BillingSummary } |
bxc billing transactions |
--from, --to, --kind, --bucket cash|promo|plan, --before, --limit (1–200, default 50); { "currency": "usd", "transactions": [...], "nextCursor": string | null } |
bxc usage |
--days (1–90, default 30); { "usage": Usage } |
bxc costs |
--from, --to, --api-key ID (or none); { "costs": SandboxCostReport } |
bxc sandbox costs SANDBOX_ID |
{ "costs": SandboxCostDetail } |
bxc deleted costs DELETED_ID |
The same detail shape for a deletion-record ID |
Transactions return one newest-first page. Pass its nextCursor as --before with the same
filters to continue; null means the end. JSON preserves signed integer micro-USD amounts.
API audit log
bxc audit
Page the account’s API audit log, newest first. It requires usage:read.
bxc audit --outcome error
bxc --json audit --type api.request --resource SANDBOX_ID --limit 200| Option | Meaning |
|---|---|
--type TYPE |
api.request, api_key.created, api_key.revoked, or api_key.rejected. |
--outcome OUTCOME |
success or error. |
--method METHOD |
GET, HEAD, POST, PUT, PATCH, or DELETE. |
--api-key API_KEY_ID |
One API key. |
--resource RESOURCE_ID |
One resource, such as a Sandbox ID. |
--from TIMESTAMP, --to TIMESTAMP |
RFC 3339 window. The CLI requires --from to be earlier than --to. |
--before CURSOR |
The nextCursor from the previous page. |
--limit EVENTS |
Positive whole number, at most 200. Defaults to 50 on the API. |
Human output is one tab-separated event per line: time, type, method and path, status, and
resource ID. When more events exist, the command for the next page is printed to standard error.
JSON output is { "events": [...], "nextCursor": string | null }.
Manage Sandboxes
bxc sandbox start WORKSPACE_ID
Create and start another Sandbox under a workspace. It returns the new Sandbox ID, state, and name. Each successful call can create a distinct instance, so save the returned ID and inspect the list before retrying after an uncertain network failure.
The start command accepts --idempotency-key KEY (required with --vm; reusable for any create)
and --name NAME. It creates a VM Sandbox by default; use --size small or --size large
and --no-wait to return the creation receipt without waiting for a pending VM to reach running.
Legacy --gvisor and --cpu options request new gVisor creation, which the hosted API rejects
with 400 INVALID_REQUEST.
bxc sandbox resume SANDBOX_ID
Start the same existing stopped VM with its retained disk and files; compute billing resumes.
Optional --idempotency-key KEY recovers the same request, and --no-wait returns a pending receipt
without polling. This calls the existing-slot start route with {} rather than creating a new
Sandbox. An uncertain response is not automatically retried: inspect status before deciding what
to do. An unavailable legacy gVisor runtime cannot be recreated through resume.
bxc sandbox stop SANDBOX_ID
CLI 0.11.0 and later can stop a running VM now, ending compute billing while keeping its disk and files. Running programs and connections end. Resume the same VM when you need it again:
bxc sandbox stop SANDBOX_ID
bxc sandbox resume SANDBOX_IDStop requires sandbox:create, never wakes a stopped VM, and is safe to repeat. JSON mode returns
{ "sandbox": {...}, "stopped": true }; stopped: false means it was not running. An HTTP 409
means the VM is still starting, stopping or in use; retry shortly. See VM lifecycle.
bxc sandbox status SANDBOX_ID
Inspect one Sandbox without executing a command. JSON mode returns { "sandbox": {...} }.
bxc sandbox exec SANDBOX_ID -- PROGRAM [ARG...]
Execute a structured argument vector inside a Sandbox:
bxc sandbox exec SANDBOX_ID \
--cwd /workspace/project \
--env NODE_ENV=test \
--env CI=true \
--timeout 300 \
--max-output-bytes 1048576 \
-- npm test -- --runInBand| Option | Meaning |
|---|---|
--cwd PATH |
Working directory at /workspace or below. Defaults to /workspace. |
--env KEY=VALUE |
Set an environment variable. Repeat the option for more variables. The first = separates the name from its value. |
--timeout SECONDS |
Positive whole-number execution timeout. The API accepts at most 900 seconds. |
--max-output-bytes BYTES |
Positive whole-number capture limit. The API accepts at most 1,048,576 bytes per stream. |
-- |
Required separator between CLI options and the remote program. |
In human mode, remote standard output stays on local standard output. Remote standard error and an execution summary are written to local standard error. The CLI exits with the remote exitCode. When no exit code is available, the API reports -1 and the CLI passes it through, so the process exits with status 255 on Linux and macOS. A non-zero exit therefore reports command failure even though the API request itself succeeded.
In JSON mode, standard output contains the API’s execution result plus sandboxId:
{
"sandboxId": "sbx_REDACTED",
"stdout": "tests passed\n",
"stderr": "",
"exitCode": 0,
"timedOut": false,
"stdoutTruncated": false,
"stderrTruncated": false
}bxc sandbox logs SANDBOX_ID
Read current or retained logs without starting stopped compute:
bxc sandbox logs SANDBOX_ID \
--since 2026-09-06T00:00:00Z \
--until 2026-09-07T00:00:00Z \
--stream stderr \
--source execute \
--limit 100| Option | Accepted value |
|---|---|
--since TIMESTAMP |
Include entries at or after this RFC 3339 time. |
--until TIMESTAMP |
Include entries before this RFC 3339 time. It must be later than --since. |
--stream STREAM |
stdout or stderr. |
--source SOURCE |
workload, execute, or process. |
--limit ENTRIES |
Positive whole number, at most 5,000. Defaults to 1,000 on the API. |
Human output is one tab-separated entry per line, followed by a summary on standard error. JSON output is { "logs": {...} } and preserves the structured entries, retention window, and truncation marker. See Read Sandbox logs for source semantics and retention behavior.
bxc sandbox upload SANDBOX_ID LOCAL REMOTE
Upload one regular local file of at most 8 MiB as raw bytes to a path at /workspace or below.
The remote parent directory must already exist; create it with sandbox exec.
bxc sandbox download SANDBOX_ID REMOTE LOCAL
Download a complete remote file, following continuation cursors to EOF. The local path must not exist. The file is written with owner-only permissions and appears only after the whole download succeeds; a failure, a file that changes size during the download, or five minutes elapsing discards the partial data.
Neither transfer is retried. Both count as VM activity and start a stopped VM unless it was
created with autoResume: false. JSON output is
{ "sandboxId": "...", "source": "...", "destination": "...", "bytes": 1234 }.
bxc sandbox analytics SANDBOX_ID
Read lifecycle, operation, and resource analytics without starting
compute. It requires sandbox:read.
| Option | Meaning |
|---|---|
--from TIMESTAMP, --to TIMESTAMP |
RFC 3339 window. The CLI requires --from to be earlier than --to. |
--resolution SECONDS |
Bucket width from 60 to 86,400 seconds. Defaults to 300 on the API. |
--generation N |
Select one runtime generation. |
Human output lists each runtime generation and the window’s operation, execution, and failure
totals, with a summary on standard error. Use --json for { "analytics": {...} }, including the
resource time series.
bxc sandbox preview SANDBOX_ID
Open a one-hour HTTP/WebSocket browser preview for one port of an owned, running, network-enabled VM, or close one early. Pass exactly one option:
bxc sandbox preview SANDBOX_ID --port 3000
bxc sandbox preview SANDBOX_ID --close PREVIEW_ID| Option | Meaning |
|---|---|
--port PORT |
VM port to publish, 1–65,535. Port 9222, the desktop Chrome’s DevTools port, is refused. |
--close PREVIEW_ID |
Close that preview instead of opening one. |
Opening prints the URL on standard output and the preview ID, expiry, and close command on
standard error. JSON output is { "preview": {...} }; closing returns
{ "sandboxId": "...", "previewId": "...", "closed": true }. The URL is a bearer link: anyone
holding it can reach the port until it expires or is closed. A VM can have up to three previews
at once, one per port. Requires sandbox:execute and CLI 0.8.0 or later.
bxc sandbox expose SANDBOX_ID --port [LOCAL:]REMOTE
Forward selected TCP ports of an owned, running,
network-enabled VM to 127.0.0.1 on this machine:
bxc sandbox expose SANDBOX_ID --port 3000
bxc sandbox expose SANDBOX_ID --port 8080:80 --port 5432Repeat --port for up to eight unique ports; the local port defaults to the remote port. The
command stays in the foreground for a one-hour lease that never renews. Ctrl-C closes it sooner
and attempts to revoke the grant; run it again for a new lease. It does not create a public URL,
forward UDP, or support --json. Requires sandbox:execute, Linux or macOS on x64 or arm64, and
CLI 0.8.0 or later.
bxc sandbox ssh SANDBOX_ID
Experimental and off by default: set BOXCOMPUTE_ENABLE_SSH=1 to use it. It opens a non-PTY SSH
connection through a cooperative connection
grant that lasts at most 30 seconds. It works only for Sandboxes an operator has enabled.
BOXCOMPUTE_ENABLE_SSH=1 bxc sandbox ssh SANDBOX_ID| Option | Meaning |
|---|---|
--reconnect |
Verify one reconnect with the same grant after SSH exits. |
--revoke ENDPOINT_ID |
Request best-effort cleanup of an earlier grant without opening SSH. |
It supports Linux and macOS on x64 or arm64, never starts or provisions a Sandbox, never retries
activation, and does not support --json. Cleanup is unconfirmed; if revocation is uncertain,
the CLI prints the --revoke command to run. Use sandbox exec for ordinary work.
bxc sandbox delete SANDBOX_ID --yes
Destroy the Sandbox runtime and customer-facing instance. bxc sandbox rm is an alias. The explicit --yes confirmation is required. Deletion leaves the parent workspace intact and cannot be undone through the CLI.
Deleted Sandboxes
These reads use the deletion record, never restore or start
compute, and require sandbox:read (bxc deleted costs requires usage:read; see
Credit, wallet history, and usage).
bxc deleted list
List up to the 100 most recently deleted Sandboxes. bxc deleted ls and bxc deleted alone are
equivalent. Human output is DELETED_ID, original Sandbox ID, name, and deletion time per line;
JSON output is { "deletedSandboxes": [...] }.
bxc deleted logs DELETED_ID
Read a deleted Sandbox’s retained logs by its deletion-record ID, the first
column of bxc deleted list, not the original Sandbox ID. It accepts the sandbox logs options
plus --runtime RUNTIME, an unchanged value from the record’s runtimes, to read an earlier
runtime instead of the most recent one. Output matches sandbox logs.
Self-hosted runners
bxc runner
CLI 0.12.0 can run a BoxCompute chat’s shell and file tools on your own machine instead of a BoxCompute VM. Every account can use it; it requires Node.js 22 or newer, and Docker for the default runner. In Settings → Runners, add a runner and copy its token, which is shown only once. On that machine:
read -rsp 'Runner token: ' \
BOXCOMPUTE_RUNNER_TOKEN && echo
export BOXCOMPUTE_RUNNER_TOKEN
bxc runnerKeep the token in a secret store, not in command arguments or a committed file. This token is
separate from bxc login. The runner makes an outbound connection; no inbound port is needed.
In a new chat, choose the runner under Run on. That chat keeps its selected runner.
Each chat gets its own Docker container and persistent /workspace volume. Containers stop after
30 minutes without commands and restart with their files on the next command. bxc runner stays in
the foreground and does not support --json; Ctrl-C stops running commands but keeps containers and
files. It reconnects after network failures and server restarts, but exits when its token is
rejected or replaced by another connection.
| Option | Meaning |
|---|---|
--image IMAGE |
Container image; it needs bash and python3. Defaults to node:22-bookworm. |
--idle-stop DURATION |
Stop a chat’s container after this long without commands, such as 2h; 0 never stops it. Defaults to 30m. Cannot be combined with --dispatch. |
--dispatch PROGRAM |
Hand each operation to PROGRAM instead of Docker, which is then not required. The CLI README documents the contract. |
--url URL |
Connect to this BoxCompute web origin. Defaults to the saved login origin, then https://app.boxcompute.ai. |
--verbose |
Also log each command’s arguments. |
The model, chat history and approval controls stay in BoxCompute; model usage is metered as usual, but no BoxCompute VM compute credit is charged. Commands have the runner machine’s network access, including any reachable private systems. Runner chats do not offer VM management, browser previews, desktop, browser-task or Assets tools; attached files are not supported. Copy files out with Docker.
Remove the runner in Settings to revoke its token and disconnect it. Its chats then refuse to run rather than silently moving to a BoxCompute VM. Removing a runner or exiting the CLI does not delete its local containers and files; clean them up on that machine when no longer needed.
Manage coding-agent skills
Skill management does not require BoxCompute authentication.
bxc skill detect
Check known configuration directories and executable names for compatible coding agents. Detection does not recursively search your home directory. The command reports detected harnesses and the destination for each skill.
bxc skill list
List harnesses that are detected or already have the BoxCompute skill installed. bxc skill ls is an alias.
bxc skill install [TARGET...]
Install a managed copy of the packaged boxcompute-sandbox skill. With no target, auto installs to every detected harness.
bxc skill install
bxc skill install codex claude
bxc skill install both
bxc skill install allTargets are claude, codex, amp, opencode, cursor, gemini, copilot, cline, roo, goose, pi, windsurf, and agents. both expands to Claude Code and Codex. all installs every supported destination even when the harness is not detected. bxc skill add is an alias.
The command will not replace an unrelated or locally modified directory. Pass --force only when you intend to overwrite that copy:
bxc skill install codex --forcebxc skill remove [TARGET...] --yes
Remove CLI-managed skill copies. With no target, auto selects detected or installed harnesses. Explicit confirmation is required.
bxc skill remove codex claude --yes
bxc skill remove all --yesThe command protects a locally modified copy. Add --force only when you intend to delete those modifications. bxc skill rm and bxc skill uninstall are aliases.
bxc skill info
Print the packaged SKILL.md to standard output. bxc skill print is an alias. This is useful for auditing the exact instructions before installation.
Managed skill updates
The CLI records a digest beside each installed skill. A global CLI update refreshes an untouched managed copy during package installation. If package lifecycle scripts were disabled, the next ordinary bxc command performs the same check.
Locally modified copies are never overwritten automatically. The CLI reports their paths and leaves replacement behind the explicit bxc skill install --force command. Start a new agent session after an update so the harness loads the current instructions.
Exit statuses
| Status | Meaning |
|---|---|
0 |
The CLI command succeeded. |
1 |
Authentication, network, API, update, or other runtime failure. |
2 |
Invalid CLI usage or options. |
| Remote exit code | sandbox exec returns the executed program’s non-zero exit code. Without one, the API’s -1 becomes status 255 on Linux and macOS. |
Error messages are written to standard error. API failures include their HTTP status.