opentab
AGENTS.md99 starsChanged 28 days agoMITView on GitHub
OpenTab browses local AI usage and spend in a curses TUI and a self-contained web report. It reads multiple harnesses through a shared store interface. The PyPI distribution is opentab-ai; the import package and command are opentab. Start with Architecture for the package map. Read the relevant topic, not the entire documentation tree: - Python 3.9+. Standard library only at runtime, except Windows-only windows-curses. No new runtime dependencies. - Harness databases, transcripts and auth files are read-only. Writes belong to…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Start with Architecture for the package map.
- Very specific: line 33
Keep imports acyclic and stores independent of the TUI.
- Distinctive: line 37
Keep the model scan deferred until after the first TUI paint.
- Very specific: line 43
Do not hand-edit src/opentab/data/models.json.
- Very specific: line 63
Do not wrap fixed-width TUI strings to satisfy line length (E501 is ignored).
- Distinctive: line 64
Check both frontends when changing a feature they share.
- Very specific: line 66
Use Conventional Commits and the scope vocabulary in CONTRIBUTING.md.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working on OpenTab
OpenTab browses local AI usage and spend in a curses TUI and a self-contained web
report. It reads multiple harnesses through a shared store interface. The PyPI
distribution is opentab-ai; the import package and command are opentab.
Read for the task
Start with Architecture for the package map. Read the relevant topic, not the entire documentation tree:
| Working on | Reference |
| Setup, tests, commits, releases | Contributing |
| A store, token accounting, deduplication, subagents, retention | Backend accounting; harness setup and schemas |
Startup, reload, caches, cost, --goto | Startup and caching |
| TUI state, navigation, tables, colours, traces | TUI internals; user controls |
Costs, model rates, $, P, w | Pricing |
| Notes, XDG files, demo, export privacy | Privacy |
| HTML payload, browser state, live server | Web browser |
| Fleet summaries, pulls, remote sessions | Multiple machines |
| Environment diagnosis, portability | Troubleshooting; Windows/WSL |
The website, the in-browser app (site/) | Website |
Non-negotiable constraints
- Python 3.9+. Standard library only at runtime, except Windows-only
windows-curses. No new runtime dependencies. - Harness databases, transcripts and auth files are read-only. Writes belong to
OpenTab's own files or explicitly requested exports; use
persistence/paths.pyfor XDG paths. - Notes are authored data: locked read-modify-write, atomic save on each edit, no overwrite of malformed files, preserve unknown entries, never prune missing IDs.
- Keep imports acyclic and stores independent of the TUI. Use
TYPE_CHECKINGfor annotation-only back-references; preserve the top-level public API exports. - Recorded cost, API-equivalent estimates (
$), and session-only rate comparisons (w) are distinct. Never turnwinto an app-wide repricing mode. - Keep the model scan deferred until after the first TUI paint. Session extras
and content stay lazy; raw traces enter web payloads only with
--allow-raw-content, never rollup caches, fleet payloads, the served page cache, or programmatic output without the existing gate. - Demo must not expose real notes or traces, persist preferences, or launch/copy sessions. Treat selective anonymization as selective, not fully private.
- Do not hand-edit
src/opentab/data/models.json; regenerate it withscripts/update_prices.py.
Development loop
pip install -e .
python3 run_tests.py # custom stdlib runner, not pytest
python3 run_tests.py pricing # module/test substring filter
python3 run_tests.py -j 1 pricing # in-process and in order, for pdb
ruff check src/opentab tests run_tests.py
ruff format --check src/opentab tests run_tests.py
python3 -m compileall -q src/opentab
python3 -m opentab --demoTests belong to the module they exercise; shared builders live in
tests/_support.py. tests/__init__.py isolates all XDG roots before imports.
Tests run on parallel workers in no fixed order: no test may rely on another's files
or globals.
Do not wrap fixed-width TUI strings to satisfy line length (E501 is ignored).
Check both frontends when changing a feature they share.
Use Conventional Commits and the scope vocabulary in CONTRIBUTING.md; no AI
attribution or co-author trailers. Version is the manual __version__ constant in
src/opentab/__init__.py, not derived from a tag.
Keep this file small
This is a task router and a short set of guardrails, not a design history. Put explanations in the relevant human-readable doc, tests next to the affected module, and local implementation rationale beside the code. Update existing sections instead of appending bug diaries or duplicating whole feature descriptions here.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

