usage

A command-line report for viewing estimated and reserved usage costs from a central broker, grouped by user, organization, or the whole system. A broker is the coordinating service that records these leases.

In plain words
What is it for?
Use it to inspect a user’s or organization’s billing-month summary, view the whole fleet, check another owner when authorized, or request the raw results as JSON.
Why use it?
It gives teams visibility into shared usage and cost estimates, while making clear when no central usage history is available.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/openclaw/crabbox/usage
Clone the repo
git clone --depth 1 https://github.com/openclaw/crabbox
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01344
Opus 5 $0.00000 $0.00672
Sonnet 5 $0.00000 $0.00269
Haiku 4.5 $0.00000 $0.00134

Measured yesterday against content hash 9fc0da96128d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

usage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/usage.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

usage

crabbox usage reports lease cost and usage estimates from the broker, broken down by user, organization, or the whole fleet.

This page is the command reference for cost visibility. Keep command-specific behavior here; broker policy and provider internals live in ../orchestrator.md and ../features/cost-usage.md.

crabbox usage
crabbox usage --scope org --org example-org
crabbox usage --scope user --user github:12345 --month 2026-05
crabbox usage --scope all --json

crabbox usage requires a configured broker (coordinator). Direct-provider mode keeps no central lease history to query, so the command exits with usage requires a configured coordinator.

Flags

--scope user|org|all   reporting scope (default user)
--user <owner>         owner identity to report (admin only for other owners)
--org <name>           organization to report
--month YYYY-MM        billing month to summarize (default current UTC month)
--json                 print the raw summary and limits as JSON

--scope must be user, org, or all; any other value exits with code 2. --month defaults to the current month in UTC.

Scopes and authorization

user    a single owner identity (default)
org     a single organization
all     the entire fleet

The broker decides what you may see based on how you authenticated:

  • GitHub browser-login users always see their own owner/org usage. Requested --scope, --user, and --org values that widen visibility are ignored: the broker forces scope=user and reports the logged-in owner.
  • Admin-token auth honors --scope org and --scope all, and may target another owner with --user or another org with --org.

Owner identity for shared bearer-token mode comes from CRABBOX_OWNER, then Git author/committer email env (GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL), then local git config user.email. Set CRABBOX_ORG to group leases under an organization. Only a verified Cloudflare Access JWT email can supply the bearer-token owner; raw Access identity headers are ignored.

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 144 lines · 0 tokens per session scan A 9fc0da96128d

Subscribe to this mod's changes

usage is a command published in the GitHub repository openclaw/crabbox (1,343 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,344 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.