Skip to main content

miles auth

Device-code authentication. The user approves a code in their browser; the agent must never ask them to paste an account key into chat. auth login --json returns userCode, verificationUrl, intervalSeconds, expiresInSeconds, and pendingState. It also contains a private deviceCode; do not show that value to the user or put it in logs. Show the user the code and URL, confirm the code matches in the browser, then run auth poll. Polling can return authorized, pending, rate_limited, expired, denied, timeout, transport_error, or sandbox_network_blocked.

miles doctor

Checks the local CLI installation, runtime, credential state, and server capabilities. Run it when setup is incomplete or when a command reports that the connected Miles service does not support a feature.

miles account-status

Returns the current plan, a credits object, siteCount, and activeSite. The credit fields include total spendable credits, allowance and top-up balances, usage percentage, and period end. Use it before a full build or WordPress conversion when account headroom is uncertain.

miles usage-history

Returns transactions and pagination. Each transaction includes id, type, amountCredits, isDeduction, balanceAfterCredits, description, and createdAt. limit is capped at 100.

Supporting command

miles balance is a compatibility helper that reads available credits through the active site. Prefer account-status for new work because it does not require an active site and gives the fuller account picture. Next: Sites and context.