Documentation Menu
Claude Code CLI
Use the pre-installed Claude Code CLI in your gateway for coding tasks, file editing, and project scaffolding — no setup required.
On this page
What It Is
Every BrainRoad gateway ships with Claude Code pre-installed as a native binary at ~/.local/bin/claude. It is ready to use from the Console the moment your agent starts.
Claude Code is Anthropic’s official CLI for Claude. It can read and edit files, run shell commands, search codebases, and handle multi-step coding tasks — all from your agent’s terminal.
Requirements
Claude Code requires an Anthropic API key. Add one from Dashboard → API Keys → Add Provider → Anthropic, or set it directly in the console:
export ANTHROPIC_API_KEY="sk-ant-your-key-here"
If you only have an OpenRouter key configured, Claude Code will not work — it needs a direct Anthropic key.
Quick Start
Open the Console tab in your dashboard and run:
claude "explain what files are in the current directory"
For an interactive session:
claude
This drops you into a REPL where you can have a back-and-forth conversation with Claude while it reads and modifies files in your agent’s filesystem.
Common Use Cases
Generate a Script
claude "write a Python script that monitors a URL and sends a notification if it goes down"
Edit Existing Files
claude "add error handling to entrypoint.sh for the case where the config file is missing"
One-Shot Commands
Use --print for non-interactive output (useful in scripts):
claude --print "summarize the OpenClaw config at /home/node/.openclaw/openclaw.json"
Project Scaffolding
claude "create a new Express.js API with TypeScript, health check endpoint, and a Dockerfile"
How It Differs from Your Agent
Your BrainRoad agent (OpenClaw) handles conversations, messaging channels, web browsing, and long-running tasks. Claude Code is a focused coding tool for file operations and development work inside the container.
They complement each other: use your agent for ongoing work and communication, and Claude Code for specific coding tasks via the console.
Also Pre-Installed
Your gateway includes other developer tools ready to use:
| Tool | Command | What It Does |
|---|---|---|
| OpenAI Codex CLI | codex | OpenAI’s coding agent (requires OPENAI_API_KEY) |
| Homebrew | brew | Install additional packages |
| uv | uv | Fast Python package manager |
| Bun | bun | Fast JavaScript runtime and package manager |
| Node.js 24 | node | JavaScript runtime |
Related Docs
- Console Overview — how to access the terminal
- Running Commands — navigation and command basics
- Adding API Keys — configure your Anthropic key