Skip to content

PhyStack CLI

phy is the PhyStack CLI. Install it with the Dev Environment Setup guide. Sign in with Authentication.

A command is phy <resource> <verb>. The id or name goes after the verb.

Terminal window
phy device shell my-device

phy 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.

These flags work on every command.

FlagWhat it does
-o, --outputtable (default on a terminal), json (default when piped), yaml, wide, or name
-q, --quietHide spinners and status lines. Data still prints.
-v, --verboseVerbose request tracing
--no-pagerDo not page long output. PHY_NO_PAGER does the same. Paging is off when stdout is not a terminal.
--contextUse 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.
--tenantUse this tenant id or slug for one command
--tokenSend this bearer token. PHY_TOKEN does the same.
--dry-runPrint the write that would be sent, and send nothing. A read that resolves a name still runs.
--no-inputNever prompt
-y, --yesAnswer yes to confirmation prompts. Required for a destructive command when there is no terminal.

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:

Terminal window
phy device list | jq -r '.data[].displayName'