# Configuration — chat commands

> The commands. block: native and text command surfaces, bash, config writes, and owner allowlists

- 网址：https://funcoding.ai/agents/openclaw/gateway/config-channels/commands/
- 来源：OpenClaw 官方文档原文（英文），MIT 许可，同步于 2026-11-29
- 官方原文：https://docs.openclaw.ai/zh-CN/gateway/config-channels/commands

---
The `commands.*` block: which chat command surfaces are registered, and who may use them.

## Commands (chat command handling)

```json5
{
  commands: {
    native: "auto", // register native commands when supported
    nativeSkills: "auto", // register native skill commands when supported
    text: true, // parse /commands in chat messages
    bash: false, // allow ! (alias: /bash)
    bashForegroundMs: 2000,
    config: false, // allow /config
    mcp: false, // allow /mcp
    plugins: false, // allow /plugins
    debug: false, // allow /debug
    restart: true, // allow /restart + external SIGUSR2 restart requests
    ownerAllowFrom: ["discord:123456789012345678"],
    allowFrom: {
      "*": ["user1"],
      discord: ["user:123"],
    },
  },
}
```

<details>
<summary>Command details</summary>

- This block configures command surfaces. For the current built-in + bundled command catalog, see [Slash Commands](https://funcoding.ai/agents/openclaw/tools/slash-commands/).
- This page is a **config-key reference**, not the full command catalog. Channel/plugin-owned commands such as QQ Bot `/bot-ping` `/bot-help` `/bot-logs`, LINE `/card`, device-pair `/pair`, memory `/dreaming`, and Talk `/voice` are documented in their channel/plugin pages plus [Slash Commands](https://funcoding.ai/agents/openclaw/tools/slash-commands/).
- Text commands must be **standalone** messages with leading `/`.
- `native: "auto"` turns on native commands for Discord/Telegram, leaves Slack off.
- `nativeSkills: "auto"` turns on native skill commands for Discord/Telegram, leaves Slack off.
- Override per channel: `channels.discord.commands.native` (bool or `"auto"`). For Discord, `false` skips native command registration and cleanup during startup.
- Override native skill registration per channel with `channels.<provider>.commands.nativeSkills`.
- `channels.telegram.customCommands` adds extra Telegram bot menu entries.
- `bash: true` enables `! <cmd>` for host shell. Requires `tools.elevated.enabled` and sender in `tools.elevated.allowFrom.<channel>`.
- `config: true` enables `/config` (reads/writes `openclaw.json`). For gateway `chat.send` clients, persistent `/config set|unset` writes also require `operator.admin`; read-only `/config show` stays available to normal write-scoped operator clients.
- `mcp: true` enables `/mcp` for OpenClaw-managed MCP server config under `mcp.servers`.
- `plugins: true` enables `/plugins` for plugin discovery, install, and enable/disable controls.
- `channels.<provider>.configWrites` gates config mutations per channel (default: true).
- For multi-account channels, `channels.<provider>.accounts.<id>.configWrites` also gates writes that target that account (for example `/allowlist --config --account <id>` or `/config set channels.<provider>.accounts.<id>...`).
- `restart: false` disables `/restart` and external `SIGUSR2` restart requests. Default: `true`.
- `ownerAllowFrom` is the explicit owner allowlist for owner-only commands and owner-gated channel actions. It is separate from `allowFrom`.
- A sender in `ownerAllowFrom` on a channel whose transport proves who sent the message is the Gateway owner. Its turns get the same permissions as the owner's Control UI turns, including operator tools and pull request actions. These channels prove the sender: Discord, Telegram, Slack (Socket Mode and HTTP Events; not relay mode), Signal, WhatsApp, Matrix, Microsoft Teams, Google Chat, Mattermost, X, LINE, Nextcloud Talk, Zalo, Zalo Personal, Synology Chat, Nostr, Buzz, Twitch and ClickClack. On other channels (for example iMessage, whose path also carries SMS, IRC or SMS), the listed sender keeps owner-only commands and tools but gets no operator permissions; for operator work, use the Control UI, Discord or Telegram. A listed sender stays the owner when its channel identity is also linked to a user profile. A linked identity that is not listed gets its profile's Control UI permissions.
- FaceTime callers use `facetime:<handle>` entries (a lowercase email address, or a phone number with only `+` and digits). A listed caller gets owner tools in its voice consults; a caller only in the FaceTime plugin's `allowedCallers` can call but is not the owner. See [FaceTime](https://funcoding.ai/agents/openclaw/plugins/facetime/).
- `allowFrom` is per-provider. When set, it is the **only** authorization source for commands and directives. Exception: Gateway clients admitted with `operator.admin` pass it, because they can edit `allowFrom` themselves.
- When `allowFrom` is unset, command authorization follows channel allowlists and pairing state. Access-group entries in channel allowlists are resolved automatically.
- Command docs map:
  - built-in + bundled catalog: [Slash Commands](https://funcoding.ai/agents/openclaw/tools/slash-commands/)
  - channel-specific command surfaces: [Channels](https://funcoding.ai/agents/openclaw/channels/)
  - QQ Bot commands: [QQ Bot](https://funcoding.ai/agents/openclaw/channels/qqbot/)
  - pairing commands: [Pairing](https://funcoding.ai/agents/openclaw/channels/pairing/)
  - LINE card command: [LINE](https://funcoding.ai/agents/openclaw/channels/line/)
  - memory dreaming: [Dreaming](https://funcoding.ai/agents/openclaw/concepts/dreaming/)

</details>
