Code Hacker
Code Hacker - VS Code Custom Agent + Web + TUI
Ask AI about Code Hacker
Powered by Claude Β· Grounded in docs
I know everything about Code Hacker. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Code Hacker β AI Programming Expert
6 MCP Servers powering 62+ tools for a complete AI programming toolchain. Three ways to use:
| Mode | Description | Best For |
|---|---|---|
| VS Code Custom Agent | code-hacker.agent.md + VS Code Copilot Chat | IDE-integrated development |
| Web App (DeepAgent) | web_app.py β standalone web UI with subagents | Full autonomous AI programming, multi-project coordination |
| TUI (Terminal UI) | tui_app.py β Claude Code-style terminal interface | SSH / headless servers / terminal-first workflow |
All three modes share the same 6 MCP servers β start once, use anywhere.

Quick Start
One-Click Install (VS Code Custom Agent + MCP Servers)
macOS / Linux:
bash install.sh # Full install: deps + VS Code config + start servers
bash install.sh --no-vscode # Skip VS Code configuration
bash install.sh --servers-only # Only start MCP servers
Windows (PowerShell):
.\install.ps1 # Full install: deps + VS Code config + start servers
.\install.ps1 -NoVSCode # Skip VS Code configuration
.\install.ps1 -ServersOnly # Only start MCP servers
The installer will:
- Check prerequisites (Python 3.11+, uv/pip, Git)
- Install all Python dependencies
- Install GitHub Copilot extensions in VS Code
- Register MCP servers in VS Code user settings
- Start all 6 MCP servers
- Run health check to verify everything works
Manual Server Management
bash start_servers.sh # Start all 6 servers (ports 8001-8005, 8007)
bash start_servers.sh status # Check server status
bash start_servers.sh stop # Stop all servers
bash start_servers.sh restart # Restart all servers
Windows: .\stop_servers.ps1 (stop) / .\stop_servers.ps1 -Status (status)
2a. Use with VS Code (Custom Agent)
See VS Code Setup below β register servers in settings.json, place .agent.md in your project.
2b. Use with Web App (DeepAgent β Complete AI Programming Tool)
# Install dependencies
uv sync
# Start the web interface (requires OPENROUTER_API_KEY)
OPENROUTER_API_KEY=your-key uv run python web_app.py
# Open http://localhost:8000
2c. Use with TUI (Claude Code-style Terminal Interface)
# Start the TUI (requires OPENROUTER_API_KEY)
OPENROUTER_API_KEY=your-key uv run python tui_app.py
The TUI provides a Claude Code-style terminal experience β interactive prompt, streaming Markdown output with syntax highlighting, real-time tool call display (β΅ Read β β Read), command history (β/β), and slash commands (/help, /clear, /status, /quit). Built on Rich + prompt_toolkit, no extra dependencies required.
The web app (and TUI) is a complete AI programming tool built on deepagents (create_deep_agent):
- 62+ MCP tools from all 6 servers, unified into a single autonomous agent
- 4 specialized subagents: Git Archaeologist, Code Scanner, Code Reviewer, Workspace Coordinator
- Persistent memory via
FilesystemBackend+MemoryMiddleware - Task planning via
TodoListMiddleware - Hacker-style terminal UI β cyberpunk green-on-black aesthetic with real-time tool execution streaming
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β web_app.py (DeepAgent) β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β create_deep_agent( β β
β β model = claude-sonnet-4-5 (via OpenRouter) β β
β β tools = 62 tools from 6 MCP servers β β
β β subagents = [git_archaeologist, code_scanner, β β
β β code_reviewer, workspace_coordinator] β β
β β memory = ["./AGENTS.md"] β β
β β backend = FilesystemBackend β β
β β middleware = [TodoList, Memory, Summarization, PatchToolCalls] β β
β β ) β β
β ββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β MCP Protocol (streamable-http) β
β ββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β filesystem:8001 git:8002 intel:8003 memory:8004 β β
β β review:8005 multi-project:8007 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β FastAPI + WebSocket β Hacker Terminal UI (http://localhost:8000) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
3. Run Integration Tests (LLM-powered)
# Requires MCP servers running + OPENROUTER_API_KEY
NO_PROXY=localhost,127.0.0.1 uv run pytest tests/test_scenarios.py -v -s
# Run a single scenario
NO_PROXY=localhost,127.0.0.1 uv run pytest tests/test_scenarios.py::test_ydiff_commit_review -v -s
13 real scenarios covering: ydiff commit review, project health score, git history investigation, Python AST analysis, cross-file search, dependency graph, workspace registration, memory save/recall, Jenkinsfile pipeline generation, complex function detection, git blame, QA experience recording, project overview.
# Unit tests for auto_refactor two-phase commit (no MCP servers needed)
uv run pytest tests/test_refactor_commit.py -v
Tests cover: _git_commit helper, two-phase commit separation (#not-need-review / #need-review), auto_commit=False mode, commit tag format, git log --grep filtering.
Architecture
Design Philosophy
What makes Claude Code powerful is that it's not just a chat window β it's an autonomous programming Agent with a complete toolchain. It can read code, edit code, search code, run commands, manage Git, and remember context, forming a closed-loop development workflow.
Code Hacker's design goal: Replicate and surpass this closed-loop capability β usable both within VS Code Copilot Chat and as a standalone DeepAgent web app.
Core ideas:
- Separation of Concerns β Split Claude Code's capabilities into 6 independent MCP Servers, each doing one thing
- Composition over Inheritance β Assemble multiple servers into a complete Agent via agent files or DeepAgent
- Three Frontends, One Backend β VS Code, web_app.py, and tui_app.py share the same 6 MCP servers
- Security Sandbox β Each server has independent security policies (path checks, command blocklists, file whitelists)
- Surpass, Not Imitate β Code review and structural diff are capabilities Claude Code lacks, based on AST-level analysis and the ydiff algorithm
- Multi-Project First β Real development involves multiple repos (frontend+backend, app+library, service+pipeline). The workspace system treats multi-repo as a first-class concept
- Two-Phase Commit β AI code changes are split into mechanical commits (
#not-need-review) and logic commits, so human reviewers can skip identity transformations and focus on real changes
System Architecture Diagram
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Three Frontends, One Backend β
β β
β ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββββββββββ β
β β VS Code Copilot β β web_app.py β β tui_app.py β β
β β Chat β β (DeepAgent) β β (Claude Code-style TUI) β β
β β β β β β β β
β β .agent.md β β FastAPI+WS β β Rich + prompt_toolkit β β
β β tools: β β create_deep_agentβ β create_deep_agent β β
β β filesystem-*/* β β 4 subagents β β 4 subagents β β
β β git-tools/* β β Hacker Web UI β β Terminal streaming β β
β β code-intel/* β β β β β΅ Read β β Read β β
β β memory-store/* β β http://localhost β β Markdown rendering β β
β β code-review/* β β :8000 β β Command history ββ β β
β β multi-project/* β β β β /help /clear /status β β
β ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ ββββββββββββββ¬ββββββββββββββ β
β β β β β
β ββββββββββββββββββββββββΌβββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββΌββββββββββββββββββββββ β
β β 6 MCP Servers (streamable-http) β β
β β bash start_servers.sh β β
β ββββββββββββββββββββ¬ββββββββββββββββββββββ β
β β β
β βββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β filesystem.py :8001 (12 tools) β git_tools.py :8002 (11 tools) β β
β β read/write/edit/find/search β status/diff/log/blame/branch β β
β β execute_command β add/commit/stash/checkout β β
β β β β β
β β code_intel.py :8003 (5 tools) β memory_store.py :8004 (11 t.) β β
β β AST analysis, symbols β save/get/search/scratchpad β β
β β project_overview, dep graph β qa_experience_* β β
β β β β β
β β code_review.py :8005 (11 tools) β multi_project.py :8007 (15 t.) β β
β β review_project/file/function β workspace_add/search/edit/commit β β
β β health_score, find_complex β cross-repo coordination β β
β β ydiff_files/commit/changes β β β
β β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
MCP Server Responsibilities
| Server | File | Tools | Responsibility | Design Principle |
|---|---|---|---|---|
| filesystem-command | filesystem.py | 12 | File CRUD, precise editing, file search, command execution | The Agent's "hands" β foundation for all file operations. edit_file replicates Claude Code's Edit tool |
| git-tools | git_tools.py | 11 | Complete Git workflow | Dedicated tools are safer than generic commands. LLM calls structured functions without memorizing git syntax |
| code-intel | code_intel.py | 5 | Code understanding & analysis | AST parsing compensates for LLM weaknesses. project_overview generates a full project panorama in one call |
| memory-store | memory_store.py | 7 | Cross-session persistent memory | Structured JSON storage + categories/tags/search. scratchpad for complex reasoning |
| code-review | code_review.py | 11 | Code quality review + structural diff (includes ydiff tools) | Unique capability β Claude Code doesn't have this. Self-contained AST analysis engine, quantifies code quality, locates hotspots, generates reorganization suggestions. Also includes ydiff AST-level diff for interactive HTML reports |
| multi-project | multi_project.py | 15 | Multi-project workspace: cross-repo search, edit, git, coordinated commit | Unique capability β Claude Code can only work in one directory. This enables Jenkinsfile+library, frontend+backend, microservice coordination |
Data Flow: Typical Scenarios
Scenario A: Code Modification
User: "Change all print statements to logging in the project"
β project_overview(".") β Understand project structure
β‘ search_files_ag("print(", "py") β Locate all print statements
β’ read_file_lines("app.py", 10, 25) β Confirm context
β£ edit_file("app.py", old, new) β Precise replacement
β€ git_diff() β Verify changes
β₯ memory_save(...) β Remember progress
Scenario B: AI Code Review (Code Hacker Exclusive)
User: "Review this project's code quality"
β health_score("/path/to/project") β Quick score: 72/100 (B)
β‘ review_project("/path/to/project") β Full scan: 5 critical + 12 medium
β’ find_complex_functions(...) β Locate TOP 5 complex functions
β£ review_function("app.py", "process_data") β Deep analysis + refactoring suggestions
β€ ydiff_commit(".", "HEAD") β Generate structural diff HTML report
Scenario C: Multi-Project Coordinated Edit (Code Hacker Exclusive)
User: "The buildHelper function in the shared library changed, update Jenkinsfile too"
β workspace_add("/repos/shared-lib", alias="lib", role="library")
β‘ workspace_add("/repos/my-app", alias="app", role="infra")
β’ workspace_find_dependencies("buildHelper") β Trace all references across repos
β£ workspace_read_file("lib", "src/helper.py") β Read library source
β€ workspace_edit_file("lib", "src/helper.py", ...) β Edit library code
β₯ workspace_edit_file("app", "Jenkinsfile", ...) β Update pipeline accordingly
β¦ workspace_git_status() β Verify all changes across repos
β§ workspace_commit("lib,app", "feat: update buildHelper signature and pipeline")
Scenario D: Review AI-Generated Code
User: "Review this AI-generated code for me"
β review_diff_text(old_code, new_code) β Compare old/new code structural changes
β Added 3 functions, removed 1, modified 2
β β process_all: complexity 8β15β, exceeds threshold
β β handle_request: too long (62 lines)
β‘ review_function(...) β Deep analysis of problematic functions
β’ edit_file(...) β Fix issues
Two-Phase Commit: Reviewer-Friendly AI Changes
A core principle across all three frontends: when AI makes code changes, separate mechanical changes from logic changes into distinct commits.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI makes changes β split into two commits β
β β
β Commit 1: "refactor: move to handlers.py #not-need-review" β
β ββ Move functions/classes between files β
β ββ Rename variables (pure rename) β
β ββ Reformat, reorder imports β
β ββ Identity transformation β behavior unchanged β
β β
β Commit 2: "feat: add retry logic to handler" β
β ββ Add/modify business logic β
β ββ Change function behavior β
β ββ Bug fixes, new features β
β β
β Human reviewer: β
β git log --grep="#not-need-review" --invert-grep β εͺηθΏδΊ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Like math: first do the identity transformation (shape-shifting), then apply the real function. The #not-need-review commits are provably equivalent β reviewer can skip them. The remaining commits are where the real logic lives.
This applies to:
- All AI code modifications via VS Code agent, web app, or TUI β the system prompt instructs the AI to follow this pattern
Security Architecture
βββββββββββββββββββββββββββββββββββββββββββ
β Security Layer (independent per β
β server) β
βββββββββββββββββββββββββββββββββββββββββββ€
β β
β filesystem.py: β
β ββ Path safety check (blocks .. traversal) β
β ββ File type whitelist (text files only) β
β ββ File size limit (10MB) β
β ββ Command blocklist (rm/format/dd/...) β
β ββ Command timeout (30s) β
β β
β git_tools.py: β
β ββ All operations via git subcommandsβ
β ββ No force push / reset --hard β
β ββ Command timeout (30s) β
β β
β code_intel.py: β
β ββ Read-only operations β
β ββ Search result limits (prevent OOM)β
β β
β memory_store.py: β
β ββ Data isolation (.agent-memory/) β
β ββ JSON format, auditable β
β β
β code_review.py: β
β ββ All tools are read-only β
β β
β multi_project.py: β
β ββ File type whitelist (same policy) β
β ββ Command blocklist (rm/format/dd) β
β ββ Command timeout (30s) β
β ββ Workspace config in .agent-memory β
β β
βββββββββββββββββββββββββββββββββββββββββββ
Comparison with Claude Code
Feature-by-Feature Comparison
| Capability | Claude Code | Code Hacker | Winner |
|---|---|---|---|
| File Reading | Read β supports line numbers, PDF, images | read_file + read_file_lines | Claude Code (multimodal) |
| File Writing | Write β create or overwrite | write_file + append_file | Tie |
| Precise Editing | Edit β oldβnew replacement | edit_file β same pattern | Tie |
| File Search | Glob β ripgrep | find_files β pathlib.rglob | Claude Code (faster) |
| Content Search | Grep β ripgrep | search_files_ag β Silver Searcher | Tie |
| Command Execution | Bash β full shell, background | execute_command β security sandbox | Claude Code (more powerful) / Code Hacker (safer) |
| Git Operations | Bash + git commands | 11 dedicated git tools | Code Hacker |
| Code Analysis | LLM reading | AST parsing + symbol extraction | Code Hacker |
| Project Understanding | Agent multi-round exploration | project_overview one-call | Code Hacker |
| Dependency Analysis | None | dependency_graph | Code Hacker |
| Persistent Memory | Markdown filesystem | Structured JSON + categories/tags | Code Hacker |
| Web Access | WebFetch + WebSearch | fetch (VS Code built-in) | Claude Code (search) |
| Code Review | No dedicated tools | review_project/file/function + health_score | Code Hacker Exclusive |
| Structural Diff | None (line-level diff only) | ydiff_files/commit/git_changes β AST-level (in code-review server) | Code Hacker Exclusive |
| Change Review | None | review_diff_text β quantify old/new code differences | Code Hacker Exclusive |
| Multi-Project Workspace | Single directory only | workspace_* β 15 tools for cross-repo search, edit, git, coordinated commit | Code Hacker Exclusive |
| HTML Reports | None | generate_report β visual quality reports | Code Hacker Exclusive |
| Sub-agents | Agent parallel spawning | 4 DeepAgent subagents (web_app.py) | Tie |
| Images/PDF | Supported | Not supported | Claude Code |
| Notebook | NotebookEdit | Not supported | Claude Code |
Advantage Summary
Code Hacker Exclusive/Superior (9 items):
- Code Review:
review_project/file/functionquantifies code quality β Claude Code has nothing comparable - Structural Diff:
ydiff_files/commitAST-based diff that understands code moves/renames (now in code-review server) β Claude Code only has line-level diff - Change Review:
review_diff_textcompares old/new code structural changes, quantifies complexity direction - Multi-Project Workspace:
workspace_*15 tools for cross-repo search, edit, git, coordinated commit β Claude Code is locked to a single directory - Health Score:
health_scoreone-click project scoring 0-100 - Git Operations: 11 structured tools vs. hand-written git commands
- Code Analysis: Precise AST parsing vs. LLM reading/guessing
- Project Overview: Single call vs. multi-round exploration
- Memory System: Structured JSON vs. Markdown files
Claude Code Superior (4 items):
- Command Execution: Full Bash shell + pipes + background processes
- Multimodal: Image + PDF reading
- Web Search: Search engine retrieval
- Notebook Editing
Coverage
Claude Code Core Capability Coverage:
File Operations ββββββββββββββββββββ 100% (Read/Write/Edit/Glob/Grep)
Git Operations ββββββββββββββββββββ 100% (even finer-grained)
Command Exec ββββββββββββββββββββ 70% (missing background, pipes)
Code Analysis ββββββββββββββββββββ 100%+ (AST parsing surpasses)
Persistent Mem ββββββββββββββββββββ 100%+ (structured storage surpasses)
Code Review ββββββββββββββββββββ β% (Claude Code lacks this)
Structural Diff ββββββββββββββββββββ β% (Claude Code lacks this)
Multi-Project ββββββββββββββββββββ β% (Claude Code lacks this)
Web Access ββββββββββββββββββββ 70% (missing search engine)
Sub-agents ββββββββββββββββββββ 100% (4 subagents in web_app.py)
Multimodal ββββββββββββββββββββ 0% (MCP limitation)
Notebook ββββββββββββββββββββ 0% (can be extended later)
βββββββββββββββββββββββββββββββββββββββββ
Shared capability coverage ~85%
Unique capabilities +3 dimensions surpassing Claude Code
Project Files
.
βββ start_servers.sh # Start/stop/status/restart all 6 MCP servers
βββ web_app.py # DeepAgent web interface (FastAPI + WebSocket)
βββ tui_app.py # Claude Code-style TUI (Rich + prompt_toolkit)
βββ subagents.yaml # 4 subagent definitions for DeepAgent
βββ static/
β βββ index.html # Hacker-style terminal UI
βββ filesystem.py # MCP 1: File read/write, edit, search, command exec (12 tools)
βββ git_tools.py # MCP 2: Full Git operations (11 tools)
βββ code_intel.py # MCP 3: AST analysis, symbol extraction, dependency graph (5 tools)
βββ memory_store.py # MCP 4: Persistent memory + scratchpad + QA experience (11 tools)
βββ code_review.py # MCP 5: Code quality review + structural diff / ydiff (11 tools)
βββ multi_project.py # MCP 6: Multi-project workspace β cross-repo ops (15 tools)
βββ lib/
β βββ __init__.py
β βββ ydiff_python.py # AST structural diff engine
β βββ refactor_auto.py # Auto-refactoring engine (function/file splitting)
βββ tests/
β βββ conftest.py # LLM test fixtures (DeepAgent session, run_agent_query)
β βββ test_scenarios.py # 13 real code hack scenarios (LLM-powered pytest)
β βββ test_refactor_commit.py # Unit tests: two-phase commit strategy (#not-need-review / #need-review)
βββ code-hacker.agent.md # VS Code agent definition (system prompt + tool bindings)
βββ .vscode/
β βββ mcp.json # MCP server registration (reference; actual config in user settings)
βββ pyproject.toml # Dependencies (deepagents, langchain, mcp, fastapi, ...)
βββ README.md
Prerequisites
- Python 3.11+
- Git
- uv (recommended) or pip
For VS Code mode:
- VS Code 1.99+
- GitHub Copilot Chat extension
For Web App / TUI mode:
- OPENROUTER_API_KEY (or OPENAI_API_KEY)
# Install dependencies
uv sync # recommended
# or: pip install mcp deepagents langchain langchain-openai langchain-mcp-adapters langgraph fastapi uvicorn
Optional (recommended): Install The Silver Searcher for faster code search:
# macOS
brew install the_silver_searcher
# Ubuntu/Debian
sudo apt install silversearcher-ag
# Termux
pkg install the_silver_searcher
You can also set the AG_PATH environment variable to specify a custom path to the ag binary.
Installation & Configuration
Step 1: Start MCP Servers
All 6 MCP servers use streamable-http transport. Start them all at once with:
bash start_servers.sh # Start all 6 servers
bash start_servers.sh status # Check which servers are running
bash start_servers.sh stop # Stop all servers
bash start_servers.sh restart # Restart all servers
Or start individually:
python filesystem.py # Port 8001
python git_tools.py # Port 8002
python code_intel.py # Port 8003
python memory_store.py # Port 8004
python code_review.py # Port 8005
python multi_project.py # Port 8007
Note: If you have a local HTTP proxy (e.g., on port 7890), set
NO_PROXY=localhost,127.0.0.1before starting clients to avoid 502 errors.
Once servers are running, you can use them with any combination of VS Code, Web App, and TUI β all three can run simultaneously.
Step 2 (VS Code): Register MCP Servers
Open settings.json (Ctrl+Shift+P β Preferences: Open User Settings (JSON)) and add the following:
{
"mcp": {
"servers": {
"filesystem-command": {
"type": "sse",
"url": "http://localhost:8001/mcp"
},
"git-tools": {
"type": "sse",
"url": "http://localhost:8002/mcp"
},
"code-intel": {
"type": "sse",
"url": "http://localhost:8003/mcp"
},
"memory-store": {
"type": "sse",
"url": "http://localhost:8004/mcp"
},
"code-review": {
"type": "sse",
"url": "http://localhost:8005/mcp"
},
"multi-project": {
"type": "sse",
"url": "http://localhost:8007/mcp"
}
}
}
}
Step 3 (VS Code): Verify MCP Connection
After adding the configuration, VS Code's status bar will show MCP server status. Ensure all 6 servers are shown as connected.
If not connected, check:
- All 6 server processes are running (
bash start_servers.sh status) - Ports 8001-8005, 8007 are not occupied by other processes
Step 4 (VS Code): Place Agent File
Place code-hacker.agent.md in the project root directory you want to use it in.
Key configuration β the
toolsfield must use theserver-name/*wildcard format:tools: ["filesystem-command/*", "git-tools/*", "code-intel/*", "memory-store/*", "code-review/*", "multi-project/*", "fetch"]
fetchis a VS Code built-in tool and requires no additional configuration.
Step 5 (VS Code): Start Using
- Open the project containing
code-hacker.agent.mdin VS Code - Open the Copilot Chat panel (
Ctrl+Shift+I) - Select Code Hacker in the mode selector at the top
- Start chatting
Troubleshooting: If Code Hacker doesn't appear in the mode selector:
- Confirm VS Code >= 1.99
- Confirm
.agent.mdfile is in the workspace root- Restart VS Code
Step 2 (Web App): Start DeepAgent Web Interface
# Set your API key
export OPENROUTER_API_KEY=your-key
# Optional: customize models
export LLM_MODEL=anthropic/claude-sonnet-4-5-20250514 # main agent
export LLM_SUBAGENT_MODEL=anthropic/claude-haiku-4-5-20251001 # subagents (cheaper)
export LLM_BASE_URL=https://openrouter.ai/api/v1
# Start the web app
uv run python web_app.py
# Open http://localhost:8000
The web app connects to all 6 MCP servers, loads 62+ tools, creates a DeepAgent with 4 subagents, and serves a WebSocket-based chat UI with real-time tool execution streaming.
Step 2 (TUI): Start Claude Code-style Terminal Interface
# Set your API key
export OPENROUTER_API_KEY=your-key
# Start the TUI
uv run python tui_app.py
The TUI provides the same DeepAgent backend as the web app but with a terminal-native interface:
- Streaming output with Rich Markdown rendering and syntax highlighting
- Tool call display in Claude Code style:
β΅ Read file.pyββ Read - Command history with β/β arrow keys
- Slash commands:
/help,/clear,/status,/quit - Interrupt support: Ctrl+C to cancel current operation
Ideal for SSH sessions, headless servers, or developers who prefer staying in the terminal.
Full Tool List
filesystem-command (12 tools)
| Tool | Description |
|---|---|
read_file | Read file content, supports utf-8/gbk/gb2312 encodings |
read_file_lines | Read specific line range, suitable for large files |
write_file | Write to file |
append_file | Append content to file |
edit_file | Precise string replacement (pass old_string β new_string) |
find_files | Glob pattern recursive file search |
search_files_ag | Regex file content search (similar to ripgrep) |
list_directory | List directory contents |
get_file_info | File details (size, timestamps, permissions) |
create_directory | Recursively create directories |
get_current_directory | Get working directory |
execute_command | Execute system commands (dangerous commands blocked) |
git-tools (11 tools)
| Tool | Description |
|---|---|
git_status | Working tree status |
git_diff | View changes (supports staged) |
git_log | Commit history |
git_show | View commit content or file at specific revision |
git_branch | List branches |
git_create_branch | Create new branch |
git_checkout | Switch branches/restore files |
git_add | Stage files |
git_commit | Commit |
git_stash | Stash management (push/pop/list) |
git_blame | Line-by-line change attribution |
code-intel (5 tools)
| Tool | Description |
|---|---|
analyze_python_file | Python AST deep analysis (classes, functions, imports, docstrings) |
extract_symbols | Extract symbol definitions (Python/JS/TS/Java/Go/Rust) |
project_overview | Project panorama (directory tree, language distribution, entry points, config) |
find_references | Cross-file symbol reference search |
dependency_graph | File import/imported-by relationship analysis |
memory-store (7 tools)
| Tool | Description |
|---|---|
memory_save | Save memory (supports categories and tags) |
memory_get | Retrieve specific memory |
memory_search | Search memories (by keyword/category/tag) |
memory_list | List all memories |
memory_delete | Delete memory |
scratchpad_write/read/append | Temporary scratchpad (for complex reasoning) |
code-review (11 tools)
| Tool | Description |
|---|---|
review_project | Scan entire project: health score + issue list + reorganization suggestions |
review_file | Single file analysis, functions ranked by complexity |
review_function | Deep analysis of a specific function with concrete refactoring suggestions |
health_score | Quick project health score (0-100) |
find_long_functions | Longest functions ranking |
find_complex_functions | Highest complexity functions ranking |
suggest_reorg | File reorganization suggestions (by naming patterns and class distribution) |
review_diff_text | Compare old/new code strings, analyze change impact |
ydiff_files | Structural AST-level diff: compare two Python files |
ydiff_commit | Git commit structural diff, multi-file HTML report |
ydiff_git_changes | Compare structural changes between any two git refs |
multi-project (15 tools)
| Tool | Description |
|---|---|
workspace_add | Register a project into the workspace (with alias, role, description) |
workspace_remove | Remove a project from the workspace |
workspace_list | List all projects with live git status |
workspace_overview | High-level overview of all projects (languages, configs, structure) |
workspace_search | Regex/text search across all workspace projects |
workspace_find_files | Glob pattern file search across all projects |
workspace_find_dependencies | Trace a symbol across all projects (cross-repo impact analysis) |
workspace_read_file | Read a file from any project by alias |
workspace_edit_file | Precise string replacement in any project |
workspace_write_file | Write/create a file in any project |
workspace_git_status | Bird's-eye git status across all repos |
workspace_git_diff | Diff summary across all repos |
workspace_git_log | Recent commits across all repos |
workspace_commit | Coordinated commit with same message across multiple repos |
workspace_exec | Execute a shell command in the context of any project |
VS Code Built-in
| Tool | Description |
|---|---|
fetch | Fetch web page/API content |
Usage Examples
You: Analyze this project's architecture
β project_overview β find_files β analyze_python_file β output analysis report
You: Change all print statements to logging
β search_files_ag to locate β read_file_lines to confirm context β edit_file to replace each
You: Who introduced this bug?
β git_blame β git_show β locate the commit and author that introduced the bug
You: Remember: this project's API should use the /api/v2 prefix
β memory_save to persist, auto-recalled in next session
You: Look up FastAPI middleware docs
β fetch to retrieve documentation content and summarize
You: Register my frontend and backend repos, then search for all API endpoints
β workspace_add Γ 2 β workspace_search("@app.route\|@router") across both repos
You: The shared library's buildHelper changed, update the Jenkinsfile too
β workspace_find_dependencies("buildHelper") β workspace_edit_file Γ 2 β workspace_commit
You: Show me what's changed across all my projects
β workspace_git_status β workspace_git_diff
Customization & Extension
Add File Type Whitelist
Edit ALLOWED_EXTENSIONS in filesystem.py.
Modify Command Blocklist
Edit BLOCKED_COMMANDS in filesystem.py.
Adjust Agent Behavior
Edit the system prompt in code-hacker.agent.md.
Add New MCP Server
- Create a new
.pyfile usingFastMCPto define tools - Run it with SSE transport on an available port
- Register the server URL in VS Code
settings.json - Add
"new-server-name/*"to thetoolsfield incode-hacker.agent.md
License
MIT
