This project has been archived by its maintainers, and is no longer receiving any updates.
nanocode-cli
A coding agent I use, maintain, and customize in one Python file.
Safety
Use at your own risk. nanocode can edit files and run shell commands in the environment where it starts. It does not provide sandbox isolation; use a container or VM when needed.
What it is
nanocode does not introduce a new kind of coding agent. It combines familiar features — reading and editing files, running commands, follow-ups, sessions, diffs, MCP, and skills — into a tool I use personally.
It works on real repositories, including its own: I use nanocode to build and maintain nanocode. Everything ships in one Python module, so I can change the behavior directly whenever I want the workflow to work differently.
Resuming a saved session with its conversation and tool history.
Highlights
- Prompt-cache aware: stable request prefixes let supported providers reuse work and can reach 90–99% cache hit rates;
/statusshows the reported result. - Code navigation: jump to definitions, callers, and implementations with a searchable code index.
- Live follow-ups: type while the agent works;
Enterqueues a message for the next model step, whileCtrl-Cinterrupts the current task. - Anchored edits: structured edits use
line:hashanchors and reject stale file content. - Resumable sessions: conversation, tool calls, diffs, and working memory survive
-cor--resume. - Built-in diff viewer:
/diffshows the latest round and the net session result. - MCP and skills: connect Model Context Protocol servers and load Markdown instruction packs on demand.
- Provider compatibility: OpenAI-compatible APIs and Anthropic.
Install
Requires macOS or Linux, Python 3.11+, and uv.
uv tool install nanocode-cli
nanocode --init-config
Add your provider to ~/.nanocode/config.toml:
[provider]
active = "default"
[provider.default]
url = "https://api.deepseek.com"
key = "sk-..."
model = "deepseek-v4-flash"
Then run:
nanocode
Upgrade with uv tool upgrade nanocode-cli.
Links
- Documentation — full usage guide and reference.
- Blog post — why and how it was built.
- code-symbol-index — the code index library nanocode uses.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nanocode_cli-0.9.11.tar.gz.
File metadata
- Download URL: nanocode_cli-0.9.11.tar.gz
- Upload date:
- Size: 120.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85dfc76482417fd409173c0241a9f771e118f532d7240cf20765bf6b2c6d9c9c
|
|
| MD5 |
3afdad9f4c0fddc61adb7a94c64b8452
|
|
| BLAKE2b-256 |
f6eef33130eccb1f4893b63a23fbc22ea2e1af25c2b1cad65c35c0575bfd2ea4
|
File details
Details for the file nanocode_cli-0.9.11-py3-none-any.whl.
File metadata
- Download URL: nanocode_cli-0.9.11-py3-none-any.whl
- Upload date:
- Size: 117.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
981f9bcb5280d280372428dd94b84d1afa950af9778daf4dc88936274cd372de
|
|
| MD5 |
c292749c707b73410f7bd92ac29714ba
|
|
| BLAKE2b-256 |
eff1c6587a74116143b9cd39204c70dc23ef218d6615aeeea6d466310ee9501a
|