CoralBricks

The coralbricks CLI

Open Claude Code, Codex, OpenCode or Pi on CoralBricks with one command. Your own agent setup is never edited.

coralbricks signs your terminal in through the browser, then opens the coding agent you already use with CoralBricks as its provider: the base URL, the key and the model are set for that session only. Close the agent and your own config is exactly as it was.

1. Install and sign in

npm install -g coralbricks
coralbricks login

coralbricks login opens the console. Check that the code on the page matches the one in your terminal, then press Connect terminal. The console creates a key named CLI (Terminal) for that terminal and hands it over encrypted to it; you can revoke it on API keys at any time.

  • On a remote machine (SSH), run coralbricks login --no-browser, open the address it prints on any computer, and paste the code the page shows.
  • To use a key you already have, run coralbricks login --manual and paste it.
  • CORALBRICKS_API_KEY in your environment wins over the stored login. Set CORALBRICKS_DEVICE_NAME to name the key after the machine.

2. Open your agent

coralbricks claude      # Claude Code
coralbricks codex       # Codex CLI
coralbricks opencode    # OpenCode (also: coralbricks oc)
coralbricks pi          # Pi

The agent itself has to be installed; if it isn't, the CLI says how. Pick a model with -m, and pass the agent's own arguments after --:

coralbricks codex -m deepseek-v4.1-flash-fast
coralbricks claude -- -p "explain this repo"
coralbricks codex -- exec "fix the failing test"
coralbricks again       # reopen the last agent and model

3. Everything else

Command What it does
coralbricks models The models your key can call, with context window, price and recent speed
coralbricks status Which key is in use, whether it works, and which agents are installed
coralbricks env Export lines for any other harness or SDK: eval "$(coralbricks env)"
coralbricks claude --dry-run What would run, with the key masked; writes and starts nothing
coralbricks logout Removes the stored key from this machine

What each launch sets

Agent How it's pointed at CoralBricks
Claude Code ANTHROPIC_BASE_URL, the key and every model tier in a session-only --settings file and the environment; context window set to the model's
Codex CLI -c overrides for a coralbricks provider on the Responses API and the hosted model catalog; your Codex home, sessions and codex resume stay yours
OpenCode A config layer in OPENCODE_CONFIG_CONTENT with every model your key can call; OpenCode 2 runs it on a private server (--standalone)
Pi A temporary agent directory holding your own models.json plus a CoralBricks provider; sessions are kept between launches

The key is stored at ~/.config/coralbricks/credentials.json (readable only by you). Session files live under ~/.cache/coralbricks/sessions and are removed when the agent exits. Prefer to set an agent up by hand? See its guide under Coding agents.