@spinabot/brigade
v0.1.2
Published
Brigade — your personal AI crew. Polished terminal CLI for Anthropic, OpenAI, Gemini, Groq, xAI, DeepSeek, Mistral, OpenRouter, Cerebras, Ollama and any OpenAI-compatible endpoint. Built on the Pi SDK.
Readme
Brigade is a polished terminal interface for working with the world's leading language models — Anthropic Claude, OpenAI GPT, Google Gemini, Groq, xAI, DeepSeek, Mistral, OpenRouter, Cerebras — and your own local models via Ollama or any OpenAI-compatible endpoint.
It runs in two modes: a single-process chat TUI (the default) or as a headless WebSocket gateway you can connect multiple thin clients to.
Install
npm install -g @spinabot/brigadeRequires Node.js 20 or newer.
Quick start
brigadeFirst launch walks you through three steps:
- Pick a provider.
- Connect it (paste an API key, or scan your local Ollama).
- Choose a default model.
That's it. Subsequent launches resume right where you left off.
Commands
Brigade is a single binary with subcommands. brigade on its own is
shorthand for brigade chat.
| Command | What it does |
|--------------------|---------------------------------------------------------------|
| brigade | Start the chat TUI (default) |
| brigade chat | Start the chat TUI |
| brigade gateway | Run the headless WebSocket gateway, no TUI |
| brigade connect | Open a TUI that talks to a running gateway |
| brigade onboard | Re-run the provider/model setup wizard |
| brigade doctor | Health-check Node, config, providers, prompts, and log sink |
| brigade config | Read & write ~/.brigade/config.json |
| brigade --version| Print the version |
| brigade --help | Print the full help text |
brigade gateway
Runs Brigade as a WebSocket server with no terminal UI of its own. Useful when you want a long-lived agent process you can attach and detach clients to.
brigade gateway --port 7777 --host 127.0.0.1 --verbose| Flag | Default | Notes |
|------------------|---------------|----------------------------------------------|
| --port N | 7777 | Listen port (also BRIGADE_PORT env var) |
| --host A | 127.0.0.1 | Bind address |
| --verbose | off | Stream a one-line summary of every event |
| --quiet | off | Suppress the live console stream |
| --log-level X | info | debug, info, warn, error |
brigade connect
Attaches a TUI to a running gateway. Same chat experience as brigade,
but the agent runs in the gateway process — so you can disconnect, walk
away, reconnect later, and pick up where you left off.
brigade connect --host 127.0.0.1 --port 7777| Flag | Default | Notes |
|----------------|---------------|--------------------------------------|
| --host A | 127.0.0.1 | Gateway host to connect to |
| --port N | 7777 | Gateway port |
| --timeout MS | 60000 | Per-request timeout |
brigade doctor
Runs a health check across Node version, your ~/.brigade/ directory,
config, configured providers, log sink, prompt files, and (optionally)
a running gateway. Exits 0 if everything passes, 1 if anything fails.
brigade doctor
brigade doctor --gateway ws://127.0.0.1:7777brigade config
Read and write the local config without opening the TUI.
brigade config list
brigade config get defaultProvider
brigade config set defaultProvider anthropic
brigade config unset thinkingLevelKnown keys: defaultProvider, defaultModelId, thinkingLevel,
fallbackProvider, fallbackModelId, installedAt.
In-chat commands
When you're in the chat TUI (whether via brigade or brigade connect):
| Command | What it does |
|---------------------|-------------------------------------------------------------|
| /model | Switch to a different configured model (picker) |
| /model <id> | Switch directly by model id |
| /provider | Add a new provider mid-session — no restart required |
| /thinking <level> | Adjust reasoning effort (off, minimal, low, medium, high) |
| /compact | Force a context compaction now |
| /help | Show all commands |
| /exit | Quit Brigade |
Keyboard:
- Enter — send (mid-turn submits steer the model without aborting)
- Ctrl+C — stop the current response (doesn't exit)
- Ctrl+D — quit
- ↑ / ↓ — message history
Supported providers
Out of the box: Anthropic, OpenAI, Google Gemini, OpenRouter, Groq, xAI,
Cerebras, DeepSeek, Mistral, Ollama (local), and Custom
OpenAI-compatible endpoints (Together AI, Fireworks, vLLM, on-prem
gateways, anything that speaks /v1/chat/completions).
You can mix and match — connect three providers, switch between their
models with /model, and Brigade keeps your conversation context
across the switch.
Privacy
Brigade is a local CLI. Your API keys never leave your computer; they're stored in your home directory and used only to talk to the providers you connect. No telemetry, no analytics, no cloud component.
For Ollama and Custom endpoints, requests stay entirely on your network.
