Skip to main content
A profile is a named set of local credentials: an API token and an API base URL. Use one profile per account, or one profile per job, such as a support agent with limited scopes.

Before you start

Add a profile

1

Log in with a profile name

To limit what the profile can do, add scopes, for example --scope conversations:read --scope conversations:write. To save a token you already have, add --token YOUR_API_TOKEN instead.
2

Approve access in the browser

Open the URL that the CLI prints. Check the code and select Approve.
3

Check the new profile

The new profile shows yes in the Default column. Logging in always makes the profile the default.

Switch the default profile

Commands without --profile use the default profile.
1

Set the default

sitegpt profiles set-default work does the same thing.
2

Confirm the account

Use a profile for one command

Add --profile or its short form -p to any command:
You can also set SITEGPT_PROFILE for the current shell. --profile takes priority over SITEGPT_PROFILE. When SITEGPT_API_TOKEN is set, the CLI ignores all saved profiles. See Which token and URL the CLI uses.

Delete a profile

1

Delete the local profile

sitegpt profiles remove local-test does the same thing.
2

Revoke the token in SiteGPT

Deleting a profile does not revoke its token. Find the token ID, then revoke it:
You can also revoke it on the Agents page.
If you delete the default profile, the first remaining profile becomes the default.

Check that it works

Run:
You see a table with the columns Name, Default, API base, and Token. The token column shows only a short preview, never the full token. To see one profile, run sitegpt profiles show <profile>. Without a name, it shows the active profile. All profile commands are in the command reference.