@sitegpt/cli
v0.1.4
Published
First-party command line interface for SiteGPT.
Readme
SiteGPT CLI
Official command line interface for SiteGPT. Manage your AI chatbots, knowledge base, conversations, leads, members, and account from the terminal.
Useful for support teams, automation, and AI agents that need to work with your SiteGPT account.
Install
npm install -g @sitegpt/cliCheck the installed version:
sitegpt --versionLogin
sitegpt loginThe CLI opens a secure SiteGPT approval page in your browser. After approval, the token is saved locally on your machine.
Check your login:
sitegpt whoamiQuick Start
List your chatbots:
sitegpt chatbots listView chatbot details:
sitegpt chatbots get <chatbot-id>List knowledge documents:
sitegpt knowledge documents list --chatbot <chatbot-id>Add knowledge from a file:
sitegpt knowledge files add --chatbot <chatbot-id> ./help-center.pdfAdd knowledge from a website:
sitegpt knowledge website add --chatbot <chatbot-id> https://example.comSend a test message:
sitegpt messages send --chatbot <chatbot-id> "How do I contact support?"Common Commands
Chatbots
sitegpt chatbots list
sitegpt chatbots get <chatbot-id>
sitegpt chatbots create "Support Bot"
sitegpt chatbots update <chatbot-id> --title "New Name"Knowledge
sitegpt knowledge documents list --chatbot <chatbot-id>
sitegpt knowledge documents get --chatbot <chatbot-id> <document-id>
sitegpt knowledge links add --chatbot <chatbot-id> https://example.com/page
sitegpt knowledge sitemap add --chatbot <chatbot-id> https://example.com/sitemap.xml
sitegpt knowledge text update --chatbot <chatbot-id> --name "Policy" "Your text"
sitegpt knowledge custom-responses list --chatbot <chatbot-id>Conversations
sitegpt conversations list --chatbot <chatbot-id>
sitegpt conversations get --chatbot <chatbot-id> <thread-id>
sitegpt messages list --chatbot <chatbot-id> <thread-id>
sitegpt messages send --chatbot <chatbot-id> <thread-id> "Message"Settings
sitegpt settings get --chatbot <chatbot-id>
sitegpt settings general get --chatbot <chatbot-id>
sitegpt personas list --chatbot <chatbot-id>
sitegpt instructions list --chatbot <chatbot-id>Account
sitegpt usage
sitegpt billing subscription
sitegpt billing invoices
sitegpt members list --chatbot <chatbot-id>
sitegpt leads list --chatbot <chatbot-id>Profiles
Profiles let you use multiple SiteGPT accounts or workspaces from the same machine.
sitegpt login --profile work
sitegpt profiles list
sitegpt profiles use work
sitegpt profiles delete old-profileRun a command with a specific profile:
sitegpt chatbots list --profile workJSON Output
Use --json for scripts and AI agents:
sitegpt chatbots list --json
sitegpt knowledge documents list --chatbot <chatbot-id> --jsonAuthentication and Access
sitegpt login creates a SiteGPT API token through your browser and stores it locally at:
~/.config/sitegpt/config.jsonSiteGPT CLI/API tokens look like sgpt_xxxxxxxxx. Scripts should treat the token as opaque and avoid validating against one exact shape.
Use normal login for most cases:
sitegpt loginRequest full account access only when you need broad permissions:
sitegpt login --full-accessRequest narrower access for a specialized workflow:
sitegpt login --scope account:read --scope chatbots:read --scope knowledge:writeUse an existing token:
sitegpt login --token <sitegpt-api-token>Environment variables can override the saved profile:
SITEGPT_API_TOKEN=<sitegpt-api-token>
SITEGPT_API_BASE=https://sitegpt.ai
SITEGPT_PROFILE=defaultHelp
Every command level has contextual help:
sitegpt --help
sitegpt knowledge --help
sitegpt knowledge documents --help
sitegpt settings general --helpUpdate
npm install -g @sitegpt/cli@latestTroubleshooting
If login opens the wrong account or environment, check your saved profiles:
sitegpt profiles list
sitegpt profiles use <profile>If a command says your token does not have the required scope, log in again and approve the requested access:
sitegpt loginFor help, visit sitegpt.ai/support.
