unkey deploy that use a CLI session then send requests to that workspace. Commands that use a root key from --root-key, UNKEY_ROOT_KEY, or --config aren’t affected, because a root key belongs to one workspace.
The command changes local state only. It doesn’t call the API and needs no root key.
Usage
usage: unkey workspace switch <workspace-id>. The command has no flags.
The workspace must already have a stored session. Run unkey workspace list to see stored workspaces. To add a workspace, run unkey login and choose it on the approval page. A workspace without a stored session exits 1 with switch workspace: cli session not found.
On success, the command prints Using workspace <workspace-id>. to stdout. The change is saved for every later command and terminal until you switch again, run unkey login, or sign out of the active workspace.