anomalyco / anomalyco/opencode
[FEATURE]: /usage — dedicated session token & cost report (alias /cost)
Open
@simonklee is already working on this.
Since Aug 12, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Requested feature
Add a /usage slash command (alias /cost) producing a dedicated report of session token consumption and financial cost.
Why
Today cost/token info is only a compact inline line in the sidebar footer (packages/tui/src/feature-plugins/sidebar/context.tsx). A dedicated report would give per-message and cumulative accounting.
Proposed behavior
/usageopens a report: per-message tokens (input/output/reasoning/cache), cumulative totals, and estimated cost{ amount, currency }(data already tracked, seepackages/opencode/src/acp/usage.ts).- Showables: per session, per day, or since a date; exportable as markdown.
- Optionally aggregate across all providers used.
Benefits
- Financial/cost visibility (LLM spend) without external tooling.
- Analogous to
/costin other CLIs; complements/contextfor window size vs/usagefor spend.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.