Skip to main content

Cost

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.
cmd/crewship/cmd_cost.go is a high-density single-screen cost summary for the impatient. crewship paymaster ... exposes the underlying rollups in full fidelity; cost is what you reach for when you just want to know “how much am I spending and on what?” without remembering which subcommand to run. Composes three paymaster endpoints into one view:
  • GET /api/v1/paymaster/top-spenders — N highest-spend scopes
  • GET /api/v1/paymaster/spend/by-crew — per-crew rollup
  • GET /api/v1/paymaster/subscriptions — subscription-plan usage (best-effort; not every workspace has plans)
All three are scoped to the same time range so rows line up.

crewship cost

Examples

Output

Per-crew rows are sorted descending by cost_usd regardless of server return order, so the highest-spend crew is always at the top.

crewship cost forecast

Project the cost of a future run before sending it. Two modes — pick by which flag you set:
--prompt and --from-history are mutually exclusive and exactly one is required. Both modes print the same row layout (provider, input ,projectedtotal, projected total ) so the output is directly comparable across modes. History mode walks /api/v1/runs?agent_id=<id>&limit=20, sums usage.input_tokens / usage.output_tokens out of each run’s metadata, and averages. Metadata blobs lacking the usage keys are skipped silently — runs from providers that don’t report usage simply don’t contribute to the average.

See also