pi-from-scratch
PI from Scratch is a Chinese-language article, not a framework. It follows the data flow of the pi coding agent and rebuilds a stripped-down version called nano-pi that can read files, edit code and run commands, keeping pi's core ideas and dropping its engineering detail.
The companion website pairs the article with the source: as you read, an editor on the right fills in the code until the whole of nano-pi is on screen. A trace feature lets you set breakpoints and step through the execution line by line; the online trace is pre-generated, so browsing the site makes no model requests. The author notes the article is written by hand.
To run nano-pi yourself you need Node.js 22+ and an OpenAI-compatible API, configured with NANOPI_API_KEY and optionally NANOPI_MODEL and NANOPI_BASE_URL. The website can also run locally from the web folder. The project is MIT-licensed.
Features
Why choose it
Trade-offs
Maintenance check
- Last commit
- 2026-10-24
- Commits, last 90 days
- 23
- Releases, last 90 days
- 0
- Latest release
- —
- Open issues
- 0
- Recent issues with at least one comment
- 2/4
Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.
Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.
Compatibility
Quick start
Use cases
Alternatives
Comments
No comments yet. Be the first!