> ## Documentation Index
> Fetch the complete documentation index at: https://sitegpt.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Customize a chatbot with the CLI

> Change the persona, instructions, settings, widget look, conversation starters, and follow-up suggestions of a chatbot from the command line.

Use these commands to change how a chatbot answers, how the widget looks, and what it shows to visitors.

This page shows the common path for each task. For every option and default, see the command reference: [Personas](https://sitegpt.ai/docs/cli/command-reference.md#personas), [Instructions](https://sitegpt.ai/docs/cli/command-reference.md#instructions), [Settings overview](https://sitegpt.ai/docs/cli/command-reference.md#settings-overview), and the settings sections after it. For what each setting does, see [Chatbot settings](https://sitegpt.ai/docs/reference/settings.md).

## Before you start

* The Growth plan or above, on your own account or on the account that owns the chatbot. See [Which plan applies](https://sitegpt.ai/docs/developers/authentication.md#which-plan-applies).
* The CLI installed and logged in. See [Install and log in](https://sitegpt.ai/docs/cli/install-login.md). The default access from `sitegpt login` is enough for the tasks on this page.
* Your chatbot ID. Run `sitegpt chatbots list` to find it.

## Read the current settings

```bash theme={null}
sitegpt settings get --chatbot YOUR_CHATBOT_ID
```

The CLI prints the settings as JSON. To read one section, name it: `sitegpt settings general get --chatbot YOUR_CHATBOT_ID`. The sections are `general`, `appearance`, `chat-mode`, `localization`, `user-data`, `lead-form`, `human-support`, and `webhooks`.

To change a section, use `update` with flags, or pass a JSON file with `--file`. `set` does the same as `update`.

**Check that it works:** The output is JSON with one object for each section.

## Change the persona

A persona sets the tone and style of the answers. The chatbot uses one persona at a time. See [Write instructions](https://sitegpt.ai/docs/guides/answers/write-instructions.md).

**1. Add a persona**

```bash theme={null}
sitegpt personas add --chatbot YOUR_CHATBOT_ID --title "Friendly support" --file ./persona.md
```

You can pass the text with `--instructions "..."` instead of `--file`. The CLI prints the new persona ID.

**2. Use the persona**

```bash theme={null}
sitegpt personas use --chatbot YOUR_CHATBOT_ID YOUR_PERSONA_ID
```

**Check that it works:** The CLI prints `Using persona` with the ID and title. `sitegpt personas get --chatbot YOUR_CHATBOT_ID YOUR_PERSONA_ID` shows `Active: yes`.

## Change the instructions

Instructions are rules that tell the chatbot how to answer. The chatbot uses one set of instructions at a time. See [Write instructions](https://sitegpt.ai/docs/guides/answers/write-instructions.md).

**1. Add a set of instructions**

```bash theme={null}
sitegpt instructions add --chatbot YOUR_CHATBOT_ID --title "Support rules" --file ./instructions.md --temperature 0.3
```

`--temperature` sets the **Creativity Level** of this set of instructions, from `0` to `1`. Lower values give more focused answers. The default is `0.5`.

**2. Use the instructions**

```bash theme={null}
sitegpt instructions use --chatbot YOUR_CHATBOT_ID YOUR_INSTRUCTION_ID
```

To change a set later, use `instructions update` with `--file` or `--temperature`.

**Check that it works:** `sitegpt instructions get --chatbot YOUR_CHATBOT_ID YOUR_INSTRUCTION_ID` shows `Active: yes` and the temperature that you set. Then ask a test question with `sitegpt messages send --chatbot YOUR_CHATBOT_ID "What can you help with?"`.

## Change the AI model

```bash theme={null}
sitegpt settings general update --chatbot YOUR_CHATBOT_ID --model gpt-4.1-mini
```

The values are `gpt-4.1` and `gpt-4.1-mini`. See [Choose a model](https://sitegpt.ai/docs/guides/answers/choose-a-model.md).

**Check that it works:** The CLI prints `Updated general settings.` `sitegpt settings general get --chatbot YOUR_CHATBOT_ID` shows the new `gptModel`.

## Set the support email

```bash theme={null}
sitegpt settings general update --chatbot YOUR_CHATBOT_ID --support-email support@example.com
```

**Check that it works:** `sitegpt settings general get --chatbot YOUR_CHATBOT_ID` shows the new `supportEmail`.

## Limit the messages in one conversation

This setting needs the Growth plan or above on the account that owns the chatbot. See [Plans and limits](https://sitegpt.ai/docs/reference/plans-and-limits.md). When the owner's plan does not include it, the command fails with `RATE_LIMITS_NOT_AVAILABLE`. Your own plan does not count.

```bash theme={null}
sitegpt settings general update --chatbot YOUR_CHATBOT_ID --rate-limit-thread-enabled true --rate-limit-thread-max-messages 20
```

The maximum can be from 1 to 1000. See [Keep answers on topic](https://sitegpt.ai/docs/guides/answers/keep-answers-on-topic.md).

**Check that it works:** `sitegpt settings general get --chatbot YOUR_CHATBOT_ID` shows `rateLimits.thread` with `enabled` set to `true` and your `maxMessages`.

## Control where the widget appears

Set the domains where the widget can load, and the pages where the floating widget is hidden:

```bash theme={null}
sitegpt settings general update --chatbot YOUR_CHATBOT_ID --allowed-domain example.com --allowed-domain docs.example.com --excluded-path /checkout/*
```

* Repeat `--allowed-domain` and `--excluded-path` for each value.
* Each update replaces the whole saved list.
* `--clear-allowed-domains` lets the widget load on any domain. `--clear-excluded-paths` shows the floating widget on every page.

See [Control where the chatbot appears](https://sitegpt.ai/docs/guides/install/control-where-it-appears.md).

**Check that it works:** `sitegpt settings general get --chatbot YOUR_CHATBOT_ID` shows your `allowedDomains` and `excludedPaths`.

## Change the widget look

```bash theme={null}
sitegpt settings appearance update --chatbot YOUR_CHATBOT_ID --brand-color "#155DEE" --welcome "Hi! How can I help?" --icon-position LEFT
```

Other common options are `--title`, `--placeholder`, `--brand-text-color`, `--icon-size`, `--icon-shape`, and `--dark-mode`. For the full list, see [Settings: appearance](https://sitegpt.ai/docs/cli/command-reference.md#settings-appearance).

Some options need a plan that includes them:

* `--hide-watermark`, `--watermark-text`, and `--watermark-link` fail with `WATERMARK_SETTINGS_NOT_AVAILABLE` on other plans.
* `--cta-text` and `--cta-link` fail with `CTA_SETTINGS_NOT_AVAILABLE` on other plans.

See [Plans and limits](https://sitegpt.ai/docs/reference/plans-and-limits.md) and [Change the widget appearance](https://sitegpt.ai/docs/guides/widget/appearance.md).

**Check that it works:** Get the chat link with `sitegpt installation snippet --chatbot YOUR_CHATBOT_ID` and open it. The widget shows the new color, welcome message, and position. If you set **Allowed Domains**, the chat link shows "This chat opens on its website" when you open it directly. Open your website instead, or select **Chat with your chatbot** on the chatbot's **Dashboard** page. This also applies to the other checks on this page that open the chat link.

## Upload widget icons

```bash theme={null}
sitegpt icons upload --chatbot YOUR_CHATBOT_ID bot ./bot.png
```

Pass a local file, not a URL. The file can be `png`, `jpg`, `jpeg`, `webp`, `gif`, `avif`, or `svg`.

| Icon type | Where it shows |
| - | - |
| `bot` | The avatar on AI messages. |
| `person` | The default visitor avatar. |
| `agent` | The default avatar for team members. |
| `watermark` | The watermark image, when the watermark shows. |
| `chat-bubble` | The launcher button. |

To remove an icon, run `sitegpt icons delete --chatbot YOUR_CHATBOT_ID bot --yes`.

**Check that it works:** The CLI prints `Updated` with the icon name and the image URL. Open the chat link to see the icon.

## Switch between AI mode and human mode

```bash theme={null}
sitegpt settings chat-mode set --chatbot YOUR_CHATBOT_ID AGENT
```

`AI` is the default. The chatbot answers. `AGENT` is human mode. Your team answers and the chatbot does not reply. See [Conversations and handoff](https://sitegpt.ai/docs/concepts/conversations-and-handoff.md).

If the chatbot uses [working hours](https://sitegpt.ai/docs/guides/human-support/set-up-human-support.md#answer-during-working-hours) or [visitor choice](https://sitegpt.ai/docs/guides/human-support/set-up-human-support.md#let-the-visitor-choose-the-ai-or-a-person), `set` turns them off. SiteGPT keeps their settings. To turn them on again, use the dashboard, API v2, or the `update_sitegpt_settings` tool of the [MCP server](https://sitegpt.ai/docs/developers/mcp-tools.md#update_sitegpt_settings).

**Check that it works:** The CLI prints `Updated chat-mode settings.` `sitegpt settings chat-mode get --chatbot YOUR_CHATBOT_ID` shows the new mode.

## Ask for visitor details before the chat

```bash theme={null}
sitegpt settings user-data update --chatbot YOUR_CHATBOT_ID --collect MANDATORY --collect-name true
```

`--collect` is `MANDATORY`, `OPTIONAL`, or `DO_NOT_COLLECT`. The default is `DO_NOT_COLLECT`. The form always asks for the email. `--collect-name` and `--collect-phone` add the name and the phone number.

**Check that it works:** `sitegpt settings user-data get --chatbot YOUR_CHATBOT_ID` shows the new `collectUserDetails`. Open the chat link. The form shows before the chat starts.

## Set up the lead form

```bash theme={null}
sitegpt settings lead-form update --chatbot YOUR_CHATBOT_ID --enabled true --trigger unable_to_answer --notification-email sales@example.com
```

`--trigger` is `intent`, `unable_to_answer`, or `after_x_messages`. The default is `intent`. For the other options, see [Settings: lead form](https://sitegpt.ai/docs/cli/command-reference.md#settings-lead-form) and [Collect leads](https://sitegpt.ai/docs/guides/leads/collect-leads.md).

**Check that it works:** `sitegpt settings lead-form get --chatbot YOUR_CHATBOT_ID` shows `enableLeadCollection` set to `true`.

## Set up human support

**1. Turn on human support**

```bash theme={null}
sitegpt settings human-support update --chatbot YOUR_CHATBOT_ID --enabled true --notification-email support@example.com
```

**2. Tell the AI when to escalate (optional)**

The dashboard field **When should the AI escalate?** is `escalationPolicy`. Put it in a JSON file:

```json theme={null}
{ "escalationPolicy": "Escalate only when the visitor asks for a person or asks about a refund." }
```

Then pass the file:

```bash theme={null}
sitegpt settings human-support update --chatbot YOUR_CHATBOT_ID --file ./human-support.json
```

The policy can be up to 2,000 characters. Leave it empty to use the default triggers.

For the other options, see [Settings: human support](https://sitegpt.ai/docs/cli/command-reference.md#settings-human-support) and [Set up human support](https://sitegpt.ai/docs/guides/human-support/set-up-human-support.md).

**Check that it works:** `sitegpt settings human-support get --chatbot YOUR_CHATBOT_ID` shows `enableHumanSupport` set to `true`.

## Change the widget text

The widget text is in the `localization` section. You change it with a JSON file. You only need to include the text that you want to change.

```json theme={null}
{ "chatHome": { "startConversation": "Chat with us" } }
```

```bash theme={null}
sitegpt settings localization update --chatbot YOUR_CHATBOT_ID --file ./localization.json
```

See [Change the language and text](https://sitegpt.ai/docs/guides/widget/language-and-text.md).

**Check that it works:** `sitegpt settings localization get --chatbot YOUR_CHATBOT_ID` shows your text.

## Send events to your webhooks

Your plan must include webhooks. If it does not, the command fails with `WEBHOOKS_NOT_AVAILABLE`. See [Plans and limits](https://sitegpt.ai/docs/reference/plans-and-limits.md).

```bash theme={null}
sitegpt settings webhooks update --chatbot YOUR_CHATBOT_ID --leads-url https://example.com/leads-webhook --leads-token YOUR_WEBHOOK_TOKEN
```

Use `--message-url` and `--message-token` for messages, and `--escalation-url` and `--escalation-token` for escalations. See [Webhooks](https://sitegpt.ai/docs/developers/webhooks.md).

**Check that it works:** `sitegpt settings webhooks get --chatbot YOUR_CHATBOT_ID` shows your URLs.

## Add a conversation starter

A conversation starter is a suggested question that visitors can select to start a conversation. See [Conversation starters](https://sitegpt.ai/docs/guides/widget/conversation-starters.md).

```bash theme={null}
sitegpt starters add --chatbot YOUR_CHATBOT_ID --title "Pricing" --message "Tell me about pricing."
```

To show a starter only on some pages, add `--page` for each path, for example `--page /pricing --page "/docs/*"`:

* Each update replaces the starter's whole list of pages.
* A starter can have up to 20 paths. They follow the same rules as excluded pages.
* `--clear-pages` shows the starter on every page again. You cannot use it with `--page`.
* Starters cannot be escalation buttons.

**Check that it works:** The CLI prints `Added starter` and the ID. Open the chat link. The starter shows before the first message.

## Add a follow-up suggestion

A follow-up suggestion is a suggested next question shown under an answer. See [Follow-up suggestions](https://sitegpt.ai/docs/guides/widget/follow-up-suggestions.md).

```bash theme={null}
sitegpt followups add --chatbot YOUR_CHATBOT_ID --title "Contact support" --message "How can I contact support?"
```

* To open a web page, pass `--link https://example.com/docs` instead of `--message`.
* To hand the conversation to your team, add `--escalation`.

**Check that it works:** The CLI prints `Added followup` and the ID. Ask a question in the chat. The suggestion shows under the answer.

## Change the order of starters or follow-up suggestions

Pass the IDs in the new order:

```bash theme={null}
sitegpt starters reorder --chatbot YOUR_CHATBOT_ID YOUR_FIRST_STARTER_ID YOUR_SECOND_STARTER_ID
```

`sitegpt followups reorder` works the same way.

**Check that it works:** The CLI prints the list in the new order.

## Related

* [Manage chatbots](https://sitegpt.ai/docs/cli/chatbots.md)
* Command reference: [Personas](https://sitegpt.ai/docs/cli/command-reference.md#personas), [Instructions](https://sitegpt.ai/docs/cli/command-reference.md#instructions), [Settings overview](https://sitegpt.ai/docs/cli/command-reference.md#settings-overview), [Icons](https://sitegpt.ai/docs/cli/command-reference.md#icons), [Conversation starters](https://sitegpt.ai/docs/cli/command-reference.md#conversation-starters), [Conversation followups](https://sitegpt.ai/docs/cli/command-reference.md#conversation-followups)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.