The CLI authenticates with scoped SiteGPT API tokens. Tokens are bearer credentials, stored locally by profile, and sent toDocumentation Index
Fetch the complete documentation index at: https://sitegpt.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
/api/v2 routes.
Authentication methods
- Device login
- Existing token
- Environment variable
Recommended for humans and local AI assistants:Device login opens a browser approval page and creates a scoped token after you approve access.
Manual dashboard-token login
Manual token login is useful when you want to choose permissions in the dashboard first, then connect the CLI afterward.Create a token in the dashboard
Open the SiteGPT dashboard, go to Agents, click Create token, and choose the access level, scopes, and chatbot access.
Copy the token
Copy the plaintext token immediately. SiteGPT stores only a secure hash and cannot show the same token again.
sitegpt login --token <token> or set SITEGPT_API_TOKEN for one-off commands.
Access levels
| Access level | How to request | Best for |
|---|---|---|
| Standard CLI access | sitegpt login | Most day-to-day CLI usage without token, billing, or integration writes. |
| Full account access | sitegpt login --full-access | Trusted local workflows that need broad SiteGPT management. |
| Custom access | sitegpt login --scope <scope> | Specialized agents and automation with least-privilege tokens. |
| Chatbot-restricted access | sitegpt login --chatbot <id> | Agents that should only operate on selected chatbots. |
Token issuance is role-aware. A user can only create tokens for scopes and chatbots they are allowed to manage in the dashboard.
Available scopes
| Resource | Read | Write | Delete |
|---|---|---|---|
| Account | account:read | account:write | - |
| Billing | billing:read | billing:write | - |
| API tokens | tokens:read | tokens:write | - |
| Chatbots | chatbots:read | chatbots:write | chatbots:delete |
| Knowledge | knowledge:read | knowledge:write | knowledge:delete |
| Personas | personas:read | personas:write | personas:delete |
| Instructions | instructions:read | instructions:write | instructions:delete |
| Settings | settings:read | settings:write | - |
| Conversation starters | starters:read | starters:write | starters:delete |
| Conversation followups | followups:read | followups:write | followups:delete |
| Conversations | conversations:read | conversations:write | conversations:delete |
| Leads | leads:read | leads:write | leads:delete |
| Members | members:read | members:write | members:delete |
| Integrations | integrations:read | integrations:write | - |
Token commands
Create options
| Option | Description |
|---|---|
--name <name> | Token name. Required. |
--scope <scope> | Scope to grant. Required and repeatable. |
--chatbot <chatbot-id> | Restrict token to selected chatbots. Repeatable. Defaults to all accessible chatbots. |
--expires-in-days <days> | Relative expiration. Valid range: 1-365. Default: 90. |
--expires-at <iso-date> | Absolute expiration. Cannot be combined with --expires-in-days. |
Token lifecycle
Newly created and rotated tokens are shown once:Least-privilege examples
Read-only chatbot inventory:Security notes
- Do not commit
~/.config/sitegpt/config.json. - Prefer chatbot-restricted tokens for agents.
- Use
--jsonfor automation so scripts do not scrape human tables. - Rotate tokens after demos, tests, and shared-agent sessions.
- Revoke tokens you no longer use: