Skip to main content
List the workspaces that have a stored CLI session on this machine. Each unkey login stores one session per workspace, and the most recent login becomes the active workspace. Resource commands that use a CLI session send requests to the active workspace. The command reads local sessions only. It doesn’t call the API and needs no root key.

Usage

The command has no flags and doesn’t accept the shared resource command flags, such as --json.

Output

The command prints one workspace ID per line to stdout, in no particular order. An asterisk marks the active workspace:
With no stored sessions, it prints No saved workspaces. Run 'unkey login' to sign in. and exits 0. Root keys saved with unkey login --root-key aren’t sessions and don’t appear in this list.

Examples

List stored workspaces, then switch to another one:
See unkey workspace switch.
Last modified on November 25, 2026