Install
npm install -g @customergpt/cli@latest.
Sign in
~/.config/customergpt/config.json and refreshes on its own. Don’t commit that file.
customergpt login --no-browserprints the sign-in URL instead of opening it. Open it on the same computer.customergpt login --read-onlyasks only for read access, so the session can never change anything.customergpt whoamichecks that you’re signed in and shows your usage.customergpt logoutsigns out.
Build a chatbot in five commands
id. Use it in place of BOT_ID:
messages send is a preview: it uses your message quota but doesn’t create a conversation or reach a real visitor. Paste the snippet from installation snippet into your site before </body>. It contains the public Widget ID, never your API key.
For every command, see CLI commands.
Try without an account
Confirmations and dry runs
--yesconfirms a change, or a preview that uses your message quota. Without it, changes fail withCONFIRMATION_REQUIRED.--dry-runchecks a change without making it. Run deletions and bulk changes this way first.--waitwaits for training to finish, up to 15 minutes by default, and fails if the training fails. An interrupted wait doesn’t stop the training; check it later withcustomergpt jobs get JOB_ID.
Scripts and CI
In CI, set an API key instead of signing in:customergpt login --token-stdin.
Output is JSON when stdout isn’t a terminal, when you pass --json, or when CUSTOMERGPT_OUTPUT=json is set. Results go to stdout; errors and progress go to stderr. Exit code 0 means success. Errors look like this:
call:
Profiles
Keep several accounts or servers without retyping keys:--profile, then CUSTOMERGPT_PROFILE, then the saved default.
Use it as an MCP server
The CLI includes an MCP server that uses your saved sign-in. Aftercustomergpt login, add this to a client that starts local servers:
"command": "cmd" with "args": ["/c", "customergpt", "mcp"].
Use it from JavaScript
For AI coding agents
customergpt agent-guide prints the workflow and command map for AI agents. The agent skill that ships with the CLI teaches Claude Code, Codex, Cursor and others to build a support bot safely. It’s also available at https://api.customergpt.ai/agents/customergpt-cli-skill.md.
Shell completion
~/.zshrc or ~/.bashrc to keep it.