CLI reference¶
Hermes Usage Insights ships a single CLI entry point: hui.
It is designed around a local SQLite database plus subcommands for ingestion, reporting, search, export, and plotting.
Global option¶
All commands accept:
--dbsets the SQLite database path- if the database does not exist yet, the repository layer initializes it automatically on connect
hui initis still the explicit setup command when you want to create the DB deliberately before other operations
Setup¶
Command map¶
init¶
Initialize the SQLite database explicitly.
Typical output:
demo-data¶
Insert deterministic demo events so you can verify reports, search, plots, and exports before wiring real Hermes data.
Typical output:
ingest-jsonl¶
Consume newline-delimited JSON usage events.
Typical output:
Behavior notes:
- event ids are deterministic when omitted by the caller
- repeated ingests of the same event stream do not duplicate stored rows
import-hermes¶
Import Hermes cumulative totals from state.db plus transcript-derived tool-call events.
Typical output:
Behavior notes:
- prefers
state.dbwhen present - falls back to
sessions.jsontotals when needed - imports session deltas incrementally
- imports transcript tool-call events idempotently
watch-hermes¶
Continuously import Hermes totals and transcript tool calls on a polling interval.
uv run hui \
--db artifacts/hermes-usage.db \
watch-hermes \
--hermes-home /path/to/hermes-home \
--interval-seconds 60
Useful flags:
--interval-seconds FLOAT— polling interval, default60.0--iterations INT— optional bounded iteration count for tests or smoke runs
Bounded test example:
uv run hui \
--db artifacts/hermes-usage.db \
watch-hermes \
--hermes-home /path/to/hermes-home \
--interval-seconds 5 \
--iterations 2
Behavior notes:
- prints an
imported: Nline after each polling cycle - exits cleanly after the bounded iteration count when
--iterationsis used - prints
stoppedon keyboard interrupt
report summary¶
Show high-level totals across the database.
uv run hui --db usage.db report summary
uv run hui --db usage.db report summary --since 2026-04-09 --until 2026-04-10
Use this first when you want to know whether the database is populated and roughly what is inside it.
Useful flags:
--since YYYY-MM-DD— include events on or after the given day--until YYYY-MM-DD— include events on or before the given day
report breakdown¶
Show grouped breakdowns by one dimension.
uv run hui --db usage.db report breakdown --by tool
uv run hui --db usage.db report breakdown --by skill
uv run hui --db usage.db report breakdown --by session
uv run hui --db usage.db report breakdown --by model
uv run hui --db usage.db report breakdown --by day
uv run hui --db usage.db report breakdown --by provider
uv run hui --db usage.db report breakdown --by source
Supported values for --by:
toolskillsessionmodeldayprovidersource
Useful flags:
--since YYYY-MM-DD— include events on or after the given day--until YYYY-MM-DD— include events on or before the given day
Interpretation note:
- in collector mode,
--by toolis best understood as tool frequency unless the upstream event source emitted exact tool-level token counts
search¶
Search stored event text.
uv run hui --db usage.db search "browser_navigate"
uv run hui --db usage.db search "failing test" --limit 10
uv run hui --db usage.db search "browser_navigate" --since 2026-04-09 --until 2026-04-10
Useful flags:
--limit INT— maximum number of returned rows, default20--since YYYY-MM-DD— include events on or after the given day--until YYYY-MM-DD— include events on or before the given day
Output format:
- tab-separated lines containing timestamp, session id, tool name, skill name, total tokens, and notes
Behavior notes:
- search is normalized substring matching over stored event text
- it is intentionally simpler than a full-text search engine
plot daily-tokens¶
Render a PNG showing daily token totals.
mkdir -p artifacts
uv run hui --db usage.db plot daily-tokens --output artifacts/daily.png
uv run hui --db usage.db plot daily-tokens --since 2026-04-09 --until 2026-04-10 --output artifacts/daily-window.png
Useful flags:
--since YYYY-MM-DD— include events on or after the given day--until YYYY-MM-DD— include events on or before the given day
Typical output:
export csv¶
Export stored events as a flat CSV.
mkdir -p artifacts
uv run hui --db usage.db export csv --output artifacts/usage.csv
uv run hui --db usage.db export csv --since 2026-04-09 --until 2026-04-10 --output artifacts/usage-window.csv
Useful flags:
--since YYYY-MM-DD— include events on or after the given day--until YYYY-MM-DD— include events on or before the given day
Typical output:
Typical workflows¶
Local proof with demo data¶
uv sync
uv run hui --db usage.db demo-data
uv run hui --db usage.db report summary
uv run hui --db usage.db report breakdown --by tool
uv run hui --db usage.db plot daily-tokens --output artifacts/daily.png
One-shot Hermes backfill¶
uv run hui \
--db artifacts/hermes-usage.db \
import-hermes \
--hermes-home /path/to/hermes-home
uv run hui --db artifacts/hermes-usage.db report summary
uv run hui --db artifacts/hermes-usage.db export csv --output artifacts/hermes-usage.csv
Continuous no-source-change collector¶
uv run hui \
--db artifacts/hermes-usage.db \
watch-hermes \
--hermes-home /path/to/hermes-home \
--interval-seconds 60
JSONL ingestion path¶
uv run hui --db usage.db ingest-jsonl path/to/events.jsonl
uv run hui --db usage.db report breakdown --by model
uv run hui --db usage.db search "browser_navigate"
Common misconceptions¶
initis explicit setup, but most commands can initialize the database automatically when they connect.watch-hermesis not the same as richer event attribution; it is the continuous version of collector mode.searchis intentionally simple substring matching, not a fuzzy or ranked search engine.