Skip to main content
Two ways to authenticate: browser-based SSO (moss login) for interactive use, or API key (moss auth login --key ...) for scripting and CI/CD.

moss login

Log in via your browser. This is the recommended method for interactive use — it opens the MossDesk dashboard, you authorize the CLI, and credentials are saved automatically.
moss login
moss login --no-browser --timeout 180
OptionRequiredDescription
--no-browserNoPrint the URL instead of opening a browser (useful for headless/SSH environments)
--timeout <seconds>NoTimeout in seconds (default: 120)
moss login is a top-level command, not under auth. It’s the fastest way to get started.

moss auth login

Save an API key for a workspace. Use this for non-interactive environments like CI pipelines or automation scripts.
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": "you@example.com",
    "workspace_id": "ws_abc123",
    "scope": "full"
  }
}