export declare const HELP_TEXT = "ai-usage -- local token usage and cost across coding agents\n\nUsage: ai-usage [options]\n\nCommands:\n report Verdict, where usage went, what to change (same as usage_report)\n Defaults to the last 7 days.\n status Collectors, data stores, database path, record counts, last sync\n sync Run the collectors and store what they find\n stats Totals for a period, split by client (same numbers as the usage_summary MCP tool)\n models Per-model tokens and cost (same as model_usage)\n clients Per-client tokens and cost (same as client_usage)\n projects Per-project tokens and cost (same as project_usage)\n sessions Recent sessions (same as recent_sessions)\n session One session in detail (same as session_usage)\n daily Per-day breakdown (same as daily_usage)\n breakdown Two or more dimensions at once (same as usage_breakdown)\n counterfactual These tokens on another model (same as counterfactual_cost)\n budget Spend against a target, with run rate and projection\n limits Pro/Max 5-hour and weekly limit usage (same as plan_usage)\n statusline One line for Claude Code's status bar; also keeps the\n plan-limit readings `limits` reports. Reads Claude Code's\n status-line JSON on stdin. Ends with the session's context\n size (ctx 77k), yellow from --ctx-warn, red from --ctx-limit.\n hook Claude Code UserPromptSubmit hook: warns Claude and you when the\n session's context is at or above --ctx-limit, silent otherwise.\n Reads the hook JSON on stdin, opens no database, always exits 0.\n export One row per stored turn, as CSV or JSON Lines\n import Merge JSON Lines from another machine (idempotent)\n prune Remove records older than a date (dry run without --yes)\n vacuum Compact the database file after a prune\n verify Re-read the source data and diff it against the local database\n version Print the installed version\n help Show this text\n\nPeriod options (default: all time):\n --today Just today, local time\n --days N Last N days, from local midnight\n --since Explicit start (inclusive)\n --until Explicit end (exclusive)\n --compare previous stats only: also report the equal-length window before this one,\n with the delta. Needs a period of fixed length: --days, --today,\n or --since AND --until. Open-ended (--since alone, --until alone,\n all time) has no window before it and is rejected, not ignored.\n --grain daily only: hour | day | hour-of-day (default day).\n hour-of-day collapses every day onto one 24-slot local clock.\n --by a,b breakdown only: up to 3 of client, model, provider, project,\n session, day, hour, hour-of-day. Crosses them in one query.\n\nScope options (repeatable, or comma-separated; each matches ANY value given):\n --client claude-code | opencode | codex\n --model Restrict to these models (--model a,b or --model a --model b)\n --project Restrict to these projects (their working directories)\n --target-models a,b counterfactual only: models to price the selected tokens AGAINST.\n Not a filter -- `--model` chooses which turns, this chooses the\n rates. (`--models` is an accepted alias.)\n\nList options (sessions, models, projects, clients):\n --limit N Rows to return\n --offset N Rows to skip, for paging. Output tells you the next offset.\n --sort tokens | reported-cost | estimated-cost | records | sessions | recent\n Default: recent for sessions, tokens elsewhere. There is no plain\n `cost`: reported and estimated cost are never summed, so ordering by\n one sorts every row priced on the other basis as $0.\n --no-subagents Exclude subagent/sidechain turns (included by default)\n --all-stores Read every detected data store, not only the one the client itself uses\n --full Ignore saved sync cursors and re-read everything\n --json Emit JSON instead of text\n --no-color statusline only: no ANSI colour (NO_COLOR=1 does the same)\n --ctx-warn statusline, hook: context size where `ctx` turns yellow. Takes 150k,\n 1.5m or 150000. Default 150k; AI_USAGE_CTX_WARN sets it too.\n --ctx-limit statusline, hook: context size where compacting is advised (red, and\n the hook speaks up). Default 250k; AI_USAGE_CTX_LIMIT sets it too.\n\nScripting options:\n --field Print ONE value from the JSON result and nothing else, so a shell\n can use it without jq. e.g. --field overall.cost.estimated\n --fail-over Exit 1 when --field's value exceeds n. Requires --field: there is\n no default, because reported and estimated cost are never summed\n and a default would ignore every record priced the other way.\n --format export only: csv (default) | jsonl. --csv is shorthand for csv.\n\nLifecycle options:\n --before prune only: remove records BEFORE this instant (exclusive), so\n --before 2026-01-01 removes 2025 and keeps New Year's Day.\n --yes prune only: actually delete. Without it, prune is a dry run.\n\nBudget options (budget command):\n --amount N The target, in USD. Required.\n --basis reported | estimated. Required -- the two are never summed, so a\n budget with no stated basis is a budget against nothing.\n --period

month (default) | week. Calendar periods only: a projection needs\n a period end to aim at, which a rolling window has not got.\n `budget` exits 1 when spend already exceeds the target.\n\nExamples:\n ai-usage sync\n ai-usage stats --today\n ai-usage stats --days 7\n ai-usage models --days 30 --client claude-code\n ai-usage projects --days 30\n ai-usage stats --days 7 --compare previous\n ai-usage daily --days 7 --grain hour\n ai-usage daily --days 30 --grain hour-of-day\n ai-usage breakdown --by project,day --days 30\n ai-usage breakdown --by model,day --days 7 --sort estimated-cost\n ai-usage sessions --limit 5\n ai-usage sessions --sort estimated-cost --limit 5 # the costliest, not the latest\n ai-usage projects --sort estimated-cost --limit 10\n ai-usage sessions --limit 100 --offset 100 # page two\n ai-usage models --model claude-opus-5,claude-sonnet-5\n ai-usage counterfactual --today --target-models claude-sonnet-5,claude-haiku-4-5\n ai-usage counterfactual --model claude-opus-5 --target-models claude-sonnet-5\n ai-usage budget --amount 500 --basis estimated\n ai-usage budget --amount 20 --basis reported --period week\n ai-usage export --days 30 > usage.csv\n ai-usage export --format jsonl > laptop.jsonl # then, on the desktop:\n ai-usage import laptop.jsonl\n ai-usage prune --before 2026-01-01 # dry run\n ai-usage prune --before 2026-01-01 --yes && ai-usage vacuum\n ai-usage stats --today --field overall.cost.estimated\n ai-usage stats --today --field overall.cost.estimated --fail-over 25 # exit 1 if over\n ai-usage limits\n ai-usage verify\n\nStatus line: add this to ~/.claude/settings.json, after `npm i -g ai-usage-mcp`:\n \"statusLine\": { \"type\": \"command\", \"command\": \"ai-usage statusline\" }\nClaude Code passes it your plan-limit usage; `ai-usage limits` reports what it kept.\n\nContext warning: every turn re-sends the whole conversation, so a long session gets costly.\nAdd this beside statusLine to be told before it does (the status line shows `ctx 77k`):\n \"hooks\": { \"UserPromptSubmit\": [ { \"hooks\": [\n { \"type\": \"command\", \"command\": \"ai-usage hook\", \"timeout\": 10 } ] } ] }\n\nNotes:\n `status` also checks npm for a newer version, at most once a day. It sends no\n data, gives up after 1.5s offline, and `AI_USAGE_NO_UPDATE_CHECK=1` disables it.\n\n `sync` also downloads LiteLLM's public price list, at most once a day, to price\n Claude models released after the built-in table. It only fills models the table\n lacks, sends no data, and `AI_USAGE_NO_PRICING_REFRESH=1` disables it (as does\n `AI_USAGE_NO_UPDATE_CHECK=1`).\n\n Cost from OpenCode is what OpenCode reported. Cost for Claude Code and Codex is\n an API-equivalent estimate from a versioned pricing table, because neither\n records a cost -- on a subscription your marginal cost per request is $0. The\n two are never added together.\n";