feat(cli): strix cloud — managed platform CLI (login, scans, billing, and the rest of the API) - #1177
feat(cli): strix cloud — managed platform CLI (login, scans, billing, and the rest of the API)#1177bearsyankees wants to merge 28 commits into
Conversation
Greptile SummaryAdds the
Confidence Score: 3/5The PR is not yet safe to merge because a failed credential replacement and cleanup can leave a newly issued personal API token in a temporary file. The previously reported secret-cleanup failure remains: when replacement and subsequent unlink both fail, the login command reports the error but cannot remove Files Needing Attention: strix/utils/secret_files.py, strix/interface/platform_cli.py Important Files Changed
Reviews (11): Last reviewed commit: "fix(cloud): preserve API auth during MPP..." | Re-trigger Greptile |
|
Fixed in 04a77e5 — |
…able credential files on logout
|
@tryarcanist /review |
Summary
Adds
strix cloud, a full CLI for the managed platform, so a coding agent can sign in, register assets, run scans, read findings, buy credits, and now run account setup — workspaces, plan checkout, integration installs — without a dashboard visit. The former top-levelstrix loginmoves under this namespace (nothing shipped, so no alias is kept).Shape:
strix cloud <resource> <verb> [args], one command per user-facing API operation. Every/api/v1operation is reachable — the threecli/loginprotocol endpoints are composed bystrix cloud login, and the per-provider integration routes are one command with aPROVIDERargument.The transport is a declarative table plus a generic runner, so commands cannot drift from the API:
Agent-facing behavior:
--json. No prompts when stdin is not a terminal.0success,1error,2usage,4authentication or plan/role limit,5payment required. Server messages for plan and role limits pass through unchanged — gating stays server-side.--dataas a JSON object,@file, or-for standard input, which covers request fields that have no flag.--waitpolls until a scan, schedule run, or test-user verification reaches a final state.strix cloud billing topup --credits Nhandles the HTTP 402 machine-payment challenge: it pays with the wallet client, asks first in a terminal, and takes--yesfor agents or--no-payto print the challenge.Workspace management and hosted onboarding handoffs:
strix cloud workspaces list|createplusworkspaces use <name|id>(workspaces.py), which mints a token for another workspace the user already belongs to and stores it — no second browser sign-in. Membership and role-based scope caps stay server-side.Cmd.linkmarks commands whose response carries a hosted URL a person must open:billing subscribe --plan <product>,billing portal, andintegrations install <provider>. The runner prints the URL, opens the browser only in an interactive terminal, and takes--no-browser. The CLI never completes the payment, the OAuth consent, or the DNS change — those end at the user.Cmd.wait_selfmarks operations whose start and status share one path (test-user verification), andP.flagrenames a flag when a request field collides with a common option (--provider-tokenfor the integrationtokenfield).Docs updated for the new namespace and the onboarding handoffs: README, AGENTS.md, the managed-pentesting skill, and the coding-agents page.
Tests:
tests/test_cloud_cli.pycovers routing, placeholder substitution, request data from a file and standard input, binary downloads, wait polling, 402 handling for both top-ups and empty balances, checkout-link output, browser suppression in JSON mode, workspace switching, and that every table entry builds a parser.Link to Devin session: https://app.devin.ai/sessions/40b55f0f14494290bf9fbc7c646debce
Requested by: @bearsyankees