Know what every deploy really costs.
Cost estimates are guesses. CostTrace reads your actual cloud bill and traces the change in spend back to the pull request that caused it, then checks it against the estimate.
npx costtrace --help
Estimates stop at merge. Your bill doesn't.
Pre-merge tools price what they can see in your infrastructure code. Data processing, traffic, logs and discounts only show up after the change is running.
Pre-merge estimate
List prices for resources declared in your infrastructure code. Useful, but it misses usage-driven charges and your negotiated rates.
CostTrace measurement
Real billed cost from your provider's export, including your discounts, attributed to the exact commit, and compared against the estimate.
Budgets tell you that you overspent. CostTrace tells you why.
Cloud budgets and anomaly alerts work at the level of accounts and services. CostTrace works at the level of the change, and reports to the engineer who made it.
| AWS Budgets & anomaly alerts | CostTrace | |
|---|---|---|
| Answers | "Are we over plan?" | "Which change caused it?" |
| Unit | Account, service, month | Pull request, commit, deploy |
| Reaches | Finance, by email | The engineer, on the PR |
| Estimate vs. actual | — | Per change |
| Clouds | One tool per provider | AWS, Azure, GCP, OCI via FOCUS |
Use both: when a budget alert fires, CostTrace shows which deploys explain it.
How it works
No agents and no SaaS account. CostTrace runs in your CI or on your laptop against your own billing export.
Tag
Deploys stamp resources with
costtrace_sha,_pr,_repoand_service. One convention that's valid on every cloud.Measure
CostTrace reads your FOCUS billing export and compares each touched resource before vs. after the deploy.
Attribute
Added resources count in full, changed ones by their difference, and removed ones as savings.
Report
Post a PR comment, print a table, export JSON, or fail CI when a change blows past its estimate.
One tool, every cloud
CostTrace is built on FOCUS, the FinOps Foundation's open billing standard, so the same engine works across providers.
Try it in a minute
The repository ships with a multi-cloud sample dataset, so you don't need cloud access to see it work.
# measure every change in a deploy log $ npx costtrace report --focus focus-export.csv --changes changes.json # a PR comment for one change; fail CI if it's over estimate $ npx costtrace report --focus focus-export.csv --changes changes.json \ --sha 9f1c2ab --format markdown --fail-on-over # the tags your IaC should apply $ npx costtrace tags --sha "$GITHUB_SHA" --pr 101 --service checkout --format terraform
Built to be trusted with your bill
Runs where you do
Local-first. Your billing data never leaves your machine or CI.
Open source
Apache-2.0 licensed, from the attribution engine to the CLI.
Verifiable releases
Every npm package ships with signed build provenance from GitHub Actions.
Built in the open
CostTrace is open source under Apache-2.0. Use it, read every line of it, and help shape what comes next.
🧾 PR #101: Route payment provider calls through a NAT gateway
9f1c2ab· checkout · deployed 2026-09-08 14:00 UTC