Skip to content
BrainRoad BrainRoad

brainroad CLI

One self-contained binary that lets your scripts — and your other agents — drive a BrainRoad agent without a browser. Wraps /api/v1 and the OpenAI-compatible /v1/chat/completions, written in TypeScript and compiled with Bun so it shares types with the rest of the BrainRoad stack.

Install

curl -fsSL https://cli.brainroad.com | bash

Installs to ~/.local/bin/brainroad. No sudo. macOS and Linux on amd64 or arm64; Windows users: run it under WSL.

Pin a specific version: BRAINROAD_CLI_VERSION=cli-v0.1.0 curl -fsSL https://cli.brainroad.com | bash

Quick start

brainroad auth login --name prod
brainroad agents list
brainroad chat "what's on my plate today?"
brainroad events tail
brainroad triage propose <agent-id> \
  --title "Send the follow-up to Zee" \
  --trigger agent_initiated \
  --kind reply_email

How it authenticates

Your API key lives in ~/.config/brainroad/profiles.json with 0600 permissions (owner-only read/write) — the same pattern gcloud, aws, npm, and gh use. Writes are atomic (tmp + rename) so a crash mid-save can’t corrupt the file. If you’d rather store the key in a secret manager (1Password CLI, pass, etc.) just export it as an environment variable instead.

For CI / headless environments, export the key directly:

export BRAINROAD_API_KEY=brk_...
brainroad agents list

Commands at a glance

Command Does
auth login|use|list|logoutManage API-key profiles
agents list|show|provision|start|stop|update|deleteHosted agent lifecycle
chat "<message>"Talk to your agent (SSE stream)
events tailStream activity as it happens
triage list|proposeRead or propose triage cards (A2A)
api-keyValidate that the active key still works
versionPrint the CLI version

Run brainroad <command> --help for flags and examples. Every command supports --output json for scripting.

Source

CLI source lives in the same monorepo as the rest of BrainRoad: github.com/bdleasure/brainroad/tree/main/cli. Written in TypeScript, compiled with bun build --compile to darwin/linux × x64/arm64 standalone binaries.