$ summa

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 (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 MotherDuck, ClickHouse, and the D1 daily-row mirror. The analytics product of that pipeline is burn.duyet.net. D1 stores keys and mirrors daily rows for analytics fallback.

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.

Telemetry keys

One telemetry_token per machine. The CLI reads it from ~/.config/summa/credentials.toml; it only needs read access to your own tenant.

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