Repository navigation
PromptBill: Local-first Codex CLI token tracker per Git repo + zero-install browser parser & client invoice generator (MIT) #64945
danielneuron
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey everyone — I built PromptBill, a 100% local-first, zero-dependency MIT CLI & MCP server that parses local OpenAI Codex CLI session logs (
~/.codex/sessions), attributes every token to its enclosing Git repository, and generates client-ready pass-through reports/invoices.Why I built it
If you use Codex CLI across multiple client repositories (or git worktrees), it is surprisingly tricky to know how much AI compute went into each client project at the end of the month:
total_token_usagesnapshots and periodic heartbeats wherelast_token_usagerepeats whiletotal_token_usagestays unchanged — naive line summation double-counts spend.PromptBill computes exact cumulative deltas (ignoring duplicate heartbeats), persists worktree-to-Git-origin mappings locally (
~/.promptbill/repo-cache.json), and also supports Claude Code, Gemini CLI, Cline/Roo Code, and API CSV imports in the same breakdown.Try it with zero install (100% offline in browser)
If you want to inspect a Codex session log before running anything locally, there is an offline in-browser parser on GitHub Pages (0 bytes uploaded — everything parses client-side in RAM):
Quickstart (CLI & Codex MCP Server)
Or connect it as a local stdio MCP server (
promptbill_scan_usage,promptbill_repo_spend,promptbill_generate_invoice_pdf,promptbill_export_csv):{ "mcpServers": { "promptbill": { "command": "npx", "args": ["-y", "github:danielneuron/promptbill", "mcp"] } } }Licensing transparency
The entire scanner, Git attribution engine, MCP server, local web studio, browser parser, standard CSV export, and watermarked PDF invoice generator are MIT open-source with zero telemetry. There is an optional one-time paid Pro tier for agencies who want unwatermarked client PDFs + a sanitized Page 2 compute audit appendix + Xero/QuickBooks CSV exports.
Would love feedback from anyone using Codex CLI on client work — especially if you have seen newer
~/.codex/sessionsschema edge cases or pricing models you want supported!All reactions