AI coding-agent usage,
one ccusage_events table.

summa reads Claude Code, Codex, OpenCode, Cursor, Grok and more on every machine you use, then lands daily, session and per-model rows in local DuckDB — with an optional cloud double-write to ClickHouse + MotherDuck. The result of this project is the live spend dashboard at burn.duyet.net.

$ curl -fsSL https://summa.duyet.net/install.sh | bash

v0.1.1 · rust cli · channels: beta (master builds) / stable · telemetry hub at summa.duyet.net

summa
$ summa update --beta
update: target=aarch64-apple-darwin channel=beta install=~/.local/bin/summa current=0.1.2
update: installed ~/.local/bin/summa (0.1.3 channel beta sha 9f2c41e8aa10)
 
$ summa import --verbose
summa — machine: laptop, since: 2026-08-20, import: 3f9c…
config: ch_host=clickhouse-homelab.duyet.net duckdb=~/.local/share/summa/summa.duckdb password_set=true
 
=== Summary ===
  source ccusage: 214 rows
  source cursor: 96 rows
  source grok: 31 rows
  sink clickhouse: 341 rows, 412ms
  sink duckdb: 341 rows, 118ms
  sink summa-cloud: 341 rows, 203ms
  total: 733ms
$
cron 1h update then import

summa (Latin: sum, total) is a small Rust CLI. It reads agent logs locally, explodes model breakdowns into rows, dedups by key, and writes one table: ccusage_events. Monthly rollups are just SQL — toYYYYMM(date).

This host is the cloud hub: machines POST with a token, the worker stamps the tenant, and usage lands in ClickHouse and MotherDuck. The analytics product of that pipeline is burn.duyet.net. D1 stores keys only.

* * *

beta & stable channels

Every master build publishes to the rolling beta tag; release-please tags are stable. Switch anytime: summa update --beta or --stable.

auto-update

summa config --set update.mode=auto checks hourly in the background while you work; the new binary is active next launch. No cron changes needed.

one table

Daily, session, block, project rows. Model breakdowns exploded. ReplacingMergeTree + DuckDB key delete keep it idempotent.

cron on the box

summa cronjob install — launchd, systemd --user, or crontab. The job runs update then import.

sign in to mint a telemetry_token for ~/.config/summa/credentials.toml.