Command reference
ed usage models
Tokens and attributable cost per model, plus any exact provider cost that cannot be assigned to one model.
ed usage models [--range <range>] [--source <source>]... [--machine <machine>]... [--json]Options
| Name | Type / values | Default | What it does |
|---|---|---|---|
--range |
today, week, month, all |
all |
Which days to include |
--source |
string, repeatable | every source | Count only these source ids. Repeat the flag to include several. An id the file does not list is an error |
--machine |
machine name, ssh alias, id, or local |
every machine | Count only the agents that ran on these machines. local is this Mac. Repeat the flag to include several. Union with --source rather than an intersection |
--json |
flag | off | Emit JSON on stdout |
--json shape
A top-level array with models sorted by totals.cost descending, followed by an
unattributed-cost accounting row when a provider reports exact total cost but
not a per-model cost split.
[ { "model": "claude-opus-5", "totals": { "cacheCreationTokens": 153031472, "cacheReadTokens": 4093821515, "cost": 3747.5389512500024, "inputTokens": 335270, "outputTokens": 13006480, "tokens": 4260194737 } }, { "model": "gpt-5.6-sol", "totals": { "cacheCreationTokens": 0, "cacheReadTokens": 39030016, "cost": 28.771853, "inputTokens": 919731, "outputTokens": 155273, "tokens": 40105020 } }]ed usage modelsed usage models --range weeked usage models --range month --source clied usage models --json | jq -r '.[0].model'Behaviour
Reads only, mutates nothing, and needs no app. Same exit codes as
ed usage summary.
A row whose model name is missing from the file is grouped under the literal
name unknown rather than dropped. A zero-token unattributed-cost row keeps
provider cost exact when that cost cannot be assigned to a model. The human
table labels it Unattributed cost and places it after real models.
$ ed usage models --range weekMODEL COST TOKENSclaude-opus-5 3747.54 4260194737claude-fable-5 1202.34 777247635claude-sonnet-5 144.57 598911741gpt-5.6-sol 28.77 40105020claude-haiku-4-5-20251001 0.28 1071983Where to go next
ed usage, the rest of this group- All
edcommands