> ## Documentation Index
> Fetch the complete documentation index at: https://sitegpt.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use more than one CLI profile

> Save separate tokens as named CLI profiles, switch between them, and delete the ones you no longer use.

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

* The CLI is installed. See [Install the CLI and log in](/docs/cli/install-login).
* A SiteGPT account on the Growth plan or above. See [Plans and limits](/docs/reference/plans-and-limits).
* Optional: the scopes you want for each profile. See [Scope sets for common jobs](/docs/cli/authentication#scope-sets-for-common-jobs).

## Add a profile

<Steps>
  <Step title="Log in with a profile name">
    ```bash theme={null}
    sitegpt login --profile support-agent
    ```

    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.
  </Step>

  <Step title="Approve access in the browser">
    Open the URL that the CLI prints. Check the code and select **Approve**.
  </Step>

  <Step title="Check the new profile">
    ```bash theme={null}
    sitegpt profiles list
    ```

    The new profile shows `yes` in the **Default** column. Logging in always makes the profile the default.
  </Step>
</Steps>

## Switch the default profile

Commands without `--profile` use the default profile.

<Steps>
  <Step title="Set the default">
    ```bash theme={null}
    sitegpt profiles use work
    ```

    `sitegpt profiles set-default work` does the same thing.
  </Step>

  <Step title="Confirm the account">
    ```bash theme={null}
    sitegpt whoami
    ```
  </Step>
</Steps>

## Use a profile for one command

Add `--profile` or its short form `-p` to any command:

```bash theme={null}
sitegpt --profile support-agent whoami
sitegpt -p work chatbots list
```

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](/docs/cli/authentication#which-token-and-url-the-cli-uses).

## Delete a profile

<Steps>
  <Step title="Delete the local profile">
    ```bash theme={null}
    sitegpt profiles delete local-test
    ```

    `sitegpt profiles remove local-test` does the same thing.
  </Step>

  <Step title="Revoke the token in SiteGPT">
    Deleting a profile does not revoke its token. Find the token ID, then revoke it:

    ```bash theme={null}
    sitegpt tokens list
    sitegpt tokens revoke <token-id>
    ```

    You can also revoke it on the **Agents** page.
  </Step>
</Steps>

If you delete the default profile, the first remaining profile becomes the default.

## Check that it works

Run:

```bash theme={null}
sitegpt profiles list
```

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](/docs/cli/command-reference#profiles).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.