Skip to main content

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

The CLI prints its version number.
3

Start the login

The CLI prints a URL and a code. Then it waits for your approval. The CLI does not open the browser for you.
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.
By 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:
The CLI prints your email, the profile name, and the credential type. Then list your chatbots:
You see a table of the chatbots that your token can access.

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

To save the token under its own name, add --profile, for example sitegpt login --profile support-agent --token YOUR_API_TOKEN. See Profiles.

Upgrade the CLI

Log out

This deletes the token for the active profile from your computer. It does not revoke the token in SiteGPT. To revoke it, run sitegpt tokens revoke <token-id> or use the Agents page.

Next steps