Appearance
Getting Started
This guide gets Radar running from the CLI first. After that, connect it to your AI agent through MCP or project rules.
Prerequisites
- Node.js 20 or newer.
- pnpm, npm, or another package manager that can install npm packages.
- An API key for an OpenAI-compatible worker model provider.
Install Radar
bash
pnpm install -g @contextrail/radarConfigure A Worker Model
Set an API key:
bash
export RADAR_API_KEY=sk-...Radar defaults to Moonshot / Kimi:
bash
export RADAR_BASE_URL=https://api.moonshot.ai/v1
export RADAR_MODEL=kimi-k2.5Any OpenAI-compatible chat completions endpoint can work.
Try The CLI
Ask Radar to read a couple of files and return a short answer:
bash
radar ask -p package.json README.md -q "What is this package for?"Summarize a long test output:
bash
pnpm test 2>&1 | radar summarize --stdin -f "focus on failures and root causes"Draft a file without writing it:
bash
radar write --dry-run \
-s "test file matching this style" \
-c test/service.test.ts \
-t test/new-feature.test.tsAdd Agent Routing Rules
Installing Radar does not automatically modify your project. Copy the routing rules you want into the consuming project:
AGENTS.mdfor general agent guidance..cursor/rules/radar-delegation.mdcfor Cursor.CLAUDE.mdfor Claude Code.
See MCP Clients and the integration guides for client-specific setup.
Next Steps
- Read the Delegation Model.
- Add an MCP client config from MCP Clients.
- Try the Documentation Updates recipe.