npx loadsheet [options] # report this machine
npx loadsheet usage [options] # sessions, compactions and tokens per project
npx loadsheet usage query [<id>] [options] # answer a question from the scan cache
npx loadsheet usage thread <match> [options] # one thread's cost, tokens, subagents and tools
npx loadsheet usage audit [options] # run every named query, each with its coverage
npx loadsheet <folder | GitHub URL> [options] # weigh a skill pack
npx loadsheet --ui [--port <n>] [options] # serve the report on 127.0.0.1
npx loadsheet wrapped [--port <n>] [options] # serve it open at Wrapped
npx loadsheet build [--out <folder>] [options] # write the report as a web pagenpx loadsheet --help prints the same list. loadsheet fleet moved to fleetrc: it prints the npx fleetrc command to run with the same arguments and exits 2.
loadsheet usage reads the same transcripts and takes the same options, except --all and --full. --json and --scan print the same Report and Scan as without it. A folder named usage is weighed as a pack with ./usage.
usage query
Section titled "usage query"loadsheet usage query with no id lists the named queries, each with why and when to run it. loadsheet usage query <id> runs one:
| Query | What it answers |
|---|---|
spend-share | Requests, tokens and list-price dollars by model, and by thread (main conversation or subagent). |
skill-weight | Each skill's loads times its installed body: how much context its loads took, in tokens. |
first-turn-context | Mean first-request input tokens by harness, subagent sessions included where recorded; the median, p90 and largest first request of every thread, by entrypoint; and the latest ones. |
subagent-cost | Subagents' requests, tokens and mean context by subagent type and model. |
wakes | Turns a notification started rather than the user, by kind: a pull request's update, a scheduled task, another agent's message, a background task. |
spend-after-pull | The tokens a thread spent after it linked a pull request, before the user prompted it again, by the pull request's state. Threads from a harness that records no prompt times are left out and counted in its coverage. |
cost-per-merged-pull | The linking threads' tokens per merged pull request, by project and model, marked partial when some pull requests have no tokens and – when none do. |
memory-weight | Each project's auto memory: the files in its folder and the lines and bytes of its MEMORY.md. |
Every answer ends with its coverage: how much of each join found its other side, such as the skill loads that matched an installed skill or the tokens of models with a list price. A row that matched nothing shows –, never 0.
| Option | What it does |
|---|---|
--since <YYYY-MM-DD> | First day to read, UTC. Default 30 days ago. |
--until <YYYY-MM-DD> | Last day to read, UTC. Default today. |
--split-at <YYYY-MM-DD> | Count the days before it and from it apart, such as the day you changed a setting. |
--harness <id> | Only this harness, repeatable. |
--sql "<select>" | Run one read-only SELECT over the tables below instead of a named query. Experimental. |
--json | Print the answer as JSON. |
--no-cache | Read every transcript in full and write no cache. |
The tables use loadsheet's scan cache, installed skills and local session stores. They hold counters, days, model and harness names, projects and item names. They are tokens (requests and tokens by day, harness, entrypoint, project, thread and model, with usd at list prices), conversations (conversations started and compactions), sessions (recorded sessions and their first requests' tokens, including subagents where the harness counts them), skill_calls (skill invocations), items (installed items and their sizes in characters, and for a project's memory index its files, lines, bytes and stale memories), runs (each thread's and subagent's requests at most five minutes apart, with their tokens, mean context and the time of the user's last prompt), first_turns (each thread's first request), wakes (turns a notification started, by kind) and pulls (pull requests T3 Code linked, with a hash of the linking thread and when it linked), thread_tokens (one conversation's tokens a day with usd, keyed by the thread's hash and a subagent's own), thread_tools (its tool calls and tracked errors by tool name), thread_compactions (its compactions, and the manual ones, by day and subagent), thread_links (each T3 Code session's thread, its title and the thread that opened it, as hashes) and titles (each thread's title). loadsheet usage query --help lists every column. Days are UTC: tokens count on the day of the request, sessions, skill calls and first turns on the day the session started. A project is as the transcript has it, a folder such as ~/work/site or owner/repo, not resolved to its repository as loadsheet usage does. Runs count on the day of their first request, wakes on the day of the message. Stores that fill in gone sessions (see usage) add nothing to these tables, except for titles and T3 Code's linked pull requests. A stored title takes precedence over a transcript title for the same thread. A wake keeps only its kind, never the message.
--sql requires node:sqlite with setAuthorizer (for example, Node 24.10 or later). Named queries do not have this additional requirement. SQL runs in an in-memory SQLite database that holds only these tables, with temporary query data also kept in memory. It takes one statement, and SQLite's authorizer lets it only select, read and call functions: a write, ATTACH, PRAGMA or a second statement fails with exit 2. Its tables and columns may change in any release.
npx loadsheet usage query spend-share --since 2026-11-09 --split-at 2026-11-20
npx loadsheet usage query --sql "select model, sum(output) from tokens group by model"usage thread
Section titled "usage thread"loadsheet usage thread <match> shows one thread: its first and last request, wall and active time, tokens and list-price dollars in total and by model, each subagent with its type, model, requests, tokens, span and cost, the calls per tool for the main conversation and the subagents, and the wakes and pull requests linked to it. <match> is a session id as its harness writes it (hashed on your machine, never stored or printed), the start of the thread's id as thread_tokens.id shows it (6 characters or more), or part of its title in any case. No match, or more than one, lists what was found and exits 1.
Claude Code, Codex and Pi show compactions per thread. Other harnesses show “Not tracked” (null in JSON). For a T3 Code thread, Delegates lists direct and nested subagent threads, not forks. --harness filters the usage shown, not the lineage used to reach matching delegates. The combined cost counts native subagent usage only once. An agent: prefix (idKind: "agent" in JSON) marks a delegate recorded under its parent's session rather than a separately queryable session ID.
| Option | What it does |
|---|---|
--since <YYYY-MM-DD> | First day to read, UTC. Default 30 days ago. Earlier days are not counted. |
--until <YYYY-MM-DD> | Last day to read, UTC. Default today. |
--harness <id> | Only this harness, repeatable. |
--json | Print the same numbers as JSON. |
--full | List every subagent and tool, not the top 10 and 15. |
npx loadsheet usage thread "Improve Undroid" --since 2026-12-03usage audit
Section titled "usage audit"loadsheet usage audit runs every named query from one scan and prints each as usage query would, its coverage included, one after another. It takes the same options as usage query except an id and --sql. With --json it prints { range, queries: [{ query, sections, coverage, notes }] }.
Options
Section titled "Options"| Option | What it does |
|---|---|
--days <n> | Days of history to read. Default 30. Usage keeps every day; with usage, it keeps only the last <n>. |
--harness <id> | Report only this harness. Repeat it for more. A pack is weighed for one harness, claude-code by default. |
--ignore <kind:name> | Leave an item out of the findings, such as --ignore skill:pdf. Repeatable. |
--rule <id>=off | Turn a rule off, or =on to turn it back on. Repeatable. |
--rule <id>.<option>=<n> | Set a rule's threshold, such as --rule dead-skill.minSessions=40. Repeatable. |
--via <name> | Read only sessions started from this entrypoint. Repeatable. |
--exclude-via <name> | Skip sessions started from this entrypoint. Repeatable. |
--config <path> | Read this config file instead of the default one. |
--no-cache | Read every transcript in full and write no cache. |
--no-open | Do not open the report's web page in your browser. It opens only for a person at a terminal, never over ssh, in CI, in a pipe or with --json. |
--json | Print the Report as JSON. |
--fleet[=<hosts>] | Also read every other machine of your fleet over ssh, or the comma-separated hosts you name. See Several machines. |
--timeout <seconds> | With --fleet, how long to wait for each machine. Default 300. |
--scan | Print this machine's Scan as JSON. |
--port <n> | With --ui or wrapped, the port to serve on. |
--out <folder> | With build, the folder to write. Default ./loadsheet-report. |
-v, --version | Print the version. |
-h, --help | Print the help. |
The harness ids are claude-code, codex, grok, copilot (the Copilot CLI), copilot-chat (Copilot Chat in VS Code), pi, opencode, cursor, gemini, kiro and windsurf (legacy Cascade inventory only, not Devin Local).
Flags override the config file. --ignore adds to the file's list; every other flag replaces the file's value.
Exit codes
Section titled "Exit codes"| Code | Meaning |
|---|---|
0 | It printed a report, whatever it found. |
1 | It could not read this machine, or could not serve or write the page. |
2 | A bad flag, a bad config file, a build folder that holds files loadsheet did not write, or loadsheet fleet, which moved to fleetrc. |
Environment
Section titled "Environment"| Variable | Use |
|---|---|
XDG_CONFIG_HOME | The config file is $XDG_CONFIG_HOME/loadsheet/config.json, else ~/.config/loadsheet/config.json. |
XDG_CACHE_HOME | The cache is $XDG_CACHE_HOME/loadsheet, else ~/.cache/loadsheet. |
XDG_STATE_HOME | With --fleet, fleetrc's recorded fleet is $XDG_STATE_HOME/fleetrc/hosts.json, else ~/.local/state/fleetrc/hosts.json. |
LOADSHEET_FLEET_COMMAND | With --fleet, the command each other machine runs in place of npx -y loadsheet@<version>. |