ZettCode
English · 简体中文
A focused coding agent for your terminal. Point it at a workspace, describe the change you want, and watch the work happen — files read, commands approved, edits made, tests run — as a conversation you can scroll, select, and copy.
The terminal interface is this repository; the model loop is
zett-agent, published separately.
Install
ZettCode needs Python 3.10 or newer. It is published on PyPI as zettcode:
uv tool install zettcode
# or
pip install zettcode
Configure
Everything except the workspace lives in ~/.zettcode/config.toml. At least one
model, and the first one is active at startup:
[[models]]
model = "gpt-4o"
token = "sk-..." # or set OPENAI_API_KEY
base_url = "http://localhost:8787/v1" # any OpenAI-compatible endpoint
context_window = 200000 # tokens this model can carry
multimodal = true # accepts images as well as text
Project AGENTS.md files, skills,
MCP servers, plugins, the palette, and the rest are all in the same file. The
full key list is in the configuration reference.
Run
cd ~/projects/api
zettcode # workspace defaults to the cwd
zettcode -w /path/to/project # work somewhere else
zettcode --resume <session-id> # reopen a stored session
zettcode --dry-run # time the startup and exit
Type a task and press Enter. / opens the command menu, @ references a
skill, Ctrl-C stops a request, Ctrl-D on an empty composer exits — and
leaving prints the command that brings the session back.
What it does
- Streams a conversation, not a payload. Reasoning, answers, and tool calls
arrive as rows in order; tool output reads like a log —
Read src/app.py,Ran pytest -q— never raw JSON. - Asks before it acts. Every shell command is confirmed first, with
ato allow the rest of the run andpto remember one command. - Keeps the context honest. The status line shows tokens, cache hit rate,
and how full the window is;
/contextbreaks the request down, and compaction summarizes before the window overflows. - Remembers the project.
AGENTS.mdfiles from the workspace upward become project instructions; skills and MCP servers extend what the model can do. - Respects the terminal. Mouse selection and scrolling, panels for choices,
image paste,
Ctrl-L, and a palette that follows your terminal's background — or your owntheme.toml.
Documentation
The user guide is published at https://chang-lehung.github.io/zettcode/ (English, with 中文 alongside it):
| Getting started | Install, first task, first approvals. |
| The interface | What each row of the screen tells you. |
| Keys and mouse | The full reference. |
| Commands | Every /command and @resource. |
| Sessions | Resume, title, export. |
| Configuration | One file, every key. |
| Models and context | Effort, compaction, cache, images. |
| Project instructions | Writing a good AGENTS.md. |
| Skills and MCP | Teaching it your own tools. |
| Plugins | Adding commands and rows in Python. |
| Problems and questions | When something does not work. |
Development
uv sync # install the environment
make check # ruff, mypy, and pytest
make hooks # run mypy before every commit
make demo # browse the widgets interactively
uv run zettcode -w . # run the checkout against a workspace
Notes for working inside the repository — layering, the invariant list, the
platform seam — are in AGENTS.md and
docs/internal/. The docs site itself lives in
docs/ and builds with npm ci --prefix docs && npm run docs:build --prefix docs.
License
MIT — see LICENSE.
Metadata
Release files for zettcode 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zettcode-0.1.2.tar.gz | 234.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zettcode-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 533.8 kB
Release files / zettcode-0.1.2.tar.gz
| Download URL | zettcode-0.1.2.tar.gz |
|---|---|
| Size | 234.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f29e4db6e4227341431c315a7340e635065219d34cae67bd39215035f7dd35ef
|
|
BLAKE2b-256 checksum How to use checksums |
6831a04d70b7f6dd7fd61672df5a342cfd68e64b97c741b59ac0f34ae66ab995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / zettcode-0.1.2-py3-none-any.whl
| Download URL | zettcode-0.1.2-py3-none-any.whl |
|---|---|
| Size | 299.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7c158b163c71ef4f025e00784cd816e5e7e9eb08f915c5735fb70f61937f56f
|
|
BLAKE2b-256 checksum How to use checksums |
86be2120dac4d9e08031315718fc2af469d07091e8884ddce4015e842a19d866
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|