A terminal coding agent designed by a final-year student.
Nanocode is an AI-powered terminal coding agent that can:
- Read, write, and edit files
- Search through codebases
- Execute shell commands
- Manage task checklists
- Spawn sub-agents for parallel tasks
- Fetch and parse web content
- Plan complex tasks using read-only tools
- Delegate substantial coding tasks to the Codex App Server
- Python 3.10+
OPENROUTER_API_KEYenvironment variable (or a.openrouter_keyfile)FIRECRAWL_API_KEYenvironment variable (or a.firecrawl_keyfile) — optional, only needed for web fetching- Codex CLI
0.149.0+onPATH— optional, only needed for Codex delegation
pip install -e .Run interactively:
nanocodeRun with a prompt:
nanocode "Refactor main.py to use dataclasses"Plan mode (read-only, no file modifications):
nanocode --plan "How would you structure a new Flask app?"NanoCode can delegate a coding task to the local Codex App Server through the
delegate_to_codex tool. The client starts Codex over stdio, initializes a
JSON-RPC session, creates a thread, submits the task, streams the response, and
returns the final result to NanoCode.
Install and verify Codex before using delegation:
codex --version
codex app-server --helpDelegated coding tasks are protected by NanoCode's normal permission gate. Once approved, the Codex sub-agent can inspect, edit, and test the project in the current working directory.
MIT