crewship paymaster
Cost figures are readable by workspace
OWNER and ADMIN only. For any other role the server answers 403 (“Spend requires OWNER or ADMIN”) and the command prints that reason.cost_ledger table populated by the Paymaster middleware.
Subcommands
crewship paymaster by-crew
Sample output:
crewship paymaster by-agent <crew>
Takes a crew slug or ID as positional arg. Output columns: Agent, Cost (USD), Calls, Tokens.
crewship paymaster by-mission <missionId>
Return the total cost ledger for a single mission (cost, call count, input/output tokens). Mission is workspace-scoped; foreign mission IDs return 404. There is no --range flag here — the server returns the mission’s full cost history.
crewship paymaster top
Sample output:
<scope_kind>/<scope_id> (one of workspace, crew, mission, agent).
crewship paymaster subscriptions
Show flat-rate subscription usage — the API counterpart to the “Subscription plans” panel on the Paymaster dashboard. No $-figures because flat-rate cost is always $0 by construction; the row shape is plan + provider + call_count + token totals + last_used.
crewship paymaster credential-spend
Show what each API key cost, from the metered ledger — the API counterpart to “figure; usepaymaster subscriptions` for those. OWNER or ADMIN only. Only the credential id is shown, never a value.
Global output
--format json|yaml|ndjson works for every subcommand and emits the raw rollup structs from the API.