Skip to content

Stats and Behavior

Hansard provides complementary activity views over normalized archive metadata. Availability and precision depend on what each source records.

Open Stats in the viewer for charts, breakdowns, activity calendars, and project/provider filters. The terminal surface returns the same core archive summary:

Terminal window
hansard stats
hansard stats --provider codex-cli --since 30d
hansard stats --repo github.com/acme/widgets --top 25

Use --tools to print only tool, skill, MCP server, slash-command, file-reference, and shell-command sections:

Terminal window
hansard stats --tools

Use JSON for agents and scripts:

Terminal window
hansard stats --json --top 100
Option Purpose
--provider <provider-or-alias> Filter to one provider or source alias.
--since 30d|90d|all Select the archive date window.
--repo <repo-key> Filter to an exact canonical project key.
--top <count> Set rows per table and cap detailed JSON arrays.
--tools Print only tool and command usage sections.
--include-sdk-jobs Include one-shot SDK jobs in resource totals.
--json Return the complete Stats payload.

One-shot SDK batch jobs are excluded from headline resource totals by default so automation does not overwhelm interactive activity. --include-sdk-jobs adds their resource use, but conversation-behavior measures remain separate.

Behavior compares a bounded window with the equal-length window immediately before it. The viewer presents changes in sessions, human turns, spend, files touched, session shape, work times, and the largest provider, model, repository, tool, command, and skill movers.

Terminal window
hansard behavior
hansard behavior --period 3m
hansard behavior --period 1y --end 2026-06-30 --json
Option Purpose
--period 1m|3m|6m|1y Select the comparison period; the default is one month.
--end YYYY-MM-DD Set the inclusive end date in local time.
--json Return the complete Behavior payload.

An empty previous window produces an explicit no-baseline state rather than an invented percentage change.

Use for cumulative totals, distributions, model and provider comparisons, tool usage, activity calendars, and spend estimates.

Session classification is off by default. It can label work mode, outcome, and success or failure evidence for separate analysis:

Terminal window
hansard classify status
hansard classify enable
hansard classify run --limit 25
  • Token and cost fields are exact only when the source reports them completely.
  • Provider-reported cost is used when available; other spend values are estimates based on the versioned pricing table.
  • Unpriced tokens remain visible and are not silently folded into spend.
  • Tool arguments are unavailable for providers that record tool names without their inputs.
  • Reimport or rebuild requirements depend on which archive contract changed; avoid treating a missing chart as zero activity until source coverage is checked.