SimetrikDocs
ReferenceAccount & workspace

config

Subcommands of simetrik config.

simetrik config set-profile

Create or update a connection profile

Creates or overwrites a named connection profile in your local config.json. A profile bundles the target environment for the CLI: a BFF base URL (derived from an --env preset, or set directly with --url) plus an optional bearer --token. If a profile with the given name already exists, this replaces it.

Use this to register an environment before logging in — for example a prod profile and a staging profile you switch between with simetrik config use-profile. Prefer --env with a known preset; reserve --url for custom or self-hosted deployments. Passing both --env and --url is rejected. You usually do not set --token by hand — simetrik login writes the token into the active profile for you; this command is for the connection target, not for obtaining credentials.

See also: config use-profile, config show, login. Requires CLI access to the workspace. See permissions.

Arguments

  • name — Profile name

Flags

  • --env <preset> — Simetrik environment preset
  • --url <url> — BFF base URL (use only for custom deployments; prefer --env)
  • --token <token> — Bearer token

Examples

simetrik config set-profile default --env prod
simetrik config set-profile staging --env staging
simetrik config set-profile custom --url https://bff.my-deployment.example.com

Exit codes

CodeMeaning
0Profile created or updated and written to config.json
2Invalid input — both --env and --url passed (use one), or an unknown --env preset

simetrik config use-profile

Switch the active connection profile used for subsequent commands.

Sets which configured profile is active. Every subsequent command runs against the active profile's BFF URL and token until you switch again, so this is how you move between, say, a prod and a staging environment without re-entering connection details.

Use it after you've registered the target with simetrik config set-profile (and authenticated it with simetrik login). The named profile must already exist; if it doesn't, the command fails and lists the profiles that are available. This only changes which profile is selected — it doesn't create or modify the profile's URL or token. To see the current active profile and all configured ones, run simetrik config show.

See also: config set-profile, config show, login. Requires CLI access to the workspace. See permissions.

Arguments

  • name — Profile name to activate

Examples

simetrik config use-profile staging
simetrik config use-profile default

Exit codes

CodeMeaning
0Active profile switched and saved to config.json
2Profile not found — name doesn't match any configured profile

simetrik config show

Show the active profile and all configured connection profiles (env, BFF URL, masked token).

Prints your local CLI configuration: the active profile and, for every configured profile, its environment preset, BFF URL, and a masked token (only the last 8 characters are shown, or (not set) if there's no token). The active profile is flagged with a *. Pass the global --json flag for the full machine-readable config instead of the formatted text.

Use this to confirm which profile and environment you're pointed at before running other commands, or to check that simetrik login saved a token to the right profile. It reads from config.json only — it makes no network call and never reveals the full token. To see live token validity and the bound workspace, use simetrik config token-info; to change the active profile, use simetrik config use-profile.

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

Examples

simetrik config show
simetrik config show --json

Exit codes

CodeMeaning
0Configuration printed

simetrik config token-info

Show current token information for the active profile

Shows the token details for the active profile: the profile name, environment preset, BFF URL, the masked token (last 8 characters only), and the workspace the token is bound to (workspace_id and workspace_name, or null if not set). It reads config.json locally and makes no network call.

Use it to confirm which workspace your current credentials target — handy after switching profiles or when commands hit the wrong workspace. Compared with simetrik config show, which lists every profile's connection settings, this focuses on the active profile's token and its workspace binding. It does not validate the token against the server or report expiry; if there's no active profile, it fails and tells you to set one first.

See also: config show, login, workspace info. Requires CLI access to the workspace. See permissions.

Examples

simetrik config token-info

Exit codes

CodeMeaning
0Token information printed
2No active profile found — run simetrik config set-profile first

On this page