Coding Ledger
Understand the cost and outcomes of AI-assisted development from the records already on your machine.
Coding Ledger connects Git history with local coding-assistant activity to produce an offline dashboard of token usage, API-equivalent cost, time estimates, and session-to-commit outcomes. It is built for individual developers and independent builders who want a work record without uploading prompts or source code.
Getting started · Reference · Releases · Report an issue
What you can do
- Compare AI usage with commits and, optionally, merged GitHub pull requests.
- Review daily activity, project trends, attribution, and gaps in source coverage.
- Keep a local SQLite ledger with repeatable, resumable scans.
- Generate a self-contained HTML dashboard and shareable aggregate reports.
- Add macOS Screen Time evidence to account for work that produces no commit.
The scanner uses Python 3.10+ and the standard library. Chart.js is bundled with the application for offline dashboards; no browser CDN is needed by version 1.0.1 and later. PDF and image export requires Chrome, Chromium, or Edge.
Project status
The CLI, scanner, dashboard, reports, and offline license verification are implemented. Automated tests cover source parsing, privacy exclusions, deduplication, attribution, pricing, and reporting. macOS is the primary environment; Screen Time and the scheduled scan are macOS-specific. Hosted accounts and team administration are outside the current product.
Version 1.0.1 includes source-import and offline packaging improvements. Download the wheel or source archive from GitHub Releases. Check the version offered by PyPI or Homebrew when choosing an installation channel.
This project is source-available under Elastic License 2.0, not OSI open source. The scanner and reports are free; selected dashboard views and the ROI share card require an offline Pro license. See Free versus Pro and the license.
Getting started
Requirements: Python 3.10+, Git, and local repositories or supported assistant logs. Start with an explicit project folder so the scan covers the work you intend to measure.
git clone https://github.com/BMC-INC/coding-ledger.git
cd coding-ledger
python3 -m venv .venv
source .venv/bin/activate
python -m pip install .
coding-ledger init --author "Your Name,you@example.com"
coding-ledger scan --roots "$HOME/Projects" --sources git,claude,codex
coding-ledger roi
coding-ledger today
coding-ledger dashboard --open
To install the validated GitHub release directly:
python -m pip install https://github.com/BMC-INC/coding-ledger/releases/download/v1.0.1/coding_ledger-1.0.1-py3-none-any.whl
PyPI installation (pipx install coding-ledger or uv tool install coding-ledger)
may lag the GitHub release until its separate publication completes. You can also follow the
Homebrew tap.
The older v1.0.0 Python wheel omits the dashboard chart asset. Upgrade to 1.0.1
or install the 1.0.1 wheel from GitHub Releases for fully offline charts.
Run coding-ledger doctor to see which sources are discoverable.
Use coding-ledger --help or coding-ledger scan --help for options.
Data is stored in ~/.coding-ledger/; set CODING_LEDGER_DIR to choose another location.
Supported evidence
| Source | What it contributes |
|---|---|
| Git | Author-filtered commits, changed-line counts, and commit timestamps |
| Claude Code and Codex | Local session metadata and token usage when present |
| Gemini, Grok Build, Cursor, Aider, VS Code, Antigravity | Available session or editor metadata; coverage varies by source |
| GitHub (optional) | Merged PRs and aggregate history through your authenticated gh CLI |
| macOS Screen Time (optional) | Allowlisted coding-app foreground intervals |
Rescans deduplicate commit and session evidence. Interrupted scans retain imported records and display their incomplete state. The reference describes source paths and attribution rules.
How to read the numbers
API-equivalent cost is an estimate, not your invoice. Token counts are priced
with the configured per-model rates. Unknown models remain unpriced; sources
without usage fields remain coverage gaps. Update ~/.coding-ledger/pricing.json
when rates or models change.
Time and outcome attribution are heuristics. Session timestamps, commit-density proxies, and editor activity cannot prove who typed each line or whether work was valuable. Session-to-commit matching uses a visible seven-day window. A subscription multiple compares API-equivalent value with the price you enter; it is not measured profit or business ROI.
Privacy and network use
Scanning and reporting run locally. The ledger stores timestamps, source paths, project identifiers, and aggregate counts. It does not persist prompt or response text, source code, tool arguments, tool output, or credentials. Treat the database and detailed dashboard as private because they identify projects and local paths.
Optional GitHub commands contact GitHub through gh. Installing packages and
opening purchase links also requires a network connection. Local dashboard viewing
and offline license verification do not require a service account or telemetry.
The public export command omits project and
repository names; review any artifact before sharing it.
Development
python3 -m unittest discover -s tests -v
python3 -m pip wheel . --no-deps --wheel-dir dist
CI runs the tests on Python 3.10 and 3.14 and checks that an installed wheel contains the offline chart asset. For a contribution, include the problem, a reproducible example using synthetic data, and the checks you ran. Do not attach real assistant logs or your personal ledger to public issues.
Built by ExecLayer / BMC-INC.
Release maintainers: see the release procedure.
Metadata
Release files for coding-ledger 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| coding_ledger-1.0.1.tar.gz | 141.6 kB | With provenance | Details for coding_ledger-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| coding_ledger-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for coding_ledger-1.0.1-py3-none-any.whl |
Total release size: 272.9 kB
Release files / coding_ledger-1.0.1.tar.gz
| Download URL | coding_ledger-1.0.1.tar.gz |
|---|---|
| Size | 141.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49bc052157287c01c9517e561fb117eb357445ad9c6137fe1095abec3878c3c3
|
|
BLAKE2b-256 checksum How to use checksums |
c9e7b43923da5a2ea9071513ceabf69109f7e21faf7e5fa42851058fc97b408f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / coding_ledger-1.0.1-py3-none-any.whl
| Download URL | coding_ledger-1.0.1-py3-none-any.whl |
|---|---|
| Size | 131.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76a553297a66413357545a7a3314cb5f62de352e6dde28fd73d025b15f98b51a
|
|
BLAKE2b-256 checksum How to use checksums |
55dc7277b8b895726e1628bd44de71516510b5c2f8116dca1670b318a9edde23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for coding-ledger 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for coding_ledger-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.