`truo` CLI
npm install -g @truocloud/clibrew install truocloud/tap/truoscoop bucket add truocloud https://github.com/truocloud/scoop-bucket && scoop install truocurl -fsSL https://raw.githubusercontent.com/truocloud/truo-devkit/main/install.sh | shBinaries are published with their SHA256SUMS, and brew, scoop, and
install.sh verify them. The npm packages ship with
provenance.
truo auth logintruo services listtruo vps power svc_10432 stopThe command tree is generated from the OpenAPI document. A new endpoint shows up in the CLI — with its help text, its arguments, and its valid values — without anyone writing CLI code.
Output
Section titled “Output”Tables by default. Everything that isn’t data — progress, warnings,
confirmations — goes to stderr, so truo vps list -o json > f.json
always comes out clean.
truo vps list -o json | jq '.[].hostname'truo vps list -o jsonl # one line per item, for streamingtruo vps list -o id | xargs -n1 truo vps gettruo vps get svc_1 --field hostname # trims the outputLong-running operations
Section titled “Long-running operations”They are waited on by default. A CLI that returns before the thing actually happened forces every script to write its own polling loop, and half of them never do.
truo vps power svc_10432 stop # waitstruo vps power svc_10432 stop --no-wait # prints the id and exits 0truo operation wait op_01JQ8X… # pick it up laterIf the wait times out, the CLI exits with 9 and prints the id: the operation is still running — we just stopped watching it.
Confirmations
Section titled “Confirmations”Anything marked destructive in the contract asks first. --yes skips the
prompt, and without an interactive terminal the CLI fails instead of
assuming yes.
Exit codes
Section titled “Exit codes”A public contract, so scripts never have to parse error text.
0 ok |
1 CLI bug |
2 usage error |
3 no credential |
4 missing scope or permission |
5 not found |
6 conflict |
7 rate limited |
8 API failure |
9 wait timed out |
10 you cancelled |
130 Ctrl-C |
Profiles
Section titled “Profiles”truo config use productiontruo config set base_url https://api.truo.cloudtruo config listConfiguration lives in ~/.truo/config.json and credentials in a separate
file (credentials.json, mode 0600). They’re split on purpose: mixed
together, it’s only a matter of time before someone pastes a token into a
ticket.
Precedence: --token → TRUO_TOKEN → profile.
The escape hatch
Section titled “The escape hatch”For what the API already exposes and the CLI doesn’t wrap yet. It doesn’t validate arguments or ask for confirmation: it’s raw on purpose.
truo api GET /v1/vpstruo api POST /v1/vps/svc_1/power --body-json '{"action":"stop"}'It exists so you never have to wait for a CLI release to use something the API already has.
Shell completions
Section titled “Shell completions”eval "$(truo completion bash)" # bash · zsh · fishAlso generated from the command tree, so it can’t go stale either.