Before you start
- A SiteGPT account on the Growth plan or above. See Plans and limits. No account yet? Use Agent-first onboarding.
- Node.js 18 or later, with npm.
- A browser where you are signed in to SiteGPT.
Install and log in
1
Install the CLI
2
Check the installed version
3
Start the login
4
Approve access in the browser
Open the URL in your browser. Sign in if SiteGPT asks you to. On the Approve device login page, check that the Code matches the code in the terminal. Then select Approve.
5
Wait for the confirmation
The terminal shows
Logged in to https://sitegpt.ai as profile "<name>". The CLI saves the new token in that local profile. On a new computer, the profile name is default.sitegpt login asks for standard CLI access. To ask for other access, or to limit the token to one chatbot, see the login options in CLI authentication. Authentication explains access levels and the approval page.
Check that it works
Run:Log in with a token you already have
Use this on servers, in CI, or on machines without a browser. First create a token on the Agents page in the dashboard. Authentication shows how.1
Save the token
2
Check the profile
--profile, for example sitegpt login --profile support-agent --token YOUR_API_TOKEN. See Profiles.
Upgrade the CLI
Log out
sitegpt tokens revoke <token-id> or use the Agents page.
Next steps
- Profiles: use more than one account or token.
- Use the CLI with an AI agent: give an AI agent its own profile.
- Create a chatbot from a website: run a full setup from the terminal.