Skip to main content

ukaf

Sponsor CI License: MIT

What the agents spent, and what actually shipped.

ukaf reads a Cursor usage CSV and the pull requests that went with it, then tells the month as one story. Every feature is five stages in a row. The stages add up to the feature. The features plus an explicit overhead bucket add up to the export. List price (the rate card, before the included pool) and billed cost (what the CSV charged) are both in the story, and a reconciliation check fails the run if a part does not meet the whole.

There is no second clock. Lead time is testing plus deploy. Time to restore is the fixes stage. You will not see "launch → merge" sitting next to "PR open → merge".

Install

Use Python 3.11 or later.

Method Command
pipx pipx install ukaf-cli
uvx uvx --from ukaf-cli ukaf --version
pip python -m pip install ukaf-cli
Homebrew brew install UriBer/tap/ukaf-cli

To install from source:

git clone https://github.com/UriBer/ukaf-cli.git
cd ukaf-cli
python3 -m venv .venv
. .venv/bin/activate
python -m pip install .

Quickstart

ukaf report \
  --usage examples/usage.csv \
  --github-fixture examples/github.json \
  --out ./out \
  --lang en

That writes report.html, report.json, and report.md. The sample HTML report shows list and billed totals, how stages and overhead add up, cost by tier, the priciest usage day, and ranked recommendations. It opens offline.

Screenshots of that sample, in English and Hebrew, are on the GitHub Pages showcase rather than in this repository. The same kind of walkthrough can also live on di2ops.com.

ukaf report, English

Generate the same report with Hebrew labels and a right-to-left layout:

ukaf report --usage examples/usage.csv --github-fixture examples/github.json --out /tmp/ukaf-he --lang he

ukaf report, Hebrew RTL

examples/usage.csv is synthetic. It has the same columns as a Cursor usage export and none of anyone's real rows. Do not commit a real export.

Live GitHub data

export GITHUB_TOKEN=...   # or GH_TOKEN
ukaf report \
  --usage ~/Downloads/usage.csv \
  --repo owner/name \
  --repo owner/other \
  --out ./out

Put the cloud agent id in the pull request body (Agent: bc-...) so the run attaches to that feature. An agent id with no pull request, and every row with no agent id, stays in overhead. ukaf will not guess editor traffic onto whichever PR happens to be open.

The additive story

Stage Clock
Planning / spec Issue opened → agent launch
Development Agent launch → first push
Testing / CI First push → first green check (or the last check, if it never went green)
Deploy + acceptance That check → production deploy (or the merge, if there is no deploy)
Fixes Acceptance → restore, revert, or a later commit

A milestone that arrives out of order becomes a zero-length stage. It does not start a second, overlapping interval. Rework before the first green check stays inside testing. The fixes stage is only what happens after acceptance.

List price comes from src/ukaf/data/cursor.toml (USD per million tokens, taken from the Cursor models and pricing page on 2026-12-03). Included and Free bill as zero and still have a list price, so you can see what the pool absorbed. Each event is rounded half-even to a micro-dollar and then summed. The published total is that sum.

Complexity

Hand-written SLOC is additions plus deletions, excluding lockfiles and generated paths (package-lock.json, *.pb.go, dist/, and the rest listed in src/ukaf/delivery.py). The tier is the higher of the two gates:

Tier Hand-written SLOC Counted files
S under 50 3 or fewer
M 50–299 4–10
L 300–999 11–30
XL 1000 or more 31 or more

Cost by tier is a partition of feature spend. Overhead is a separate row. Those rows add up to the export. They are not an extra tax on top of the feature story.

Recommendations

Rules only. Each one names the action, the evidence from this window, and a monthly estimate in dollars or minutes. They are ranked by billed saving, then list-price saving, then minutes. Nothing in the report says "consider optimizing your workflow."

MCP server

The stdio server uses the optional MCP extra. Run it with uvx --from "ukaf-cli[mcp]" ukaf mcp or install the extra with pip install "ukaf-cli[mcp]" and run ukaf mcp. Supply paths readable by the local server. Absolute paths work regardless of the client's working directory.

Cursor

Add to Cursor

Add to Cursor or add this to .cursor/mcp.json.

{
  "mcpServers": {
    "ukaf": {
      "command": "uvx",
      "args": ["--from", "ukaf-cli[mcp]", "ukaf", "mcp"]
    }
  }
}

Claude Code

claude mcp add ukaf -- uvx --from "ukaf-cli[mcp]" ukaf mcp

Codex

Add this to ~/.codex/config.toml.

[mcp_servers.ukaf]
command = "uvx"
args = ["--from", "ukaf-cli[mcp]", "ukaf", "mcp"]

Or run:

codex mcp add ukaf -- uvx --from "ukaf-cli[mcp]" ukaf mcp

Tools

Tool Inputs Result
build_report usage_csv, out_dir; optional github_fixture, lang (en or he), pricing HTML, JSON, and Markdown paths, plus headline totals. Omitting the fixture puts usage in overhead.
cost_per_feature usage_csv, github_fixture Per-feature list and billed costs, stage breakdown, and tier.
recommendations usage_csv, github_fixture Ranked actions with evidence and estimated impact.
dora_summary usage_csv, github_fixture Deployment frequency, median lead time, failure rate, and restore time.

Agent skill

Copy the skills/ukaf-cli directory from this repo to ~/.cursor/skills/ or your project's .claude/skills/. You can also use npx skills add UriBer/ukaf-cli.

Sponsorship

The tool is MIT. Funding is for maintenance, not a paid tier.

Projects that are serious about this (the ones GitHub's own docs are written around, and the ones that keep a public sponsor button) do four small things and then stop:

  1. .github/FUNDING.yml, which is what turns on the Sponsor button. github: UriBer is set. open_collective, ko_fi, buy_me_a_coffee, polar, and thanks_dev are comments, because those accounts are the maintainer's to open.
  2. A sponsor badge and a short section in this README.
  3. A SUPPORTERS.md that separates sponsors and backers, and says when the list is empty.
  4. One line in ukaf --version and in the report footer. No nag on every log line.

ukaf 0.1.0 · sponsor the work: https://github.com/sponsors/UriBer

Owner step: GitHub Sponsors has to be enabled on the UriBer profile (the Stripe tax interview). Until that is approved, the button and the badge point at a page that cannot accept money. ukaf does not create a Polar, Open Collective, Ko-fi, or Buy Me a Coffee account.

Development

See CONTRIBUTING.md and CODE_OF_CONDUCT.md. CI runs ruff and pytest.

ukaf --version

Metadata

Release files for ukaf-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ukaf-cli 0.1.0
File Size Uploaded Provenance Actions
ukaf_cli-0.1.0.tar.gz 63.4 kB With provenance Details for ukaf_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ukaf-cli 0.1.0
File Interpreter ABI Platform Actions
ukaf_cli-0.1.0-py3-none-any.whl Python 3 none any Details for ukaf_cli-0.1.0-py3-none-any.whl

Total release size: 110.8 kB

Release files / ukaf_cli-0.1.0.tar.gz

Download URL ukaf_cli-0.1.0.tar.gz
Size 63.4 kB
Tags Source
SHA-256 checksum
How to use checksums
665306ff04a7ab6e88793119136d49629f1ce9e587eaa155edfdb071945cb872
BLAKE2b-256 checksum
How to use checksums
ab295aff1fa46f4f36045accfb833db8e8eb10ad6c3d5ddfb2961dafd570abb1
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 Dec 3, 2026.

Transparency log

Release files / ukaf_cli-0.1.0-py3-none-any.whl

Download URL ukaf_cli-0.1.0-py3-none-any.whl
Size 47.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3602b87ef3fa02f438ec96c485c5ead2095d9bf43fcf48a3d0a8d71ab7bb4b32
BLAKE2b-256 checksum
How to use checksums
a925e063570f3a946cdc93a9730cdd690434c4730f121c064c4d6bba4ec7def1
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 Dec 3, 2026.

Transparency log

Security for ukaf-cli 0.1.0

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.

Select from 2 files

Attestation for ukaf_cli-0.1.0.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 Dec 3, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page