Skip to main content
The CLI uses the same personal API keys as the REST API. Keys start with up_ and carry your access across every studio you belong to. Create one under Account > Developer, in the Access keys section.

Log in

login opens that page for you, prompts for the key (input is hidden), verifies it, then saves it as an account in a private file on your machine. If you want to skip the prompt:
Confirm who you are and which studios the key reaches:

Switch between accounts

Log in more than once to keep several accounts side by side. A work login, a personal one, a key pointed at a different API: each stays put until you switch to it.
1

Add another account

Accounts are named after your email. You can give one a friendlier label with --as:
2

List your accounts

The active one is marked with a dot. Each row also shows the API URL that account logged in against.
3

Switch the active account

Every command after this uses that account’s key and API URL until you switch again.
Remove an account with userplay logout (drops the active one) or userplay logout --as work for a specific one. If you remove the active account and others remain, the next saved account takes over.

Using a key in CI

Set USERPLAY_API_KEY and skip login entirely. The environment variable beats the active account’s saved key, and it never touches the disk.
That covers headless reads. Writes need one more thing: the production confirmation prompt cannot be answered without a terminal, so it fails closed and the write is refused. Pass --yes on any write that runs unattended.
A key in your environment silently outranks the account you logged in as. If userplay whoami shows someone you did not expect, that is usually why.

Where state lives

Credentials and config sit in your OS config directory: Set USERPLAY_CONFIG_DIR to move it somewhere else. This keeps a CI job or scratch script from overwriting the credentials you use day to day. To see everything resolved at once (active account, API URL, whether a key was found and where it came from, config paths):
Commands go to https://api.userplay.io/public/v1 unless something says otherwise. To point them at a different URL, log in against it with userplay login --api-url <url> --as staging, re-point the active account with userplay config set --api-url <url>, or override a single command with --api-url.

Global options

Agent mode, dry runs, and the guards in front of every write.

API keys

Rotate the key this login is holding, or retire it.

Troubleshooting

Still unauthorized, right after logging in.

CLI overview

Install it, and see what the tool covers.