Coder Agent is a terminal-native AI coding agent that understands your codebase and executes multi-step engineering tasks. It supports both single-agent and coordinator/worker modes.
- Node.js >= 18 (Node 22+ recommended)
- pnpm (for development installs)
- An API key from at least one provider:
curl -fsSL https://raw.githubusercontent.com/AgenticMatrix/Coder-Agent/main/install.sh | bashThe installer will:
- Verify your Node.js version
- Install
coder-agentglobally via npm - Create
~/.coder/with session storage and skill directories - Prompt you to configure your Anthropic API key
npm install -g coder-agentgit clone https://github.com/AgenticMatrix/Coder-Agent.git
cd coder-agent
pnpm install
pnpm build
pnpm link --globalCoder Agent supports multiple LLM providers. Set at least one:
# Anthropic (default)
export CODER_API_KEY=sk-ant-...
# DeepSeek
export DEEPSEEK_API_KEY=sk-...
# OpenAI
export OPENAI_API_KEY=sk-...Add the export to your shell config (~/.zshrc or ~/.bashrc) to persist
across terminal sessions.
Set the provider and model in ~/.coder/settings.json:
provider: deepseek
model: deepseek-v4-proOr via environment variables:
export CODER_PROVIDER=deepseek
export CODER_MODEL=deepseek-chatSee Configuration for all options.
Start an interactive TUI session in your project directory:
cd my-project
coderThe Terminal UI shows:
- The conversation with the agent
- Tool calls and their results
- Permission prompts for file writes and shell commands
- Session cost and token usage
Ask a single question without entering interactive mode:
coder "Explain the authentication flow in this project"Run a coordinator that delegates work to parallel worker agents:
coder --coordinator "Fix all TypeScript errors across the codebase"Control the number of workers:
coder --coordinator --workers 4 "Write tests for all untested modules"# Resume the most recent session
coder --continue
# Resume a specific session by ID
coder --resume sess_abc123Create a new session from a previous conversation at a specific turn:
coder --fork-session sess_abc123 --fork-turn 5Create a CODER.md file at the root of your project to give the agent
project-specific context. This file is read automatically at the start of every
session. (Also supports CLAUDE.md and CODEBUDDY.md for compatibility.)
# Project Overview
This is a Next.js e-commerce application with Prisma ORM and PostgreSQL.
## Architecture
- `src/app/` — Next.js App Router pages
- `src/components/` — Shared React components
- `src/lib/` — Utilities and business logic
- `prisma/` — Database schema and migrations
## Conventions
- Use TypeScript strict mode
- Tests use Vitest with React Testing Library
- API routes follow RESTful conventions
- Commit messages follow Conventional Commits
## Environment
- Node 20+
- PostgreSQL 16
- Redis for session cachingSessions are stored in ~/.coder/sessions/ as JSON files. Each session contains:
- The full message transcript
- Checkpoints at each turn boundary
- Tool usage history
- Cost and token tracking
| Key | Action |
|---|---|
Enter |
Send message |
Ctrl+C |
Interrupt agent / exit |
Ctrl+L |
Clear screen |
Ctrl+R |
Toggle reasoning display |
↑ / ↓ |
Navigate history |
Coder Agent asks for permission before executing file writes or shell commands. You can configure the permission mode:
# Always ask (default)
coder --permission default
# Auto-accept safe operations
coder --permission accept-edits
# Bypass all prompts (use with caution)
coder --permission bypass- Configuration Reference — all config options