cmduse
Live Command Code usage dashboard for your terminal.
What it is
Plan dashboard, account-wide usage reports (all harnesses), offline local reports, and a customisable statusline.
Install
brew install JeffreyJYZ/tap/cmduse # macOS (Homebrew)
cargo install cmd-usage # any platform with RustQuick start
Command Code Usage · GOAT · active
Period ends 2026-09-27
Credits $59.12 / $70.00 monthly · $0.00 purchased · $0.00 free
Usage windows
Monthly 15.1% ━━╱╱╱╱╱╱╱╱ $10.56 / $70.00 · resets in 22d 9h · window 28% elapsed · $19.60 by now
5-hour 1.5% ╱╱╱╱╱╱╱╱╱╱ $0.21 / $14.00 · resets in 4h 58m · window 0% elapsed
Weekly 15.8% ━╱╱╱╱╱╱╱╱╱ $5.54 / $35.00 · resets in 6d 5h · window 11% elapsed · on pace to hit cap in 4d 3h
This billing period
Requests 856 · Cost $10.69 · Tokens 89.5M in / 265.7K out · Success 100% · 15.3% of creditsThe trailing N% of credits is this period's cost against the plan table's
monthly cap — the one period-wide share the dashboard states, and absent on a
plan with no published cap. It is computed locally, so it keeps one decimal.
Usage
cmduse # live dashboard, redraws in place (default every 5s)
cmduse -1 # one-shot fetch, print, exit
cmduse -V # print version
cmduse -p -1 # plain output, no ANSI (for scripts/pipes)
# same fields as the colored dashboard: period end,
# monthly quota, Monthly row (+ $X by now), window % elapsed
# (also what the MCP `usage` tool and the opencode
# /cmd-usage dialog render)
cmduse -i 30 # refresh every 30s
cmduse -i 5m # duration suffixes: s, m, h, d
cmduse -w 40 # 40-char progress bars (--bar-width)
cmduse --width 40 # wrap the live watch frame at 40 columns
cmduse -b 60 # 60 spend-burst samples (--bursts)
cmduse -W # force watch mode (the default; conflicts with -1)
cmduse watch # explicit watch mode (same as bare cmduse)
man cmduse # full behavior spec (brew installs the man page)
cmduse daily --days 14 # account usage by day (all harnesses, from usage API)
# --days max 365, fetched 8-at-a-time
cmduse daily --local # CLI-logs-only (offline, misses other harnesses)
cmduse daily --tz +05:30 # bucket by a fixed UTC offset instead of UTC
cmduse daily --local --tz +05:30 # ...the local-log path honors --tz too
cmduse hourly --hours 6 # account usage by hour (default 24, max 168)
cmduse hourly --local # hourly from local CLI logs (offline)
cmduse model # local usage by model (all time)
cmduse model 'zai-org/GLM-5.2' # one model's row: requests, tokens, cost, share
cmduse model --days 30 # ...only the last 30 days
cmduse model --since 2026-08-27T00:00:00Z # ...or since a billing-period start
cmduse model --rows 10 # trim any report table's rows (0 = every row, the default)
cmduse session --days 30 # local usage by project, same window flags
cmduse models # live model list from the Command Code API
cmduse models --gated # ...only models the current plan allows
cmduse models --gated --json # every model annotated with allowed + reason
cmduse plans # plan comparison table (marks your plan)
cmduse statusline # compact one-liner for prompts/tmux
cmduse mcp # MCP stdio server (usage/plans/models/daily/hourly/session/model tools)
cmduse daily --json # JSON output (daily, hourly, model, session, models, statusline, plans, -1)
cmduse daily --csv # CSV output for daily/hourly/model/sessionAll four binaries accept --rows (0 = every row). It caps the text report
table only — --json and --csv always carry every row, and a trimmed table
ends with … N more.
All four binaries also accept --width <n> (1–1000): the live watch frame and
one-shot text wrap at that many UTF-8 bytes of visible text (ASCII is one byte
per column; a multibyte glyph costs its encoded bytes, so byte-counting tools
such as awk length agree with the flag and no row is wider on screen).
Lines wrap on word boundaries, keep the original
left margin and colour on every continuation row, and lose no characters — the
old per-line clip cut a long note mid-sentence with no ellipsis. A line that
already fits is unchanged. The width comes from --width, else the terminal's
own column count, else COLUMNS, else 100; it is re-resolved each refresh so a
resize follows live. --json/--csv ignore it entirely.
One-shot text output uses the same width and wrapper, including the dashboard
and the prose around report tables. Table rows are left byte-identical: a
column is aligned data, not a word, so reflowing it would break the table.
Do not rely on --width to narrow a table; pass --rows to shorten one.
Color: SGR escapes are suppressed when stdout is not a terminal or when NO_COLOR is set non-empty. The live dashboard's spinner goes straight to /dev/tty, so it only runs when stdout is a terminal — --plain, or any piped or redirected run, never writes to the terminal at all. -p/--plain is parsed globally, so every subcommand accepts it; on reports it is a no-op rather than an error, and --json/--csv remain the machine-readable paths.
MCP server
cmduse mcp runs an MCP stdio server (newline-delimited JSON-RPC, hand-rolled — no extra dependencies) so any MCP-capable host (Zed, and others) can call Command Code usage as tools:
| Tool | Body |
|---|---|
usage | one-shot dashboard (same as cmduse -1) |
plans | plan comparison table (same as cmduse plans) |
models | live model list, filtered to the current plan (same as cmduse models --gated); args gated (default true) |
daily | account daily report; args days, tz (±HH:MM), local |
hourly | account hourly report; args hours, tz, local |
session | local usage by project/session; args since (ISO-8601), days, tz, rows |
model | local usage by model; args since (ISO-8601), days, tz, rows, and id for one model's detail instead of the table |
The tool names are the same in all four servers, and an argument means the same thing wherever it exists. Where a source forces a difference it is stated rather than papered over: ocuse and arkuse add plan (the plan their source cannot report), as does oduse, and their session/model carry no tz — their store is already bucketed in the offset the server reports — while cmduse's session/model do take tz and their daily/hourly additionally take local. oduse has no gated: OpenDesign prices models differently rather than restricting them. Tests pin each server's own list. |
Auth is the same as the CLI (CMD_API_KEY, then the key opencode's own credential store holds for the commandcode provider, then the legacy ~/.commandcode/auth.json). A key the API refuses is skipped for the next one, so a superseded login costs one 401 rather than a dead dashboard. Tool errors come back as isError: true results; stdout carries protocol traffic only. Zed config:
{
"context_servers": {
"cmduse": { "source": "custom", "command": "cmduse", "args": ["mcp"] },
"ocuse": { "source": "custom", "command": "ocuse", "args": ["mcp"] },
"arkuse": { "source": "custom", "command": "arkuse", "args": ["mcp"] },
"oduse": { "source": "custom", "command": "oduse", "args": ["mcp"] }
}
}-1 --json emits a single dashboard object (plan, credits, both windows, billing summary, source, and the period bounds periodStart/periodStartAt/periodEndAt in epoch ms beside the display date periodEnd). statusline --json carries one shared key set on all four binaries: fiveHourSpent/fiveHourCap, weeklySpent/weeklyCap, monthSpent/monthCap, plus plan, source, period, periodEnd and model. The older fiveHourUsed/weeklyUsed/monthlyRemaining remain as aliases on every binary; a cap a plan does not publish is null, never 0. A family may add its own unit keys on top (afp on arkuse, capLabel/walletUsd/walletSource on oduse, catalogSource/catalogAt/catalogAgeSecs on ocuse and oduse — which catalogue the price rows came from), but no binary drops a shared key. --gated --json on models emits every model with allowed and reason instead of filtering.
GNU forms are accepted: --interval=5m, --days=14, and attached short values like -i30 / -w40. --last/-l are aliases for --days.
Cap alerts: in watch mode a desktop notification fires once when a window crosses into overflow (macOS osascript, Linux notify-send). Disable with cmduse config set notify=false.
Burn-rate: windows show on pace to hit cap in … when the current spend rate projects hitting the cap before the window resets, and only once the window is ≥10% elapsed (flat-rate projection is unreliable early). ponytail: assumes flat spend rate; bursty sessions shift the ETA.
Watch mode: a spend bursts (N samples) sparkline shows $ spent per refresh. It is on by default, hidden while idle (all-zero deltas), and its sample count is configurable. Session-only: a fresh run starts a fresh trend (no stale data from earlier runs):
cmduse config set burst_on=false # turn the sparkline off
cmduse config set burst=80 # 80 samples (5–240)
cmduse -b 120 # same for one runStatusline
Template-driven via config. Placeholders:
| Placeholder | Shows |
|---|---|
{plan} | plan name (GOAT, Pro, …) |
{credits} | remaining monthly credits |
{cap} | monthly cap |
{credits_bar} | monthly usage bar |
{5h_bar} {5h_pct} {5h_used} {5h_cap} {5h_eta} | 5-hour window (eta = pace text, empty when none) |
{wk_bar} {wk_pct} {wk_used} {wk_cap} {wk_eta} | weekly window |
cmduse config set sl="{plan} {credits}/{cap} 5h:{5h_pct} wk:{wk_pct}"
cmduse config set sl="{credits_bar}" # just one bar
cmduse config set sl_colors=false # strip ANSI
cmduse config set sl_ascii=true # #--- bars instead of ━╱╱Multi-line templates work (newlines allowed). Unknown placeholders are dropped. Wire into your shell prompt or tmux status:
# .zshrc / tmux status-right
status() { cmduse statusline 2>/dev/null; }CMD_API_KEY env var overrides the stored key — point cmduse at any account without touching the credential opencode's store holds for the commandcode provider.
Config
~/.config/cmd-usage/config.json:
{
"interval_secs": 5,
"bar_width": 20,
"burst_enabled": true,
"burst_samples": 40,
"notify_on_cap": true,
"statusline_template": "{plan} {credits}/{cap} · 5h {5h_bar} · wk {wk_bar}",
"statusline_colors": true,
"statusline_ascii": false,
"check_updates": true,
"dismissed_update": null
}CLI flags override config. cmduse config set interval=<s> width=<n> burst_on=<bool> burst=<n> notify=<bool> sl=<tpl> sl_colors=<bool> sl_ascii=<bool> update_check=<bool> dismissed_update=<ver>.
Updates
Once per day (cache at ~/.cache/cmd-usage/last-check) the dashboard checks crates.io; when a newer cmd-usage exists it shows a boxed notice inside the watch frame (stderr for -1). The cached version is replayed every run, so the reminder persists until you upgrade. Dismiss or disable:
cmduse --dismiss-update # hide this version until a newer one
cmduse config set update_check=false # never check
cmduse config set dismissed_update=<ver>Data sources
- Dashboard / daily / hourly / statusline: Command Code API with your account key. Daily and hourly cover every harness that used the key (CLI, Provider API, other agents). With no key to resolve,
dailyfalls back to the local CLI logs — the same data--localgives — rather than failing. - model / session / daily --local: local session logs at
~/.commandcode/projects— offline, but only what the CLI recorded. Thepianddshsession logs are read too, counting only their calls on acommand-code*provider, so a harness other than the CLI still shows up (their roots are~/.pi/agent/sessionsand~/.dsh/sessions, override withPI_SESSIONS_DIR/DSH_SESSIONS_DIR).model/sessionare all-time unless given--days Nor--since <ISO>; the usage API has no per-model split, so local logs are the only per-model source.--rows Ntrims any report table —daily,hourly,modelandsession— to its newestNrows and ends it with… N morewhen it withheld any (0= every row, the default for a report); it never touches--json/--csv, which always carry every row.
Requirements
Keyed on a Command Code account — either one connected through opencode (v2 keeps provider credentials in its store's credential table, and cmduse reads the commandcode entry, active row first) or the official CLI's ~/.commandcode/auth.json (run cmd login if neither exists), or set CMD_API_KEY. A key the API answers 401 for is skipped for the next candidate, so a login superseded by a re-connect does not read as a broken dashboard.
How it works
ocuse — OpenCode Go/Zen (same crate, second binary)
The same crate ships ocuse, which tracks OpenCode Go (the Go subscription) and OpenCode Zen (pay-as-you-go) at full command/flag parity with cmduse — same subcommands, same --json/--csv, same config keys, same update check and cap notification. The two share one front-end (cli.rs parses both binaries' argv, config.rs owns both config files) and cmduse's render/watch/sparkline helpers; only the data source and the flags it forces differ (--plan/--window/--period-start/--infer-anniversary/--db/--no-api/--no-catalog/--cache are ocuse-only, --local is cmduse-only).
ocuse # watch: live frame (colour, gauges, spend-burst sparkline)
ocuse -1 # one-shot dashboard
ocuse -1 --json # one-shot, machine-readable
ocuse daily [--days N] [--json|--csv] [--tz ±HH:MM]
ocuse hourly [--hours N] [--json|--csv] [--tz ±HH:MM]
ocuse model [id] [--days N | --since ISO] [--json|--csv]
ocuse session [--since ISO] [--json|--csv]
ocuse models [--gated] [--json] # the Go catalogue for the selected plan
ocuse plans [--json] # every plan's limits, rates and window shares
ocuse statusline [--json] # compact one-liner, or its numbers as JSON
ocuse mcp # MCP stdio server (usage/plans/models/daily/hourly/session/model)Two upstream facts shape it: OpenCode Go does have a usage API (the console's own source), and Go's allowance is per model — each model has a monthly dollar limit with windows of 5h = 20%, weekly = 50%, monthly = 100%. So ocuse reads GET https://opencode.ai/zen/go/v1/usage with the Go key (OCUSE_API_KEY, OPENCODE_API_KEY, else the live credential opencode itself is using — credential in opencode.db, which is where v2 and /connect write it, with the legacy ~/.local/share/opencode/auth.json as the fallback for a v1 install) for the three account meters — rolling (5-hour), weekly, monthly, each a percent and a reset instant, exactly what opencode.ai/console prints — and reports its own local usage from opencode.db (providers opencode-go and opencode, which record real cost) against a catalogue of token rates and per-model limits for everything the endpoint cannot give: the per-model table, daily/hourly/session, tokens. That catalogue is fetched live from GET https://opencode.ai/zen/go/v1/models (no key; 8s timeout, one retry on a transport fault), cached 6h under ~/.cache/cmduse/ (CMDUSE_CACHE_DIR moves it, --cache 30s|15m|6h|1d|0 sets the TTL, 0 disabling the cache), and only falls back to the copy baked into the binary from core/zen.json (regenerated with bun scripts/extract-zen.ts) when the endpoint and the cache both fail — --no-catalog forces that baked copy for offline use. Which one answered is never silent: the dashboard's catalogue: line, -1 --json's catalog object, statusline --json's catalogSource/catalogAt/catalogAgeSecs, the {catalog} statusline placeholder and the headers of plans/models all name live, cache, 3h old or builtin, with the fetch/generation time and, on a fallback, why the fetch failed. The endpoint carries the plan allowances too (go.monthly_usage, so every plan it publishes is listed, go-teams included), the token rates, the peak multiplier and model membership; each plan's $/month price and the 5h/weekly/monthly window split are the docs' and stay from the baked copy, as does the Zen pay-as-you-go table (a second endpoint). The endpoint's figures win wherever both exist, because the server's windows are not reproducible locally: its 5-hour window is a block that resets at its own instant, its week is anchored to Monday 00:00 UTC, its month is the subscription anniversary, and it meters with its own price basis (fitted from real rows, opencode's recorded cost sits below it). The local half is not opencode's store alone: pi (~/.pi/agent/sessions) and dsh (~/.dsh/sessions, zstd-compressed) run on opencode-go too and record a provider, model and token count per call, so their rows are read and counted, and the header names every client it read (from …/opencode.db + pi, dsh); both are opt-out-free and additive — override the roots with PI_SESSIONS_DIR / DSH_SESSIONS_DIR, and --json carries the list as clients. No key, no network, or --no-api leaves the windows as a local estimate, and the dashboard labels them that way. Go comes in three plans — Go ($10/mo), Go Plus ($40/mo) and Go Teams ($20/member/mo, 2-member minimum) — that share the token prices but grant different per-model limits; neither the store nor the endpoint names your plan, so ocuse selects it with --plan go|go-plus|go-teams (default go). ocuse models lists that catalogue for the plan (--gated keeps only the models the plan grants); ocuse models --json is one object per line, like cmduse models --json.
The billing period comes from the endpoint's own monthly reset instant (the anniversary — hence the dashboard's Go billing month label); without it the default is the calendar month, --period-start YYYY-MM-DD pins a real one, --window all|<n>d reports other ranges, --since <ISO-8601> pins an exact instant for model/session, and --tz shifts day/hour buckets. --days (default 120; -l and --last are aliases) bounds the read window; hourly uses --hours (default 24, max 168). ocuse -1 --json carries the period bounds in epoch milliseconds — periodStart (with the alias periodStartAt) and periodEndAt, the resolved end of the period (null for --window all, whose range has no boundary), whose display date is periodEnd — plus summary, the period's own aggregate ({cost, requests, tokens}, the same figures as totals.month), the per-model models, an account object with the three meters ({status, percent, resetsAt} each, null when the endpoint did not answer) and an accountError string naming why it is null when that is worth saying (HTTP 401 api_key_expired, no Go key, a transport fault — null when the endpoint answered, and for --no-api, where the missing meters are a deliberate choice). It also carries catalog ({source, at, ageSecs, error}): which catalogue priced the limits — live, cache or builtin — when it was fetched or generated, and why a fetch failed. The dashboard prints that reason under the GO heading, because "estimated locally" on its own cannot tell a missing key from an expired one, and only the expired one is something to act on (re-login does not renew it: create a new key in the OpenCode console). The dashboard names that end date on its period: line, splits period tokens in / out, and — when the endpoint answered — ends the line with the monthly share. When cap history is available that share is a time-weighted blend: the allowance actually in force is averaged over the elapsed part of the window, so a $80 limit raised to $100 a third of the way in yields ~$93.33 and $70 spent reads 75% used, not 70%. No dollar cap is printed beside the blend, because a blend has no single denominator. A fresh install has no cap history, so the endpoint's own figure is the headline and the line says (server). Cap changes are sampled on each catalogue load from a history file at ~/.cache/cmduse/ocuse-cap-history.json ($CMDUSE_CACHE_DIR moves it); a first run only establishes a baseline, a baked-seed load never writes, and recorded changes are never rewritten.
The current-cap figure is always filled from the published catalogue limit of the model actually used, never from history, so it is present even on a fresh install: $69.87 of $100 (69.9%) — current cap, not the period blend. When history sampled a move inside the period, one dim line names it (allowance raised $80 → $100 during this period). With no history, a gap between the server's figure and today's cap is itself evidence the basis moved: the output says the allowance changed during this period (DeepSeek V4.1 Flash); the server meters 76%, today's cap implies 69.9%, naming the model only when one accounts for nearly all the spend, and never inventing the unsampled old cap. The JSON adds account.monthly.percentSource ("blended" or "server"), serverPercent (the endpoint's number, carried unchanged), currentCap, currentCapPercent, an optional note for either kind of disagreement, and a top-level capChanges: [{model, from, to, at}]. The {month_pct} statusline placeholder, statusline --json's month_pct and month_pct_source, and the dashboard all carry the same blend — the server's figure when no blend was computed, null without an account. No dollar/percent pair is ever produced by dividing spend by a percentage — that would invent a ceiling the source never published. cmduse's Success N% is absent: opencode's own store records no per-request success/error signal.
ocuse renders with cmduse's own presentation: the same palette, the same severity-coloured gauges (green <70%, yellow 70–90%, red ≥90%), the same in-place watch redraw (cmduse's redraw_frame, so a shrinking frame never scrolls), and the same spend-burst sparkline. Both watch loop and gauges reuse cmduse/src/render.rs rather than a second copy. Every subcommand takes the colour flag — daily, hourly, session, model, models, plans and statusline included (bold headings, dim secondary text, cyan figures, an over-cap window or model flagged LIMIT EXCEEDED, and a TOP 3 MODELS block stating each of the period's biggest models' spend and share of period spend beside its tokens and share of all tokens). With the account meters in play each window row carries this store's own spend beside the server's share of the limit ($28.00 · 55% of limit), priced on the documented peak/off-peak schedule — opencode records the off-peak sheet for every turn, so its recorded cost reads ~40% under the console on peak-heavy days and is not what the rows use — keeping the elapsed share measured against the server's own resets, an on pace to hit cap in … ETA, and the monthly window's $X by now pro-rata figure. Each dollar/percent pair divides against the published per-model cap and its 20/50/100% window shares — a ceiling is never reverse-solved from a percentage (spend / share offered $40 against a documented $80 allowance, and the summed per-model limits were the old $215). Pace and the monthly $X by now use the published cap, or the time-weighted allowance when cap history sampled a move, and abstain entirely when no allowance is published. Each model's own limit, and its spend against it, stay in the table below. The per-model 5H/WK columns in the table stay local rolling windows and the dashboard says so. statusline's {five_hour_pct}/{weekly_pct}/{month_pct} (and their _bar forms) resolve to the account's shares when it answers and to a dash without it, while money placeholders stay local. --plain, NO_COLOR and a piped stdout drop colour and gauges; scripted output stays escape-free, and --json/--csv are never coloured.
Config lives at ~/.config/ocuse/config.json with the same keys as cmduse's: interval_secs, bar_width, burst_enabled, burst_samples, notify_on_cap, statusline_template, statusline_colors, statusline_ascii, check_updates, dismissed_update. The live frame refreshes every 5s, like cmduse's — interval_secs (or -i) is the knob. Set with ocuse config set interval=<s> width=<n> burst_on=<bool> burst=<n> notify=<bool> sl=<tpl> sl_colors=<bool> sl_ascii=<bool> update_check=<bool> dismissed_update=<ver>. The statusline template placeholders: {plan} {period} {month} {month_pct} {month_bar} {five_hour} {five_hour_pct} {five_hour_bar} (aliases {5h} {5h_pct} {5h_bar}), {weekly} {weekly_pct} {weekly_bar} (aliases {wk} {wk_pct} {wk_bar}), {catalog} (the catalogue in force: live, cache, 3h old, builtin) and {models} (top model by period spend).
arkuse — Volcengine ARK Agent Plan (same crate, third binary)
The same crate ships arkuse, which tracks a Volcengine ARK Agent Plan at the same command/flag parity as cmduse and ocuse — every subcommand, --json/--csv, the same watch frame, config keys, update check, cap notification and MCP server. ARK is metered in AFP, the plan's own unit, not in dollars: AFP = (input + cache_read + output) × coefficient / 10,000, one AFP is ¥0.002 at every tier. Cache reads are billed, and reasoning is not added again because it already sits inside output. Model coefficients, tier gates and the promo dates that halve them live in hand-maintained core/ark.json (the publisher documents them as prose, so there is no machine-readable source to extract from).
arkuse # watch: live frame (meters, gauges, model block)
arkuse -1 # one-shot dashboard
arkuse -1 --json # one-shot, machine-readable
arkuse daily [--days N] [--json|--csv] [--tz ±HH:MM]
arkuse hourly [--hours N] [--json|--csv] [--tz ±HH:MM]
arkuse model [id] [--days N | --since ISO] [--json|--csv]
arkuse session [--since ISO] [--json|--csv]
arkuse models [--gated] [--json] # the ARK catalogue, coefficient in force today
arkuse plans [--json] # personal tiers, AFP quotas, window shares
arkuse statusline [--json]
arkuse mcp # MCP stdio server (usage/plans/models/daily/hourly/session/model)Two sources, and the split matters. The control plane (arkcli usage plan --profile <name>, which arkuse shells out to so arkcli keeps owning the credential chain) returns the plan's own 5-hour / daily / weekly / monthly meters with their reset instants — the only figures that see every machine and every harness on the subscription. This store (opencode.db, provider agent-plan only) supplies the per-model attribution and the local estimate; pi and dsh session logs are read too, and only their agent-plan rows count, so the local half covers every client on this machine rather than opencode alone. Where both exist the meter wins for the window rows and the local AFP is printed beside it, labelled local; with no profile, no arkcli, or --no-api, the windows fall back to a rolling cut and say estimated locally — still as used / quota against the plan's published split (5-hour 10%, daily 50%, weekly 35%, monthly 100% of its AFP), so a window never degrades to AFP alone. The server's windows are not reproducible locally: the 5-hour window is a block with its own reset, the week is anchored to Monday 00:00, and the month is the subscription anniversary — so arkuse cuts this store's rows at reset − window rather than a rolling now − window, and prints dates in the server's own offset. A window the control plane reports without figures (a just-reset block comes back as total + percent only) is derived rather than rejected, and its countdown falls back to the oldest row still inside the cut. A text-only workload has no daily window (only media/Harness items do), so that row simply does not appear.
--plan small|medium|large|max selects the ARK tier (default: the profile's own plan_tier, else medium); --profile <name> names the arkcli profile (default $ARKUSE_PROFILE, else the first agent-plan profile), and --db overrides the store. The billing period comes from the meter's monthly reset; without it the default is the calendar month, with --period-start, --window all|<n>d and --since as in ocuse. --no-api skips arkcli entirely, so the tier then comes from --plan (or the catalogue default) and no profile is resolved.
ARK limits the plan, not any one model, so notify_on_cap fires per window meter (5-hour / weekly / monthly), and the model block shows a TOP 3 MODELS split — each model's month AFP and its share of period AFP, then its tokens and their share of all tokens — instead of a per-model allowance ARK does not have; the table below carries no share of its own. The plan's own semantics are surfaced where they matter: no downgrade, the monthly quota is pro-rated on upgrade while the 5-hour and weekly windows reset to the new tier immediately, and plain API calls against the plan base URL are forbidden (ban risk) — the catalogue's notes carry these in arkuse plans. arkuse plans also lists the enterprise seat prices; their AFP is metered per seat and the personal usage API does not expose it, so only prices are shown.
Config lives at ~/.config/arkuse/config.json with cmduse's keys (interval_secs, bar_width, burst_enabled, burst_samples, notify_on_cap, statusline_template, statusline_colors, statusline_ascii, check_updates, dismissed_update). The live frame refreshes every 5s like the other two — each refresh is an arkcli control-plane round trip, so raise interval_secs (or pass -i) if that feels heavy on your machine. arkuse daily|hourly|session|model --csv use the repo's shared columns with afp in place of cost_usd (afp counts every token the coefficient prices, cache reads included).
oduse — OpenDesign (same crate, fourth binary)
The same crate ships oduse, which tracks an OpenDesign subscription at the same command/flag parity as cmduse, ocuse and arkuse — every subcommand, --json/--csv, the same watch frame, config keys, update check, cap notification and MCP server. It reads two stores, because a plan is spent wherever its models are called: the Open Design desktop app's own SQLite store (each completed assistant message carries an events_json array whose status/model and usage events give the model and the turn's input/output tokens) and opencode.db, filtered to providers whose id starts with open-design (open-design, open-design-tmp, and any future rename) through the same reader ocuse uses. The dashboard names every store it read ((app + opencode) in the header) and says one dim line when a store is absent, never an error.
oduse # watch: live frame (windows, wallet, model block)
oduse -1 # one-shot dashboard
oduse -1 --json # one-shot, machine-readable
oduse -1 --cache 30m # override the 6h price-list cache TTL (0 = off)
oduse -1 --no-catalog # skip the live price list; price from the baked seed
oduse daily [--days N] [--json|--csv] [--tz ±HH:MM]
oduse hourly [--hours N] [--json|--csv] [--tz ±HH:MM]
oduse model [id] [--days N | --since ISO] [--json|--csv]
oduse session [--since ISO] [--json|--csv]
oduse models [--json] # multipliers and $/1M rates for the selected plan
oduse plans [--json] # all four plans: prices, caps, concurrency, rates
oduse statusline [--json]
oduse mcp # MCP stdio server (usage/plans/models/daily/hourly/session/model)Two upstream facts shape it. OpenDesign publishes its caps but exposes no per-window usage API, so the 5-hour / 7-day / monthly windows are computed from the local stores and labelled an estimate; and the app's local daemon serves the one server-side number that exists, a wallet balance (a balance, not a window meter, so it prints beside the windows rather than replacing them). Rates come from Open Design's own published price list (GET https://amr-api.open-design.ai/api/v1/public/model-prices — public: no key, no cookie, no account), fetched at run time and cached on disk at ~/.cache/cmduse/od-model-prices.json ($CMDUSE_CACHE_DIR moves the directory) for 6 hours; --cache <dur> overrides that TTL (--cache 0 disables the cache) and --no-catalog skips the list and its cache entirely. core/od.json is the offline seed: it answers when the fetch and the cache both fail, and it is the only source for plan caps, model labels and credit multipliers — the price list publishes none of those, so the two halves are merged field by field. A payload is written to the cache only after it parses to at least one row (an empty answer is never persisted, so it cannot poison every run inside the TTL), a transport error gets one retry while a 4xx does not, and a model the price list adds but the baked table has no multiplier for is counted on the provenance line rather than listed at an invented 1×. Credits are list-price $ × the model's multiplier, the plan's own unit.
Where that table came from is always printed, never inferred: the frame carries a dim catalogue: live · 46 rows live line (or cache, 3h old, or builtin · offline seed 2026-11-17, live list not used (<reason>)), -1 --json carries a catalog object (source, at, ageSecs, rowsLive, rowsUnlisted, ratesFrom, multipliersFrom, error), statusline --json carries catalogSource, catalogAt and catalogAgeSecs, plans --json carries the same catalog object, and each model row in plans --json/models --json says ratesFrom: "price-list" | "builtin" beside multiplierFrom: "builtin". A fallback therefore never reads as fresh, and {catalog} is available as a statusline placeholder.
Cache reads are priced, and they are most of the bill. opencode.db records tokens.cache.read (and .write), which is 98% of the token mass on a cache-heavy agent run, so a zero there would read as a free model. core/od.json carries each model's published cacheRead (and cacheWrite where the list publishes it) as the offline seed of the rate the live price list supplies; the rate is never taken from core/zen.json's row for a sibling id. A row the list does not carry falls back to its own input rate, flagged, and the footer says how many turns did. A model with a published longContext tier (inputTokensAbove) switches all four rates — input, output, cache read and cache write — for the whole turn once its fresh input crosses the threshold; the store's cache_read is a disjoint counter and cannot decide the tier. price/credits take no token count, so they stay on the flat rate. reasoning is not added to output — opencode bills it inside output already, and this catalogue has no reasoning rate — and a recorded cost is only the fallback for a model the catalogue has never seen, because opencode cannot price this provider (1405 of 1419 rows on the reference machine carry cost: 0). A proxied turn visible from both stores is counted once, joined on agent_sessions.session_id ⇄ session_message.session_id — never on token counts — and opencode's copy wins, since it carries the cache counters.
Plans are go ($10/mo, $220 monthly, $55 weekly, $18 per 5 hours, 10 concurrent), plus ($20/mo, $310, $74, no 5-hour cap, $20 plan-model credits, 20 concurrent), pro ($100/mo, $480, $90, $120 credits, 30) and max ($200/mo, $900, $150, $300 credits, 50). Those are the plan's default caps. Design Plan caps are per model class on Go: DeepSeek V4.1 Flash Eco draws the plan's $220/$55/$18 set, while the original DeepSeek V4.1 Flash gets $120/mo, $30/week, $10/5h. A window holding both is capped by the stricter set and the row says so ($3.20 · 2.7% of $120.00 (Flash caps; Eco would be $220.00)); no turn is charged against the looser pool by accident. plans --json carries defaultCapLabel and capOverrides[], and models --json carries each model's own capSet/cap fields, so a consumer never assumes one pool per plan. A cap a plan does not publish prints as absent, never as zero — only Go has a 5-hour window.
The desktop store path defaults to ~/Library/Application Support/Open Design/namespaces/release-stable/data/app.sqlite — the namespace directory is version-suffixed, so oduse falls back to the most recently written namespaces/*/data/app.sqlite, and --db / $OD_DB override it. The harness store defaults to $OD_OPENCODE_DB, then $OPENCODE_DB, then ~/.local/share/opencode/opencode.db; it has no CLI flag of its own because --db is the app's store, and its absence is one line on the report rather than an error. Both cuts (5-hour, 7-day) stay rolling and labelled estimates: there is no OpenDesign meter to anchor them the way ocuse anchors its 5-hour window at reset − length. The wallet has two routes, and --json names the one that answered in walletSource ("api", "daemon" or null). Preferred is the account's own figure: GET https://amr-api.open-design.ai/api/v1/wallet/balance ($OD_API_URL overrides the host), authenticated by a console session cookie — not the model API key. Supply the cookie yourself in OD_SESSION or OD_SESSION_COOKIE, or point --session-cookie <path> at a file you created mode 0600; oduse never reads a cookie from a browser, never logs its value, and refuses a file other users can read. A cookie expires: when it dies the frame says wallet: api HTTP 401 (session cookie expired or invalid) and you refresh it by signing in to the console again. The response's balanceUsd is a decimal string ("1.0000"); expiresAt and updatedAt ride through to --json and the expiry date appears on the frame line. A non-200 or an unparseable body is a named failure, never a zero. When no credential is set, no HTTP request is made at all and the old route stands: the app's local daemon at GET http://127.0.0.1:7456/api/integrations/vela/wallet ($OD_BIND_HOST / $OD_PORT, or a whole $OD_DAEMON_URL), with no credential of its own — the daemon owns the control key, and oduse only ever talks to localhost there. A supplied-but-failing cookie falls back to the daemon, and if both fail both reasons are named. Every route is strictly optional: the app is usually closed, so a closed daemon is one line (wallet: daemon not running at …), never an error and never a hang (300 ms daemon, 2 s API), and --no-wallet skips both entirely. A refusal the daemon reports itself (unauthorized, an expired control key) keeps its own words on the same line. The Monthly row prints window N% elapsed · $M by now only for a period the plan anchors — a pinned --period-start, an explicit --since, or --infer-anniversary; the default calendar month is not the plan cycle (the 7-day window resets at subscription), so that row reads no period anchor instead of inventing a share of an unrelated span.
When that session cookie is present, oduse also fetches GET https://amr-api.open-design.ai/api/v1/workspaces/current/billing/snapshot ($OD_WORKSPACE substitutes a workspace id, $OD_API_URL the host). One request returns the plan, the wallet and both designPlanWindows, and those windows win over the local estimates: the frame prints $4.59 used of $5.00 · 8.3% left · 4149/50000 credits · resets 14:21Z, with the reset instant taken from the server's resetsAt — never from a local now − 5h cut or a guessed subscription anchor. A credit is $0.0001, proved by the console ledger (listChargedUsd 0.0043 ↔ listChargeCredits 43), so the 50,000 / 150,000 windows are $5 / $15 — the published $18 / $55 caps at Eco's 0.27, not the Flash figures; both the raw credits and the dollars are shown, neither silently converted. The Monthly row has no snapshot equivalent and stays local. --json keeps every existing key and adds meterSource ("snapshot" or "local"), a snapshot object (creditToUsd, plan, period, balance, and each window's raw credits, dollars, leftPct, windowStart and resetsAt) and snapshotError. With no cookie there is no request at all and one dim line reads windows: local estimate — no session cookie; a 401/403/404, a hang or a malformed body names the reason and falls back to the local windows, never a zero and never an error.
Config lives at ~/.config/oduse/config.json with cmduse's keys (interval_secs, bar_width, burst_enabled, burst_samples, notify_on_cap, statusline_template, statusline_colors, statusline_ascii, check_updates, dismissed_update). The live frame refreshes every 5s like the other three. Statusline placeholders: {plan} {period} {month} {month_pct} {month_bar} {five_hour} {five_hour_pct} {five_hour_bar} (aliases {5h} {5h_pct} {5h_bar}), {weekly} {weekly_pct} {weekly_bar} (aliases {wk} {wk_pct} {wk_bar}), {wallet}, {models} and {catalog} (where the price table came from: live, cache, 3h old, or builtin). --gated is refused here: OpenDesign prices models differently per plan and never restricts which ones a plan may call, so a filter would invent a restriction the source does not have.
Notes
- Window bars: green <70%, yellow 70–90%, red ≥90%, plus
LIMIT EXCEEDEDflag. - Report tables:
dailyshows cache read and cache write as their own columns;hourlydoes not — it isHour / Reqs / In / Out / Cost, and its CSV carries the same four plushour.dailyis bucketed in UTC unless--tz, and--localhonors--tz; token totals in the model/sessionTokenscolumn include both cache columns.ocuse's--csvcolumns areday|hour|model|session,requests,tokens_in,tokens_out,cache_read,cost_usd— its aggregates carry no cache-write, so that column is deliberately absent. - Spend-burst sparkline appears in watch mode after 2 refreshes (bars = $ spent between refreshes, ~3 min of history at 5s interval, capped at 40 samples; tall = burst, flat = idle).
ocuse's watch frame uses the same three pieces:redraw_frameparks the cursor on the frame's last line (its status/countdown line), the sparkline tracks 5-hour spend deltas at 10s samples (capped at 60), andInkcarriescmduse's palette as empty strings when colour is off.- On Monthly caps: monthly pool is the plan total (e.g. $70 on GOAT). Docs describe per-model allowances, but the CLI and API meter one shared pool — verified empirically.