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

# widget

Configure the embeddable chat widget from the terminal.

# `rogeriq widget`

**config**

```bash
    rogeriq widget config
    ```

    Print the current widget configuration for the active project.

  **set**

```bash
    rogeriq widget set --theme dark
    rogeriq widget set --launcher circle --primary-color '#5b21b6'
    rogeriq widget set --position bottom-right --welcome-message "Need help?"
    rogeriq widget set --json-patch '{"locale":"fr","show_branding":false}'
    ```

    Partial update. The server busts the widget config cache immediately, so
    changes appear on the embedded widget within seconds. Requires `write`
    (or `widget:write`) scope.

    | Flag | Field |
    |------|-------|
    | `--theme` | light \| dark \| auto |
    | `--launcher` | circle \| rounded |
    | `--primary-color` | hex string, e.g. `#5b21b6` |
    | `--position` | bottom-right \| bottom-left |
    | `--welcome-message` | string |
    | `--json-patch` | raw JSON merged into the body — use for fields without a dedicated flag |

  **snippet**

```bash
    rogeriq widget snippet
    ```

    Prints the `<script>` snippet to paste on your site.

  **custom-fields**

```bash
    rogeriq widget custom-fields
    ```

    Lists custom pre-chat fields configured on the widget.

## Common workflows

### Match the widget to your brand on every deploy

```bash
# In your CI pipeline:
rogeriq widget set \
  --theme dark \
  --primary-color "$BRAND_COLOR" \
  --welcome-message "Hi from $RELEASE_TAG"
```

### Snapshot config before a risky change

```bash
rogeriq widget config --json > widget-config.before.json
rogeriq widget set --launcher rounded
# rollback if needed:
rogeriq widget set --json-patch "$(cat widget-config.before.json)"
```