PhyStack CLI
phy is the PhyStack CLI. Install it with the Dev Environment Setup guide. Sign in with Authentication.
Command shape
Section titled “Command shape”A command is phy <resource> <verb>. The id or name goes after the verb.
phy device shell my-devicephy device my-device shell is not a command.
The verbs depend on the resource. phy <command> --help prints them, with examples. phy --help lists the resources. phy man prints the man page.
Global options
Section titled “Global options”These flags work on every command.
| Flag | What it does |
|---|---|
-o, --output | table (default on a terminal), json (default when piped), yaml, wide, or name |
-q, --quiet | Hide spinners and status lines. Data still prints. |
-v, --verbose | Verbose request tracing |
--no-pager | Do not page long output. PHY_NO_PAGER does the same. Paging is off when stdout is not a terminal. |
--context | Use a named context. The file is $XDG_CONFIG_HOME/phy/config.toml when XDG_CONFIG_HOME is set, $HOME/.config/phy/config.toml when HOME is set, and .phy/config.toml otherwise. PHY_CONTEXT does the same. |
--tenant | Use this tenant id or slug for one command |
--token | Send this bearer token. PHY_TOKEN does the same. |
--dry-run | Print the write that would be sent, and send nothing. A read that resolves a name still runs. |
--no-input | Never prompt |
-y, --yes | Answer yes to confirmation prompts. Required for a destructive command when there is no terminal. |
Output
Section titled “Output”A terminal shows a table. A pipe or redirect prints JSON. Pass -o to choose.
JSON lists keep the API envelope. A device list is { "data", "pagination" }, and each device has displayName:
phy device list | jq -r '.data[].displayName'