OPEN SOURCE / PUBLIC REPOSITORY
omp-cost
A Go terminal utility for inspecting AI token usage, prompt-cache efficiency, cost attribution, and forecasts across Oh My Pi profiles.
Read-onlySQLite opened with mode=ro
4 formatsTUI, JSON, CSV & Markdown export
Signed releases6 platform binaries via shipguard
Open-source project maintained on GitHub · Source code, releases, and usage docs are available in the public repository.
omp-cost is a terminal FinOps utility I built to inspect AI token consumption, prompt-cache efficiency, cost attribution, and monthly spend forecasts across Oh My Pi (omp) agent profiles.
Architecture & design
The CLI is built in Go around a Cobra command entrypoint, domain-model aggregation pipelines, a pure-Go SQLite reader with concurrent session synchronization, an interactive Lipgloss TUI, and structured export serializers:
- Read-only SQLite inspection: Queries local session databases without acquiring writer locks, allowing live cost inspection while agent sessions are actively running.
- Multi-dimensional attribution: Breaks down token usage and cost by calendar month, profile, model provider, workspace, and agent role, highlighting prompt-cache hit rates and savings.
- Interactive & pipeline-ready output: Supports a keyboard-driven full-screen TUI (
-i) alongside deterministictext,json,csv, andmdexports for automated FinOps reporting, plus daily and weekly breakdowns, a cross-profile provider summary, and month-end forecasts with a budget cap. - Signed, automated releases: Every push to
mainis versioned byshiptagand released throughshipguard release: GoReleaser binaries for Linux, macOS, and Windows (amd64 and arm64) with a Sigstore-signedchecksums.txt.
# Overview across all profiles for the current month
omp-cost
# Interactive full-screen TUI dashboard
omp-cost -i
# One profile's October spend by repository, exported as JSON
omp-cost work 2026-10 --by-project -o json
# Daily burn rate and month-end forecast against a budget
omp-cost work --forecast --budget 300