Skip to main content

moss auth login

Save an API key for a workspace.
moss auth login --key moss_k_your_api_key_here
OptionRequiredDescription
--key <key>YesAPI key (moss_k_...)
--workspace <id>NoWorkspace ID to associate with
The key is stored in ~/.moss/config.json. If --workspace is provided, it becomes the active workspace.

moss auth logout

Remove saved credentials.
moss auth logout
OptionRequiredDescription
--workspace <id>NoWorkspace to remove (default: active workspace)

moss auth whoami

Show the current authentication context — user info and active workspace.
moss auth whoami
moss auth whoami --json
{
  "data": {
    "user_id": "usr_abc123",
    "email": "[email protected]",
    "workspace_id": "ws_abc123",
    "scope": "full"
  }
}