Skip to main content

Track token usage and costs across Kiro CLI sessions

Project description

kiro-usage

Track token usage and costs across Kiro CLI sessions.

Real-time terminal dashboard with session archiving that persists across /clear and restarts.

Install

# install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

uv tool install kiro-usage && kiro-usage install

Usage

kiro-usage              # today's usage, live refresh
kiro-usage week         # last 7 days
kiro-usage month        # last 30 days
kiro-usage all          # all time
kiro-usage --json       # JSON output
kiro-usage --no-live    # print once and exit

Service Management

kiro-usage install      # register background archiver (launchd / systemd)
kiro-usage uninstall    # remove background archiver
kiro-usage status       # check archiver status

The background archiver watches the Kiro CLI database and snapshots sessions to ~/.kiro_sessions/ every 10 seconds. This ensures session data is preserved even if you /clear or quit Kiro CLI.

How It Works

kiro-cli SQLite DB
       │
       │ mtime change (every 10s)
       ▼
  kiro-usage-archiver  ──► ~/.kiro_sessions/*.json
  (launchd / systemd)

  kiro-usage viewer    ◄── ~/.kiro_sessions/*.json
  (on-demand)

Metrics:

  • CacheWrite — new tokens per turn (estimated, chars/4)
  • CacheRead — prior context resent to API (estimated)
  • Output — tokens streamed back (from chunks, accurate)
  • Cost — cache-aware pricing estimate (5-min cache write rate)

Uninstall

kiro-usage uninstall
uv tool uninstall kiro-usage

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

kiro_usage-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

kiro_usage-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kiro_usage-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kiro_usage-0.1.0.tar.gz
Algorithm Hash digest
SHA256 44d0db1b9d9db61380ca76b959d63373d29c65357ec8265564977c5fdc7ba0cf
MD5 1dae55f459fd10e6b5ee071312692a8e
BLAKE2b-256 c91408569ed3bd4fbfd4992b525b7d58b8790c7c6d3131522a4b37f8988a73be

See more details on using hashes here.

Provenance

The following attestation bundles were made for kiro_usage-0.1.0.tar.gz:

Publisher: publish.yml on weswes0/kiro-usage-tracker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: kiro_usage-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kiro_usage-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29e083c70bd2961f8c3179b16c0ab590f71345878b819b2915eda06edd1f8317
MD5 0dcaa4fb44e23b7af2ec2b081a7b2cf6
BLAKE2b-256 020028c2a567e32658b788c9ba1a36551af434d3a21600cf3c55bfa120da1568

See more details on using hashes here.

Provenance

The following attestation bundles were made for kiro_usage-0.1.0-py3-none-any.whl:

Publisher: publish.yml on weswes0/kiro-usage-tracker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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