> ## 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.

# Manage your account, team, and tokens with the CLI

> Update your profile, check usage and limits, read billing, manage API tokens, and add or remove team members from the command line.

Use these commands for your own account and for the people who work on a chatbot. For every option, see the command reference: [Account](/docs/cli/command-reference#account), [Usage](/docs/cli/command-reference#usage), [Limits](/docs/cli/command-reference#limits), [Billing](/docs/cli/command-reference#billing), [API tokens](/docs/cli/command-reference#api-tokens), [Members](/docs/cli/command-reference#members), and [Member invites](/docs/cli/command-reference#member-invites).

## Before you start

* A SiteGPT account on the Growth plan or above. See [Plans and limits](/docs/reference/plans-and-limits).
* The CLI installed and logged in. See [Install and log in](/docs/cli/install-login).
* The default access from `sitegpt login` covers most tasks on this page. It cannot create, rotate, or revoke API tokens. For those tasks, see [Create an API token](#create-an-api-token).
* For billing, you must be the account owner.
* For team tasks, your chatbot ID and a role that can manage members. See [Team members](/docs/guides/account/team-members).

## Check who you are logged in as

```bash theme={null}
sitegpt whoami
```

To see your account details, run `sitegpt account show`.

**Check that it works:** `account show` prints your email, your name, your profile picture, and the credential type.

## Change your name or profile picture

```bash theme={null}
sitegpt account update --name "Jane Doe"
sitegpt account picture upload ./avatar.png
```

To remove the picture, run `sitegpt account picture delete --yes`. `picture add` does the same as `picture upload`, and `picture remove` does the same as `picture delete`.

**Check that it works:** The CLI prints `Updated account name to Jane Doe.` and `Updated profile picture for` with your email.

## Check usage and limits

Check that you have enough capacity before a large import:

```bash theme={null}
sitegpt usage
sitegpt limits
```

* `usage` shows each metric with the amount used, the quota, and what remains.
* `limits` shows the total, the amount assigned, and what is available. It also shows what each chatbot has.

**Check that it works:** The `usage` table has the columns `Metric`, `Used`, `Quota`, and `Remaining`.

## Read your subscription and invoices

```bash theme={null}
sitegpt billing subscription
sitegpt billing invoices
```

The token needs the `billing:read` scope. These commands only read data. You cannot change your plan or payment details from the CLI. See [Billing](/docs/guides/account/billing).

**Check that it works:** `billing subscription` prints the status and the next billing date. If you have no subscription, it prints `No active subscription found.` `billing invoices` lists your invoices with download links when available.

## Create an API token

Create a separate token for each tool or AI agent, with only the scopes that it needs. For the list of scopes, see [Authentication](/docs/developers/authentication).

<Steps>
  <Step title="Log in with token access">
    The token that you use must have the `tokens:write` scope. The default login does not include it. Log in with full access:

    ```bash theme={null}
    sitegpt login --full-access
    ```

    You can also create tokens on the **Agents** page in the dashboard.
  </Step>

  <Step title="Create the token">
    ```bash theme={null}
    sitegpt tokens create --name "Knowledge agent" --chatbot YOUR_CHATBOT_ID --scope chatbots:read --scope knowledge:read --scope knowledge:write
    ```

    * `--name` and at least one `--scope` are required.
    * `--chatbot` limits the token to one chatbot. You can repeat it.
    * The token expires after 90 days by default. Use `--expires-in-days` (1 to 365) or `--expires-at` to change it.
  </Step>

  <Step title="Save the token">
    Copy the token value from the output and store it in a safe place. SiteGPT shows it only once.
  </Step>
</Steps>

**Check that it works:** `sitegpt tokens list` shows the new token with its scopes and expiry date.

## Rotate or revoke a token

Rotate a token to get a new value with the same settings. The old value stops working.

```bash theme={null}
sitegpt tokens rotate YOUR_TOKEN_ID
```

Revoke a token to stop it at once:

```bash theme={null}
sitegpt tokens revoke YOUR_TOKEN_ID
```

Both commands need the `tokens:write` scope. Find the token ID with `sitegpt tokens list`.

**Check that it works:** `rotate` prints `Rotated token` and the new value. Store it, because SiteGPT shows it only once. `revoke` prints `Revoked token`. `sitegpt tokens list --include-revoked` shows the token as revoked.

## Add a team member

There are two ways to add a person to a chatbot:

* `members add` adds the person at once. It sends no invite email. If the person has no SiteGPT account, SiteGPT creates one. Use it for scripted setup.
* `members invite` sends an invitation email. The person accepts it with the **Accept invitation** button in the email, or by signing in to SiteGPT with the invited email address. See [Invite a team member](/docs/guides/account/team-members#invite-a-team-member).

```bash theme={null}
sitegpt members add --chatbot YOUR_CHATBOT_ID teammate@example.com --role MANAGER
sitegpt members invite --chatbot YOUR_CHATBOT_ID teammate@example.com --role MANAGER
```

The roles are `AGENT`, `MANAGER`, `ADMIN`, and `SUPER_ADMIN`. The default is `AGENT`. See [Team members](/docs/guides/account/team-members).

SiteGPT saves the email address in lowercase. What `members invite` does depends on the person:

| Case | Result |
| - | - |
| No pending invite, and the member limit is not reached | SiteGPT creates the invite and sends the email. |
| A pending invite with the same role | SiteGPT sends the email for the pending invite again. It creates no new invite, so this also works at the member limit. With `--json`, `data.resent` is `true`. |
| A pending invite with another role | Fails with `MEMBER_INVITE_PENDING`. To change the role, cancel the invite first. See [Cancel a pending invite](#cancel-a-pending-invite). |
| The person is already a member of the chatbot | Fails with `MEMBER_ALREADY_EXISTS`. |
| No pending invite, and the member limit is reached | Fails with `MEMBERS_QUOTA_EXCEEDED`. |

If SiteGPT cannot send the email, `members invite` fails with `MEMBER_INVITE_EMAIL_FAILED`, but the invite is still saved. To send it again, run the same `members invite` command again.

**Check that it works:** The CLI prints `Added` or `Invited`, the email, and the role. It prints `Invited` also when it sent a pending invite again. `sitegpt members list --chatbot YOUR_CHATBOT_ID` shows the member. Pending invites show under `Pending invites`.

## Remove a team member

```bash theme={null}
sitegpt members remove --chatbot YOUR_CHATBOT_ID YOUR_USER_ID --yes
```

Find the user ID with `sitegpt members list --chatbot YOUR_CHATBOT_ID`. `members delete` does the same as `members remove`.

**Check that it works:** The CLI prints `Removed` and the email. The person is no longer in `members list`.

## Cancel a pending invite

```bash theme={null}
sitegpt member-invites list --chatbot YOUR_CHATBOT_ID
sitegpt member-invites cancel --chatbot YOUR_CHATBOT_ID YOUR_INVITE_ID --yes
```

`member-invites delete` does the same as `member-invites cancel`.

**Check that it works:** The CLI prints `Canceled invite for` and the email. The invite is no longer in `member-invites list`.

## Check the account before an AI agent makes changes

Ask the agent to run these commands at the start of a session:

```bash theme={null}
sitegpt whoami --json
sitegpt profiles list --json
sitegpt usage --json
sitegpt limits --json
sitegpt chatbots list --json
```

The agent then knows the active account and profile, the capacity that is left, and the chatbot IDs before it changes anything. See [Use the CLI with AI agents](/docs/cli/use-with-ai-agents).

**Check that it works:** Each command returns JSON with `"ok": true`.

## Related

* [Authentication](/docs/developers/authentication)
* [Profiles](/docs/cli/profiles)
* [Account and chatbot setup playbook](/docs/cli/playbooks/account-chatbot-setup)


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