Skip to main content

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.

Install

Install the CLI globally from npm:
npm install -g @sitegpt/cli
Verify the installed version:
sitegpt --version
Upgrade later with:
npm install -g @sitegpt/cli@latest

Log in with browser approval

For most users, use the default device login:
sitegpt login
The CLI will:
  1. Request standard CLI access from SiteGPT.
  2. Print a verification URL and short code.
  3. Open or ask you to open the SiteGPT approval page.
  4. Wait while you approve access in the browser.
  5. Store the approved token in a local profile.
After login, verify the active account:
sitegpt whoami

Login options

sitegpt login
sitegpt login --profile work
sitegpt login --profile work --api-base https://sitegpt.ai
sitegpt login --full-access
sitegpt login --scope account:read --scope chatbots:read --scope knowledge:write
sitegpt login --chatbot <chatbot-id>
sitegpt login --expires-in-days 30
sitegpt login --token <sitegpt-api-token>
OptionDescription
--profile <name>Save credentials into a named local profile.
--api-base <url>Override the API base URL. Production is https://sitegpt.ai.
--name <name>Token name shown in SiteGPT. Default: SiteGPT CLI (<profile>).
--full-accessRequest every self-service scope your dashboard role can issue.
--scope <scope>Request a custom scope. Repeat for multiple scopes.
--chatbot <chatbot-id>Restrict the token to one chatbot. Repeat for multiple chatbots.
--expires-in-days <1-365>Token lifetime. Default: 90.
--token <token>Store an existing SiteGPT token instead of using browser approval.
Reference: global options and login command details.
Use either --full-access or repeated --scope values, not both. Device-login options cannot be used together with --token.

Standard, full, and custom access

When you run sitegpt login without --scope or --full-access, SiteGPT requests standard CLI access. Standard access includes customer-facing read/write permissions for common CLI operations, but excludes sensitive persistence/admin scopes such as tokens:write, billing:write, and integration management. Use full access only when the CLI or agent needs broad account management:
sitegpt login --full-access
Use custom scopes for specialized workflows:
sitegpt login \
  --scope account:read \
  --scope chatbots:read \
  --scope knowledge:read \
  --scope knowledge:write

Manual login with a dashboard-created token

If you do not want to use browser device login from the terminal, you can create a token manually in the SiteGPT dashboard and then save it into the CLI.
1

Open the Agents page

In the SiteGPT dashboard, open Agents.
2

Create an API token

Click Create token, choose the access level or custom permissions, optionally restrict it to specific chatbots, and create the token.
3

Copy the token immediately

SiteGPT shows the plaintext token only once. Copy it before closing the token modal.
4

Save the token in the CLI

sitegpt login --token <sitegpt-api-token>
5

Verify the profile

sitegpt whoami
sitegpt profiles list
To save the token under a named profile:
sitegpt login --profile support-agent --token <sitegpt-api-token>
For production, the default API base is https://sitegpt.ai. If you need to be explicit:
sitegpt login --profile production --api-base https://sitegpt.ai --token <sitegpt-api-token>
New SiteGPT CLI/API tokens use this shape:
sgpt_<public-prefix>_<secret>
Older sgpt_live_... tokens may still exist until revoked or expired. Treat tokens as opaque credentials and avoid validating one exact prefix in scripts. If you are setting this up for a personal AI assistant, see Use with AI agents for the recommended profile and instruction setup.

Where profiles are stored

The CLI stores local profiles at:
~/.config/sitegpt/config.json
This file is local to your machine. Do not commit it to source control.

Logout

Remove the selected local profile token:
sitegpt logout
sitegpt logout --profile work
Logging out deletes the local token profile. It does not revoke the token in SiteGPT. Use sitegpt tokens revoke <token-id> or the Agents page to revoke server-side access.