SimetrikDocs
ReferenceAccount & workspace

login

Log in to Simetrik and save a token to your profile.

Authenticates you to Simetrik and stores a workspace-scoped session token in your profile. By default it runs a browser-based PKCE flow: it opens your browser, you sign in, you pick a workspace (or it auto-selects when you pass --workspace <id> or belong to only one), and the resulting token is written to config.json and made active. The Auth0 access token stays in process memory only — only the Simetrik session token is persisted.

Run this first, before any command that talks to the platform. Pass --profile <name> to save the token to a specific profile (defaults to default), --no-browser to print the URL instead of opening one (useful on headless or remote machines), and --ttl/--access-token-ttl to tune session lifetime. The --dev, --api-key, and --user flags are for local development against a dev BFF and are not used in normal operation. On failure the command prints a vetted, safe error message rather than raw HTTP details. To end a session, use simetrik logout.

See also: logout, config use-profile, config token-info, workspace info. Requires CLI access to the workspace. See permissions.

Flags

  • -w, --workspace <id> — Workspace ID (skip selection prompt)
  • -p, --profile <name> — Profile to save the token to
  • --url <bff_url> — BFF URL override
  • --ttl <hours> — CLI session lifetime in hours
  • --access-token-ttl <seconds> — Access token lifetime in seconds
  • --no-browser — Don't auto-open the browser, print URL instead
  • --dev — Use local dev API key instead of Auth0
  • --api-key <key> — [DEV] API key (or set BFF_DEV_API_KEY env var)
  • -u, --user <name> — [DEV] Username for dev token

Examples

simetrik login
simetrik login --workspace 4821 --profile staging
simetrik login --no-browser

Exit codes

CodeMeaning
0Logged in — token saved to the profile and set as active
1Login failed (authorization, code exchange, or token exchange error)

On this page