Skip to content

Kilo Data Source (Beta)

ccusage can read Kilo CLI usage data as one of its supported local data sources. Kilo stores local session data in a SQLite database with model, token, cache, and cost fields.

Focused Views

bash
# Recommended
bunx ccusage kilo --help

# Alternative package runners
npx ccusage@latest kilo --help
pnpm dlx ccusage kilo --help
pnpx ccusage kilo --help

Data Source

The CLI reads Kilo messages from KILO_DATA_DIR (defaults to ~/.local/share/kilo). KILO_DATA_DIR can be one directory or a comma-separated list of directories.

bash
KILO_DATA_DIR="$HOME/.local/share/kilo,/backup/kilo" ccusage kilo daily
text
~/.local/share/kilo/
└── kilo.db

Report Views

Focused viewDescriptionSee also
ccusage kilo dailyAggregate usage by date (YYYY-MM-DD)Daily Usage
ccusage kilo monthlyAggregate usage by month (YYYY-MM)Monthly Usage
ccusage kilo sessionPer-session breakdownSession Usage

These views support --json for structured output and --compact for narrow terminals. See the linked ccusage documentation for detailed flag descriptions.

Environment Variables

VariableDescription
KILO_DATA_DIROverride the root directory, or comma-separated root directories, containing Kilo data
LOG_LEVELAdjust verbosity (0 silent ... 5 trace)

Cost Calculation

When Kilo records a cost (including 0), ccusage uses that value. Otherwise, costs are calculated from token counts using LiteLLM pricing.

Troubleshooting

No Kilo usage data found

Ensure the data directory exists at ~/.local/share/kilo/ and contains kilo.db. Set KILO_DATA_DIR for custom paths or comma-separated archive roots.

Costs showing as $0.00

If Kilo did not record a cost and the model is not in LiteLLM's database, the cost will be $0.00. Open an issue to request alias support.

Released under the MIT License.