Skip to content

profile

A profile is a named bundle of connection settings: an API URL and an authentication token. Profiles let you switch between different Satusky environments — or different Satusky accounts — without overwriting your credentials each time.

Common setup: one profile pointing at https://api.satusky.com for production, another pointing at an internal dev API for testing. Switching is a single command.

Profile data lives in two files:

FileContents
~/.satusky/profiles.jsonAll named profiles — name, API URL, auth status
~/.satusky/context.jsonWhich profile is currently active
1ctl profile create [--url <api-url>] <name>

Creates a new profile entry in ~/.satusky/profiles.json. The profile starts unauthenticated. Run 1ctl auth login after switching to it to store a token for the new profile.

Flags

FlagDescription
--url <api-url>API base URL for this profile. Defaults to https://api.satusky.com.

Example

Terminal window
1ctl profile create --url https://dev-api.satusky.com dev
1ctl profile create --url https://api.satusky.com prod
1ctl profile use <name>

Sets the active profile. The change is written to ~/.satusky/context.json and persists across all subsequent commands until you switch again.

Terminal window
$ 1ctl profile use staging
Switched to profile "staging" (https://staging-api.satusky.com)
1ctl profile list

Shows all profiles. The active profile is marked with *.

Terminal window
$ 1ctl profile list
NAME API URL AUTHENTICATED
* prod https://api.satusky.com yes
staging https://staging-api.satusky.com yes
dev https://dev-api.satusky.com no
1ctl profile current

Prints the name and API URL of the active profile without listing all profiles.

Terminal window
$ 1ctl profile current
prod (https://api.satusky.com)
1ctl profile delete <name>

Removes a profile from ~/.satusky/profiles.json. You cannot delete the currently active profile — switch to another one first.

Terminal window
$ 1ctl profile delete dev
Profile "dev" deleted.

Use --profile (or -p) to run a single command against a different profile without changing the active profile permanently.

Terminal window
# Deploy using the staging profile, then return to whatever was active
1ctl --profile staging deploy

This is equivalent to profile use staging && <command> && profile use <previous>, except it does not touch the active profile in ~/.satusky/context.json at all.

Set SATUSKY_PROFILE to force a specific profile for the duration of a shell session or script:

Terminal window
export SATUSKY_PROFILE=staging
1ctl deploy # uses staging
1ctl logs # also uses staging

SATUSKY_PROFILE takes precedence over the active profile in ~/.satusky/context.json, but --profile on the command line takes precedence over SATUSKY_PROFILE.

Terminal window
# One-time setup
1ctl profile create --url https://dev-api.satusky.com dev
1ctl profile create --url https://api.satusky.com prod
1ctl profile use dev
1ctl auth login # stores dev token under the dev profile
1ctl profile use prod
1ctl auth login # stores prod token under the prod profile
# Day-to-day
1ctl profile use dev
1ctl deploy # deploys to dev
1ctl --profile prod deploy # one-off prod deploy, no permanent switch

Each profile’s token is stored independently, so switching profiles also switches which account and organisation the CLI acts as.