Sign in and choose a project
Sign in with pms login (device login with GitHub), choose a default project, and get JSON output for scripts.
Sign in
Section titled “Sign in”pms loginThe command prints a short code and opens the sign-in page. Sign in with GitHub, check that the code is the same, then allow the request. The CLI then has its own session. The code expires after 10 minutes and works once. It saves the session in ~/.config/pms/credentials.json with mode 0600. The CLI does not use the OS keychain. If you updated from an older version, run pms login once. Older versions kept the session in the keychain, and the CLI does not read that item. You can delete the pms-cli item in Keychain Access.
| Option | Use |
|---|---|
--no-browser |
Print the sign-in URL and the code, and do not open the browser. Use this over SSH or in a container, and open the URL on another device. |
--email |
Sign in with email and password. The CLI asks for both in the terminal. |
Check who you are:
pms whoamiSign out and remove the saved session:
pms logoutpms logout does not sign you out of the console.
Choose a project
Section titled “Choose a project”Most commands work in one project. Give it with --project <ID or name>, or save a default:
pms project listpms project use my-projectpms project use saves the default in ~/.config/pms/config.toml. You can also set the PMS_PROJECT environment variable.
To make a project and use it at once:
pms project create my-project --useOutput formats
Section titled “Output formats”The default output is a table. For scripts, use JSON:
pms container list -o jsonYou can also set PMS_OUTPUT=json.
Other options
Section titled “Other options”| Option | Meaning |
|---|---|
--yes, -y |
Do not ask for confirmation. A delete asks first. Without a terminal, a delete fails unless you pass --yes. |
--wait |
On create and on actions: wait until the resource is ready. --timeout <seconds> sets the limit. The default is 600. |
--api-url |
The API address. Default: https://api.pmservers.org. Also PMS_API_URL. |
A secret prints one time: an AI key secret, or a database password. The API does not show it again. Copy it when it prints.
Use pms <command> --help to see all options of a command.