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.

Start with the basics:
sitegpt --version
sitegpt whoami
sitegpt profiles list
sitegpt chatbots list
Use --json when you need exact error details:
sitegpt whoami --json

The CLI opens the wrong SiteGPT URL

Check your active profile:
sitegpt profiles list
sitegpt profiles show
If a local profile is default, switch back to production:
sitegpt profiles use default
Or log in again with the production API base:
sitegpt login --profile default --api-base https://sitegpt.ai
Environment variables override saved profiles:
echo $SITEGPT_API_BASE
echo $SITEGPT_PROFILE
Unset them if they point to a local environment.

Unexpected token '<' ... is not valid JSON

This usually means the CLI expected an API JSON response but received an HTML page. Common causes:
  • SITEGPT_API_BASE points to the wrong host.
  • A saved profile uses a local API base.
  • You are using an old CLI version.
  • The API route is not deployed yet in the selected environment.
Fix:
sitegpt profiles list
sitegpt profiles show
sitegpt login --profile default --api-base https://sitegpt.ai
npm install -g @sitegpt/cli@latest

Permission or scope errors

Example:
TOKEN_SCOPE_NOT_ALLOWED
TOKEN_SCOPE_NOT_VALID
Check the command’s required area and create a token with the right scopes:
sitegpt login \
  --profile knowledge-agent \
  --scope account:read \
  --scope chatbots:read \
  --scope knowledge:read \
  --scope knowledge:write
If the token is chatbot-scoped, confirm the chatbot is included:
sitegpt chatbots list --profile knowledge-agent
Token creation is role-aware. If your dashboard role cannot access a chatbot or action, your token cannot grant that access either.

A command says UNKNOWN_COMMAND

Use contextual help at the level you are on:
sitegpt --help
sitegpt knowledge --help
sitegpt knowledge documents --help
sitegpt settings --help
Also verify the command name. For example:
sitegpt knowledge documents list
sitegpt knowledge custom-responses list
sitegpt knowledge sources list

IDs are shortened in table output

Human table output may shorten long IDs. Use JSON for complete IDs:
sitegpt conversations list --chatbot <chatbot-id> --json
sitegpt knowledge documents list --chatbot <chatbot-id> --json

Profiles from local testing still appear

This is expected. Profiles are stored locally at:
~/.config/sitegpt/config.json
Delete profiles you no longer use:
sitegpt profiles delete local-test
This only deletes local credentials. Revoke the server-side token separately if needed:
sitegpt tokens list --include-revoked
sitegpt tokens revoke <token-id>

Knowledge documents are still processing

Check dashboard summary and document status:
sitegpt dashboard --chatbot <chatbot-id>
sitegpt knowledge documents list --chatbot <chatbot-id> --status PROCESSING
sitegpt knowledge documents list --chatbot <chatbot-id> --status FAILED
Resync failed documents:
sitegpt knowledge documents resync --chatbot <chatbot-id> --state failed

Raw or parsed file URLs are empty

rawFileUrl and parsedTextFileUrl are available only when the underlying ingested document has those files. For some sources or older documents, these fields can be null. To fetch document details and content when available:
sitegpt knowledge documents get --chatbot <chatbot-id> <document-id> --content --json

Source connection authorized but no documents show

For picker-based connectors, rerun authorization on the existing source to select more files:
sitegpt knowledge sources authorize --chatbot <chatbot-id> <source-id>
sitegpt knowledge sources documents --chatbot <chatbot-id> <source-id>
sitegpt knowledge sources ingest --chatbot <chatbot-id> <source-id>
For Notion, page/database selection happens inside Notion authorization. If no pages were selected, documents may remain empty until you authorize again and select pages.

File upload command fails

Use local file paths:
sitegpt knowledge files add --chatbot <chatbot-id> ./guide.pdf
If the asset is remote, download it first and then pass the local path.

Token was created but the CLI still uses an old token

Creating a token does not automatically switch your local profile. Save it with:
sitegpt login --token <new-token>
Or create a separate profile:
sitegpt login --profile knowledge-agent --token <new-token>
sitegpt --profile knowledge-agent whoami

Need a clean production profile

sitegpt profiles list
sitegpt profiles delete local-test
sitegpt login --profile default --api-base https://sitegpt.ai
sitegpt profiles use default
sitegpt whoami

Useful debug commands

sitegpt --version
sitegpt profiles list --json
sitegpt profiles show --json
sitegpt whoami --json
sitegpt chatbots list --json
sitegpt dashboard --chatbot <chatbot-id> --json