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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44d0db1b9d9db61380ca76b959d63373d29c65357ec8265564977c5fdc7ba0cf
|
|
| MD5 |
1dae55f459fd10e6b5ee071312692a8e
|
|
| BLAKE2b-256 |
c91408569ed3bd4fbfd4992b525b7d58b8790c7c6d3131522a4b37f8988a73be
|
Provenance
The following attestation bundles were made for kiro_usage-0.1.0.tar.gz:
Publisher:
publish.yml on weswes0/kiro-usage-tracker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kiro_usage-0.1.0.tar.gz -
Subject digest:
44d0db1b9d9db61380ca76b959d63373d29c65357ec8265564977c5fdc7ba0cf - Sigstore transparency entry: 1019135225
- Sigstore integration time:
-
Permalink:
weswes0/kiro-usage-tracker@45686d8edbcdc215a673178c24c830790d4f5405 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/weswes0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@45686d8edbcdc215a673178c24c830790d4f5405 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29e083c70bd2961f8c3179b16c0ab590f71345878b819b2915eda06edd1f8317
|
|
| MD5 |
0dcaa4fb44e23b7af2ec2b081a7b2cf6
|
|
| BLAKE2b-256 |
020028c2a567e32658b788c9ba1a36551af434d3a21600cf3c55bfa120da1568
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kiro_usage-0.1.0-py3-none-any.whl -
Subject digest:
29e083c70bd2961f8c3179b16c0ab590f71345878b819b2915eda06edd1f8317 - Sigstore transparency entry: 1019135235
- Sigstore integration time:
-
Permalink:
weswes0/kiro-usage-tracker@45686d8edbcdc215a673178c24c830790d4f5405 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/weswes0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@45686d8edbcdc215a673178c24c830790d4f5405 -
Trigger Event:
push
-
Statement type: