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.

Inspect GitHub repository
GoSQLiteCobraLipgloss
omp-cost all 2026-10 --savings
omp-cost all 2026-10 --savings
PROFILE TOKENS CACHE HIT NET SPEND
default 14.2M 86.4% $18.40
Forecast: $24.10/mo · Prompt cache saved $64.80
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 deterministic text, json, csv, and md exports 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 main is versioned by shiptag and released through shipguard release: GoReleaser binaries for Linux, macOS, and Windows (amd64 and arm64) with a Sigstore-signed checksums.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