A terminal-based AI coding assistant built in Rust.
- Real-time Streaming: See responses as they're generated with live markdown rendering
- Tool Execution: Bash for everything on the system, plus web fetch and search
- Sub-agents: Spawn background agents for research tasks
- Session Persistence: Continue previous sessions with full context restoration
- Subscription or API billing: runs on the Claude Agent SDK via the
claudebinary (subscription login orANTHROPIC_API_KEY)
brew install tcdent/tap/codeyDownload the latest release for your platform from GitHub Releases:
- macOS (Apple Silicon):
codey-darwin-arm64.tar.gz - Linux (x86_64):
codey-linux-x86_64.tar.gz - Linux (ARM64):
codey-linux-arm64.tar.gz
# Example for macOS ARM
tar -xzf codey-darwin-arm64.tar.gz
sudo mv codey-darwin-arm64 /usr/local/bin/codeygit clone https://github.com/tcdent/codey.git
cd codey
make release
sudo cp target/release/codey /usr/local/bin/- Claude CLI (required): Codey drives the
claudebinary via the Claude Agent SDK. Install it from https://docs.claude.com/claude-code and make sureclaudeis on yourPATH. - Authentication: handled by the
claudebinary — log in once withclaude(subscription) or setANTHROPIC_API_KEYfor pay-as-you-go.
# Start a new session
codey
# Continue from previous session
codey --continue
# Specify a working directory
codey --working-dir /path/to/projectCodey itself stores no credentials — the claude binary it drives owns auth.
Codey runs the binary with CLAUDE_CONFIG_DIR=~/.codey/claude so its settings,
sessions, and credentials stay isolated from your interactive ~/.claude.
Subscription logins live in that dir, so the one-time login must be run with it
set; API keys come from the environment and need no login:
# Subscription login (one time, stored under ~/.codey/claude)
CLAUDE_CONFIG_DIR=~/.codey/claude claude # then /login
# Or use an API key (pay-as-you-go)
export ANTHROPIC_API_KEY="sk-ant-..."Copy config.example.toml to ~/.config/codey/config.toml and customize:
[agents.foreground]
model = "claude-opus-4-6"
max_tokens = 8192
[agents.background]
model = "claude-sonnet-4-5-20250929"
[ui]
theme = "base16-ocean.dark"Foreground and background agents are configured independently. Both default to claude-opus-4-6 when not specified. See config.example.toml for all available options.
Customize the agent's name and personality:
[agent]
name = "Jarvis"
system_prompt = "You are Jarvis, a sophisticated AI assistant."The name appears in the chat header and welcome message (default: "Codey"). The system_prompt replaces the default intro paragraph while keeping the built-in capabilities and guidelines.
You can extend Codey's system prompt by creating SYSTEM.md files that are automatically appended to the base prompt. These files are loaded from two locations (in order):
- User config:
~/.config/codey/SYSTEM.md- personal customizations - Project:
.codey/SYSTEM.md- project-specific instructions
SYSTEM.md files support esh (Embedded SHell) syntax, allowing you to embed shell commands that are executed dynamically. This is useful for including context that changes over time.
## Environment
- Today's date: <%= $(date +"%m-%d-%Y") %>
- Project root: <%= $(pwd) %>
<% if which linctl > /dev/null 2>&1; then -%>
Use linctl to manage Linear tickets.
<% fi -%>
## Guidelines
- Follow the existing code styleCommands are re-executed on every LLM request, so the prompt always reflects the current state of your environment. Note that this may cause cache invalidation if command output changes between requests.
| Key | Action |
|---|---|
Enter |
Send message |
Shift+Enter |
New line in input |
Esc / Ctrl+C |
Cancel (layered, see below) |
Up/Down |
Scroll chat (when input empty: history) |
PageUp/PageDown |
Page scroll |
Esc and Ctrl+C use layered cancellation that stacks based on what's happening:
- Running foreground tool → cancels the tool (kills the process), error is sent to the agent which continues its turn
- Agent streaming → ends the turn entirely
- Idle → clears the input
Background tasks are never affected by cancel.
Codey provides five tools, and runs them without asking: allowing and denying belongs to the shell environment the agent runs in.
| Tool | Description |
|---|---|
shell |
Execute bash commands with optional working directory; reading, searching and editing files all go through it |
fetch_url |
Fetch content from URLs (HTTP/HTTPS) |
web_search |
Search the web and return results |
spawn_agent |
Spawn a sub-agent for research/analysis tasks; its result arrives as a notification |
list_agents |
List all sub-agents and their status |
Sessions are saved to .codey/transcripts/ in the working directory. Use codey --continue to resume with full context restoration.
MIT