# OpenClaw — Gateway Ops CLI > Referência rápida baseada em `openclaw-power-ops` + `openclaw-config`. ## 🌟 Golden Rules 1. ❌ NUNCA editar `openclaw.json` diretamente — sempre `openclaw config set/get/unset` 2. ✅ Sempre reiniciar gateway após mudanças de config 3. ❌ Telegram: NÃO usar campo `agent` dentro de config de conta — usar `bindings` array 4. ❌ Telegram `streaming`: deve ser string `"off"`, não booleano `false` 5. ✅ JSON values em `config set` precisam de `--strict-json` ## Diagnóstico ```bash openclaw status # overview openclaw status --deep # detalhado openclaw doctor # encontra problemas openclaw doctor --fix # auto-fix (com consentimento do usuário!) openclaw gateway health # health check do gateway openclaw security audit # scan de segurança openclaw security audit --deep --fix # scan profundo + auto-fix ``` ## Config Segura — $include Modular ```json5 // ~/.openclaw/openclaw.json { "$include": ["./gateway.json5", "./channels/telegram.json5"], } ``` - `$include`: resolved antes da validação de schema - Objetos: merge recursivo; Arrays: concatenam; Primitivos: último vence - Limite: profundidade máx 10; includes circulares são detectados ## Telegram — Exemplos ```bash # DM policy open (cuidado!) openclaw config set channels.telegram.dmPolicy '"open"' --json openclaw config set channels.telegram.allowFrom '["*"]' --json # Streaming OFF (string, não boolean) openclaw config set channels.telegram.streaming '"off"' --json ``` ## Enabling Features ```bash # Web search (Brave/Perplexity) openclaw config set tools.web.search.enabled true --json openclaw config set tools.web.search.provider '"brave"' --json # Chave via env var: export BRAVE_API_KEY="***" ```