Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

nanocode

> 编程语言
Open source

Minimal Claude Code alternative. Single Python file, zero dependencies, ~250 lines.

2.5K stars0 likes1 views
WebsiteGitHub

About

Minimal Claude Code alternative. Single Python file, zero dependencies, ~250 lines.

nanocode

Minimal Claude Code alternative. Single Python file, zero dependencies, ~250 lines.

Built using Claude Code, then used to build itself.

Features

  • Full agentic loop with tool use
  • Tools: read, write, edit, glob, grep, bash
  • Conversation history
  • Colored terminal output

Usage

bash
export ANTHROPIC_API_KEY="your-key"
python nanocode.py

OpenRouter

Use OpenRouter to access any model:

bash
export OPENROUTER_API_KEY="your-key"
python nanocode.py

To use a different model:

bash
export OPENROUTER_API_KEY="your-key"
export MODEL="openai/gpt-5.2"
python nanocode.py

Commands

  • /c - Clear conversation
  • /q or exit - Quit

Tools

Tool Description
read Read file with line numbers, offset/limit
write Write content to file
edit Replace string in file (must be unique)
glob Find files by pattern, sorted by mtime
grep Search files for regex
bash Run shell command

Example

────────────────────────────────────────
❯ what files are here?
────────────────────────────────────────

⏺ Glob(**/*.py)
  ⎿  nanocode.py

⏺ There's one Python file: nanocode.py

License

MIT

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言