loading…
Search for a command to run...
loading…
Terminal AI coding agent for local software development
Terminal-first AI coding agent — local, permission-aware, and multi-provider.

DeepCode is an AI coding agent that runs in your terminal. It understands your codebase, executes tools safely, and works with multiple LLM providers (Anthropic, OpenAI, DeepSeek, Groq, Ollama, OpenRouter, MCP).
Unlike cloud-first agents, DeepCode operates locally with a permission model you control — read, write, shell, and dangerous operations each have configurable approval policies.
Example: listing your projects
$ deepcode
> list my projects
Scanning for git repositories in ~/...
Found 3 projects:
- ~/repos/my-api
- ~/repos/frontend
- ~/work/cli-tool
No git repositories found.
-> You have unversioned projects? Tell me the folder and I can initialize git for you.
Key behaviors:
| User asks | DeepCode does | Cost |
|---|---|---|
"list my projects" |
Scans locally for .git directories |
0 tokens (local) |
"hello" / "hi" |
Returns greeting instantly | 0 tokens |
"what's the weather?" |
Responds as a coding agent instead of inventing an answer | 0 tokens |
"refactor auth module" |
Calls LLM, creates plan, asks approval | tokens used |
DeepCode only calls the LLM when actually needed — not for chit-chat, not for trivial discovery.
deepcode run for scripting and CI pipelines| Provider | ID | Notes |
|---|---|---|
| Anthropic | anthropic |
Claude 3.x / 4.x family |
| OpenAI | openai |
GPT-4o, o3, o4-mini |
| DeepSeek | deepseek |
deepseek-chat, deepseek-reasoner |
| Groq | groq |
Fast inference, Llama / Mixtral |
| Ollama | ollama |
Local models, no API key required |
| OpenRouter | openrouter |
Unified access to 200+ models |
| OpenCode | opencode |
opencode-go/ model prefix |
Requires Node.js 22 or newer.
npm install -g deepcode-ai
Or with pnpm:
pnpm add -g deepcode-ai
Check published channels and upgrade hints:
deepcode update
deepcode init
deepcode config set defaultProvider deepseek
deepcode config set defaultModels.deepseek "deepseek-chat"
deepcode config set providers.deepseek.apiKey "sk-..."
deepcode doctor
deepcode
Or via environment variables:
export DEEPCODE_PROVIDER=anthropic
export DEEPCODE_MODEL=claude-sonnet-4-6
export ANTHROPIC_API_KEY="sk-ant-..."
deepcode
# Interactive TUI
deepcode
deepcode chat
# Non-interactive task execution
deepcode run "fix the failing tests" --yes
deepcode run "refactor the auth module" --mode plan
# Configuration
deepcode config show --effective
deepcode config set defaultProvider openai
deepcode doctor
deepcode update
# GitHub
deepcode github login
deepcode github prs
deepcode github review 42
deepcode github merge 42
# Parallel subagents
deepcode subagents run \
--task "audit the auth module" \
--task "audit the billing module" \
--concurrency 2 --yes
Add any MCP-compatible server to ~/.deepcode/config.json:
{
"mcpServers": [
{ "name": "filesystem", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] },
{ "name": "github", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"] }
]
}
Tools from connected servers appear automatically in the agent prefixed as server__tool.
DeepCode acts on a real local repository, so safety is a first-class runtime concern:
read, write, gitLocal, shell, dangerousFull details: docs/06-security-model.md
DeepCode stores config in ~/.deepcode/config.json. Key fields:
{
"defaultProvider": "anthropic",
"defaultModel": "claude-sonnet-4-6",
"defaultModels": { "plan": "claude-opus-4-7" },
"providerRetries": 2,
"contextWindowThreshold": 0.8,
"tokenBudget": { "maxCostUsd": 1.0, "warnAtFraction": 0.8 },
"permissions": { "read": "allow", "write": "ask", "shell": "ask" },
"mcpServers": []
}
Full reference: docs/16-configuration.md
git clone https://github.com/N1ghthill/deepcode.git
cd deepcode
pnpm install
pnpm build
pnpm dev
Validation:
pnpm lint
pnpm typecheck
pnpm test
Repository layout:
apps/deepcode — publishable CLI package and entrypointpackages/cli — commands and Ink TUIpackages/core — agent runtime, providers, tools, GitHub, cachepackages/shared — schemas, types, config contractsdocs — product and engineering referenceSee CONTRIBUTING.md. Run pnpm lint && pnpm typecheck && pnpm test before opening a PR.
DeepCode is built on the shoulders of open-source projects. This repository would not exist in its current form without that foundation.
The Ink-based terminal UI is adapted from Qwen Code (Apache 2.0).
The agent architecture draws inspiration from google-gemini/gemini-cli.
While the TUI foundation comes from Qwen Code, DeepCode adds substantial original engineering:
read / write / shell / dangerous levels, path allowlist/blacklist, approval gateway, and audit logging.git directories locally without calling an LLMDeepCode is released under the MIT License. Adapted code from Qwen Code (Apache 2.0) and other open-source projects is used in compliance with their respective licenses.
Run in your terminal:
claude mcp add deepcode-ai -- npx -y deepcode-aipro tip
Just installed Deepcode Ai? Say to Claude: "remember why I installed Deepcode Aiand what I want to try" — it'll save into your Vault.
how this works →Security
Low riskAutomated heuristic from public metadata — not a security guarantee.