A fast, autonomous, multi-model AI coding agent for your terminal.
thakurcode brings an intelligent coding assistant directly into your terminal. It reads, writes, and edits files, executes shell commands, runs tests, and integrates with custom MCP tools — while keeping you in full control with interactive permission approval gates.
Installation • Quick Start • Interactive TUI • Commands • Headless Mode • MCP Extensibility
- Terminal UI (TUI): Fast, responsive terminal interface with streaming model responses, real-time tool logs, and live context tracking.
- Universal Model Support: Connect to Anthropic (Claude 3.7 Sonnet / 3.5 Sonnet), OpenAI (GPT-4o / o3-mini), Google (Gemini 2.5 Pro / Flash), or OpenRouter (DeepSeek, Llama 3, and 200+ models).
- Full Coding Capabilities: Inspects files, performs fast regex searches via ripgrep, edits code surgically, and runs bash commands.
- Permission Safety First: Every file modification and command execution requires your explicit approval (
Allow once,Always this session,Deny). - Model Context Protocol (MCP): Easily plug in external tools like databases, browser automation, and custom scripts via stdio MCP.
- Context Awareness & Resume: Smart memory management with auto-compaction and seamless session resuming (
--continue). - Headless Automation: Run automated tasks, CI reviews, and batch edits via
thakurcode run "...". - Single-Binary Zero Setup: Pre-compiled standalone binaries with no runtime or package dependencies required.
Install or update thakurcode with a single command:
curl -fsSL https://raw.githubusercontent.com/thakurdotdev/thakur-cli/main/install.sh | bashRun in PowerShell:
powershell -c "irm https://raw.githubusercontent.com/thakurdotdev/thakur-cli/main/install.ps1 | iex"You can also download pre-built binaries directly from GitHub Releases:
| Platform | Executable Asset |
|---|---|
| macOS (Apple Silicon) | thakurcode-darwin-arm64 |
| macOS (Intel) | thakurcode-darwin-x64 |
| Linux (x86_64) | thakurcode-linux-x64 |
| Linux (ARM64) | thakurcode-linux-arm64 |
| Windows (x64) | thakurcode-windows-x64.exe |
Open your terminal in any project directory and run:
thakurcodeIf no key is configured on first launch, thakurcode opens an interactive setup prompt. Select your provider, paste your API key, and you're ready to go.
Store your keys once from the terminal:
# OpenRouter (Access 200+ models with one key — recommended)
thakurcode auth openrouter sk-or-...
# Anthropic (Claude 3.7 Sonnet, Claude 3.5 Sonnet)
thakurcode auth anthropic sk-ant-...
# OpenAI (GPT-4o, o3-mini)
thakurcode auth openai sk-proj-...
# Google Gemini (Gemini 2.5 Pro, Flash)
thakurcode auth google AIza...You can also use standard environment variables:
export OPENROUTER_API_KEY="sk-or-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-proj-..."
export GOOGLE_GENERATIVE_AI_API_KEY="AIza..."Check your connection status at any time:
thakurcode authOnce running, type your instructions naturally in the prompt. thakurcode investigates your codebase, proposes changes, and asks for confirmation before executing actions.
Type / at the prompt to access built-in commands:
| Command | Action |
|---|---|
/models |
Open the interactive model picker (browse live catalog, search, filter free models, recents) |
/model |
Show current model, provider, and context window utilization |
/model <provider:model> |
Switch models instantly (e.g. /model anthropic:claude-sonnet-4-5) |
/connect |
Add or update provider API keys without leaving your chat |
/clear |
Clear the visual terminal screen while preserving session context |
/help |
Display quick help and shortcuts |
/exit, /quit |
Exit thakurcode (sessions are saved automatically) |
Enter: Submit prompt or confirm selection↑/↓: Cycle through command history or navigate menusTab: Autocomplete slash commands and model namesCtrl+J: Insert a line break for multi-line instructionsEsc: Close open dialogs or interrupt generationCtrl+C: Stop current tool execution; exit when idle
thakurcode is designed to be safe on your local machine:
- Safe Inspection: Read operations (
read_file,grep,glob,list_dir) are safe and run automatically. - Confirmation Prompts: Any action that modifies files (
write_file,edit_file) or executes shell commands (bash) requests your permission:- Allow once (
y): Approve this execution. - Always this session (
a): Approve this command or tool for the entire session. - Deny (
d): Reject the execution with feedback sent to the model.
- Allow once (
- Secret Protection: Sensitive environment variables matching passwords, keys, and tokens are automatically masked (
***REDACTED***). - Sandbox Mode: For CI or disposable docker environments, pass
--yoloto bypass prompts (thakurcode --yolo).
Use thakurcode run for non-interactive automation, CI/CD checks, and terminal pipelines:
# Run a single task
thakurcode run "Fix type errors across src/ and run the test suite"
# Pipe input via stdin
git diff main | thakurcode run "Summarize these changes into clean commit notes"
# Resume previous session in headless mode
thakurcode run --continue "Now generate documentation for the changes you made"
# Output structured JSON for automation
thakurcode run --format json "Audit package dependencies" > report.jsonname: Code Review Agent
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install thakurcode
run: curl -fsSL https://raw.githubusercontent.com/thakurdotdev/thakur-cli/main/install.sh | bash
- name: Run Review
run: |
~/.thakurcode/bin/thakurcode run --yolo "Review git diff origin/main...HEAD and identify potential bugs"
env:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}Extend thakurcode with custom tools using the Model Context Protocol (MCP). Configure your servers in .harness.json in your repository root:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost:5432/mydb"]
}
}
}Connected tools are automatically discovered and become available to the agent with the same permission gates as built-in tools.
This project is licensed under the MIT License.