PromptBill
Reads local .[git](/mcp/integrations/git)/config metadata to map working directories to enclosing Git repositories, enabling per-repo AI usage attribution and billing.
Scans imported OpenAI usage CSV exports and OpenAI Codex CLI JSONL logs, applying model pricing to attribute token spend to Git repositories.
Exports QuickBooks Online-compatible invoice CSV files for accounting import.
Exports Xero-compatible invoice CSV files for accounting import.
PromptBill
Stop eating your AI coding bill on client projects.
PromptBill is a 100% local-first, zero-dependency, open-core CLI & web studio that scans your local Claude Code, OpenAI Codex CLI, Gemini CLI, Cline, Roo Code, and Anthropic / OpenAI / OpenRouter / Cursor CSV usage logs, attributes every token to its Git repository, and turns it into client-ready PDF & Xero/QuickBooks invoices in 10 seconds.
Zero telemetry. Zero cloud uploads. Your prompts, code, and usage logs never leave your machine.
Zero runtime dependencies. No Puppeteer, no Chromium download — installs & runs instantly on Linux, macOS, and Windows (Node.js
>= 18).
Try It in 5 Seconds (Demo Mode)
npx github:danielneuron/promptbill scan --demo
npx github:danielneuron/promptbill ui --demoOr scan your real local Claude Code (~/.claude/projects), Codex CLI (~/.codex/sessions), Gemini CLI (~/.gemini/tmp), and Cline / Roo Code (globalStorage/*/tasks) logs right away:
npx github:danielneuron/promptbill scan --days 30
npx github:danielneuron/promptbill uiRelated MCP server: nikhilnt
Key Features
Free Open-Source Core (MIT)
Local Multi-Tool Parsers: Reads Claude Code JSONL (with streaming
requestIddeduplication so tokens are never double-counted), OpenAI Codex CLI JSONL (with delta tracking), Gemini CLI JSON (~/.gemini/tmp), and Cline / Roo Code task logs (ui_messages.json+ workspace CWD extraction across VS Code, Cursor, Windsurf, and VSCodium).API CSV Importer: Import usage exports from Anthropic Console, OpenAI, OpenRouter, or Cursor (
promptbill import usage.csv --project my-client-repo).Automatic Git Repo Attribution: Maps working directories to enclosing Git repository names via
.git/config.Up-to-Date Pricing + Custom Overrides: Built-in 2026 pricing for Claude 4.x/3.x, GPT-5/Codex/o-series, Gemini 2.5/3, and DeepSeek — override anytime via
~/.promptbill/pricing.json.Interactive Local Studio UI: Inspect repo spend, toggle billable repos, configure labor hours + pass-through markup + GST/VAT, and preview/download PDF invoices.
Standard Repo Summary CSV & JSON Export.
PromptBill Pro ($19 One-Time) & Agency Team ($49 One-Time) via Polar.sh
Pays for itself on your very first client invoice. No subscriptions, lifetime v1.x updates, 14-day refund guarantee.
Unwatermarked, Branded Client-Ready PDF Invoices (native PDF 1.4 generator).
Page 2 Sanitized AI Compute Audit Appendix: Date, repo, model, token totals, USD cost & optional sanitized git commit titles — proving AI spend to clients without leaking raw code or prompts.
One-Click Xero & QuickBooks Online Invoice CSV Exports.
Unlimited Multi-Client & Multi-Repo Profiles.
Agency Multi-Developer Rollup (
promptbill merge): Merge multiple engineers'promptbill scan --jsonexports into one deduplicated client invoice (up to 25 machines withPromptBill Agency).
Unlock Pro, Agency, or the Best-Value Bundle (preview a real 2-page Sample Pro PDF):
Get Dev CLI & MCP Pro Bundle — $39 one-time (Save $9: PromptBill Pro + AuditDeck Pro)
Get PromptBill Agency — $49 one-time (Team, up to 25 machines)
promptbill activate PBILL-XXXX-XXXX-XXXX # or PBAGY-XXXX-XXXX-XXXX for AgencyVS Code / Cursor / Windsurf / VSCodium Extension
Download the prebuilt zero-dependency .vsix (47 KB) from GitHub Releases to see live 30-day AI spend per workspace repo in your status bar & sidebar:
code --install-extension promptbill-1.4.0.vsix # or cursor --install-extension ...MCP Server (Claude Code, Cursor, Windsurf, Cline & Claude Desktop)
Run PromptBill as a zero-dependency local stdio MCP server so you can ask your coding agent directly:
"How much AI compute did we spend on
acme-payments-apithis month? Export a client PDF invoice with 15% markup and 10% GST."
Add to your MCP client config (~/.claude.json, .mcp.json, Cursor MCP settings, or claude_desktop_config.json):
{
"mcpServers": {
"promptbill": {
"command": "npx",
"args": ["-y", "github:danielneuron/promptbill", "mcp"]
}
}
}Exposed MCP Tools:
promptbill_scan_usage— Scan local Claude Code, Codex CLI, Gemini CLI, Cline, Roo Code & imported CSVs grouped by Git repo.promptbill_repo_spend— Detailed spend, models & pass-through billing estimate for a specific Git repository.promptbill_generate_invoice_pdf— Generate a native PDF 1.4 client invoice on disk (with optional labor, markup %, GST/VAT & Pro audit appendix).promptbill_export_csv— Export Repo Summary CSV (Free) or Xero / QuickBooks Online invoice CSV (Pro/Agency).
CLI Reference
# Scan local AI coding usage for the last 30 days
promptbill scan --days 30
# Launch interactive local studio UI (default http://127.0.0.1:4319)
promptbill ui
# Generate a client PDF invoice (AI pass-through + optional hourly engineering)
promptbill invoice \
--client "Acme FinTech Pty Ltd" \
--repos "acme-payments-api,acme-web-portal" \
--hours 12 --rate 135 --markup 15 --tax 10 --currency USD \
--audit --out acme-nov-2026.pdf
# Import OpenRouter / Anthropic / OpenAI / Cursor CSV
promptbill import openrouter-nov.csv --project acme-payments-api
# Export repo summary (Free) or Xero / QuickBooks invoice CSV (Pro)
promptbill export --format csv --out repos.csv
promptbill export --format xero --client "Acme FinTech" --repos "acme-payments-api" --out xero.csvPrivacy & Security
PromptBill reads local JSONL/CSV files strictly on your machine. The only outbound network request PromptBill ever makes is when you explicitly run promptbill activate, promptbill status, or promptbill deactivate, which communicates solely with Polar.sh's public Customer Portal License Key API (/v1/customer-portal/license-keys/*).
Related Open-Source Tools by DanielNeuron
AuditDeck — Local-first CLI & MCP server that audits any Git repository (secrets, lockfiles, CI/tests, bus-factor, docs) and generates boardroom-ready Client Codebase Audit & Project Handover PDFs.
License
MIT — see LICENSE.
Available Tools
4 toolspromptbill_export_csvExport Repo / Xero / QuickBooks CSVAIdempotent
Export local AI coding usage as a standard Repo Summary CSV (Free) or as a ready-to-import Xero or QuickBooks Online invoice CSV (Pro/Agency).
Inputs: days, demo, repos, format, +4 more.
promptbill_generate_invoice_pdfGenerate Client Invoice PDFAIdempotent
Generate a native PDF 1.4 client pass-through invoice combining local AI coding spend per Git repo with optional engineering labor, markup %, and GST/VAT. Writes the PDF locally on disk.
Inputs: clientName (required), days, demo, repos, +9 more.
promptbill_repo_spendGet Repository AI Spend & Pass-Through EstimateBRead-onlyIdempotent
Get detailed AI coding spend, token usage, providers, models, and estimated pass-through billing total for a specific Git repository.
Inputs: repo (required), days, demo, taxPercent, +1 more.
promptbill_scan_usageScan Local AI Coding UsageARead-onlyIdempotent
Scan local AI coding logs (Claude Code, OpenAI Codex CLI, Gemini CLI, Cline, Roo Code, and imported CSVs) and return per-Git-repository token counts, sessions, models, and USD cost breakdown. 100% local-first.
Inputs: days, demo, repos, toDate, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The four tools map to distinct stages of one workflow: scan all repos, drill into one repo, produce a PDF invoice, export CSV. The main overlap risk is between promptbill_scan_usage (returns per-repo token/cost breakdown) and promptbill_export_csv (exports usage as CSV), which could be confused for the same data in a different format, but the descriptions make the output differences clear enough.
All names share a consistent 'promptbill_' prefix and snake_case, and three of four follow verb_noun (scan_usage, generate_invoice_pdf, export_csv). promptbill_repo_spend breaks the pattern by using noun_verb ordering, a minor deviation that is still readable and unambiguous.
Four tools is lean but fits a narrow local-usage-to-invoice pipeline, with no redundant entries. It sits at the low end of the comfortable range, leaving little room for filtering or configuration operations without adding tools.
The surface covers the full stated lifecycle: discover usage, inspect a repo, generate an invoice, and export accounting CSVs for Xero/QuickBooks. Minor gaps exist around time-range or date filtering, client/customer records, and settings or data-cleanup operations that agents would otherwise have to work around.
Maintenance
Related MCP Connectors
AI agent time tracking per client. Claude Code, Codex, Cursor, OpenClaw, Hermes, Grok Bot, any MCP.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
Log billable hours and generate AI-assisted monthly client timesheets from coding sessions.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseAqualityBmaintenanceLocal-first dashboard + MCP server that parses Claude Code and Codex JSONL files into a SQLite cost / token tracker. Per-MCP and per-tool breakdown, session drill-down, dedup by request_id; never talks to vendor APIs595 npm1MIT
- AlicenseBqualityDmaintenanceTrack LLM token costs across Claude, GPT and Gemini. MCP server + CLI with optimization hints and $ savings estimates.81MIT
- AlicenseAqualityDmaintenanceOne MCP that turns Claude Code into your whole dev stack by swallowing other MCP servers, delegating to Codex & Gemini on your CLI subscriptions, remembering projects in a searchable knowledge graph, and carrying setup across sessions — secret-free by design.234MIT
- AlicenseNot gradedqualityBmaintenanceEnables local-first tracking of AI token usage and costs from Claude Code and OpenCode, answering queries about tokens, models, sessions, and cost through MCP tools and a CLI, with no network calls.245 npm1MIT