Spend commands
anycloud cost
anycloud cost [deployment-id] [options]
| Option | Description |
|---|---|
-p, --period PERIOD | Whole days from 1d to 90d; default 30d |
--session ID | Session ID, prefix, label, or agent:hash |
--agent NAME | One detected agent |
--user USER | One GitHub username or account ID |
--json | Compact cost report |
Without an ID, the report includes Jobs, Services, and VMs. A
long-running Service or VM overlapping the window is included even if it started
earlier, with duration and cost clipped to the overlap. Aggregate JSON includes
totalJobs, totalServices, totalVms, and Job / Service / VM counts in each
byProvider, byAgent, and byUser entry.
On an API shared with other GitHub users, the report covers the whole API and
adds a per-user table, so a shared total is not mistaken for one person's spend.
--user narrows to one account and accepts a username or an account ID; the ID
also matches work submitted before a username change, which the username does
not, because it is captured once at submit time. The human-readable per-user
table still appears when a teammate is the window's only contributor and is
omitted only when all reported spend belongs to the caller.
Cost follows provisioned VM lifetimes: accrual starts when a VM is created and
stops at its endedAt cutoff. A deployment's completedAt is its outcome
timestamp and neither selects nor caps cost reporting.
Window reports are aggregated in SQLite and are not capped by deployment count. Their response size depends on provider, agent, and user cardinality rather than the number of matching deployments; session, agent, and user filters scope the accounting rather than prevent a partial or rejected total.
anycloud throttle
anycloud throttle set [usd-per-hour] [--agent-session]
anycloud throttle show
anycloud throttle unset [--agent-session]
| Option | Description |
|---|---|
--agent-session | Set or remove an independent cap for each detected session |
Throttle gates a candidate when estimated running VM dollars per hour plus the candidate is greater than or equal to the cap. Running deployments continue.
anycloud budget
anycloud budget set [usd] --per <day|week|month> [--agent-session]
anycloud budget show
anycloud budget unset --per <day|week|month> [--agent-session]
| Option | Description |
|---|---|
--per PERIOD | Required UTC window: day, week, or month |
--agent-session | Set or remove a per-session budget |
anycloud spend
anycloud spend show [--json]
--json adds percentUsed and headroomUsd fields and omits terminal bars
and color.
On an API shared with other GitHub users, human-readable anycloud spend show
prefixes each agent-session row with the account that ran it, so a session
consuming the shared cap says whose run it is. The prefix is omitted when every
session in that cap section belongs to the same account. Work submitted without
an agent session has no row here; anycloud cost reports that spend per user.
See Spend Controls for dispatch behavior and scope.