Skip to main content

Track and attribute LLM usage to git feature branches

Project description

Helios

Track and attribute LLM usage (tokens + cost) to git feature branches during real development workflows.

Like ccusage, but for feature-level AI cost tracking.

Install

pip install helios-cli

Or from source:

git clone https://github.com/AlexanderKempen/helios.git
cd helios
pip install -e .

Quick start

# Import usage from your Claude Code sessions
helios sync

# See cost per feature branch
helios report

That's it. Zero config.

Commands

helios sync

Import usage from Claude Code interactive sessions. Reads the session logs in ~/.claude/projects/ and attributes token usage to the git branch that was active during each conversation.

Incremental — only imports new activity on each run.

$ helios sync
Syncing Claude Code sessions...
Imported 3,197 usage events from Claude Code.

helios run "prompt"

Send a prompt directly through Claude CLI and track usage in one step.

$ helios run "build an API endpoint for user registration"
<Claude response>

[helios] feature=ai-search tokens=2,100 cost=$0.03

helios report

Aggregated cost, tokens, and call count per feature branch, sorted by spend.

$ helios report

AI Usage Report

┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Feature            ┃     Cost ┃     Tokens ┃ Calls ┃ Top Model       ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ auth-refactor      │ $142.50  │ 9,500,000  │   85  │ claude-opus-4-6 │
│ billing-v2         │  $38.20  │ 2,540,000  │   42  │ claude-opus-4-6 │
│ search-indexing    │  $12.10  │   800,000  │   18  │ claude-opus-4-6 │
└────────────────────┴──────────┴────────────┴───────┴─────────────────┘

helios analyze

Send your usage summary to Claude for cost optimization insights.

helios analyze

helios start

Confirm tracking is active for the current branch (optional — all commands auto-detect the branch).

How it works

  1. helios sync reads Claude Code's JSONL session logs (~/.claude/projects/)
  2. Extracts token usage, model, and git branch from each assistant response
  3. Calculates cost using per-model pricing
  4. Stores events in a local SQLite database (~/.helios/helios.db)
  5. helios report aggregates per feature branch

All data stays local. No cloud, no auth, no config files.

Requirements

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

helios_cli-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

helios_cli-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file helios_cli-0.1.0.tar.gz.

File metadata

  • Download URL: helios_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for helios_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a182958aaa11eb97bbf90b87114bfb5332ab0926c1ed31a2184dbdc65bb1fbc6
MD5 247d3beafdfed517fec0784f22defb4a
BLAKE2b-256 fc57ad2dadb3a6e09a4c900e2b68714284b4194e560e9a65268a3e91c69df0a9

See more details on using hashes here.

File details

Details for the file helios_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: helios_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for helios_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b204ce1dc57e2e55a46a660b85863fa4fc119a0c10c96b76e1f2b60d5a2a81a
MD5 08b227aac3151db962694615120f51d8
BLAKE2b-256 3d7bc471b2aef4776d691027933325a38d314ad710db48245fa26cbf7e590cd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page