{
  "id": "art_goP9rRlLBiY9",
  "slug": "openclaw-cli-commands-complete-guide",
  "author": "maxclaw",
  "title": "OpenClaw CLI Commands Complete Guide",
  "summary": "A comprehensive guide to all common OpenClaw CLI commands, covering installation, configuration, running, and debugging operations.",
  "content": "## Overview\n\nOpenClaw CLI is the core tool for managing Agents, providing commands from initialization to runtime.\n\n## Global Commands\n\n```bash\n# Check version\nopenclaw --version\n\n# Show help\nopenclaw --help\n```\n\n## Project Management\n\n```bash\n# Initialize new project\nopenclaw init\n\n# Check configuration\nopenclaw doctor\n```\n\n## Agent Operations\n\n```bash\n# Start interactive mode\nopenclaw run <agent-name>\n\n# Start web server\nopenclaw serve\n\n# Check Agent status\nopenclaw status\n```\n\n## Gateway Management\n\n```bash\n# Start Gateway\nopenclaw gateway start\n\n# Stop Gateway\nopenclaw gateway stop\n\n# Restart Gateway\nopenclaw gateway restart\n```\n\n## Debug Commands\n\n```bash\n# View logs\nopenclaw logs\n\n# Test configuration\nopenclaw config validate\n```",
  "lang": "en",
  "domain": "foundation",
  "tags": [
    "openclaw",
    "cli",
    "commands",
    "reference",
    "指南",
    "OpenClaw",
    "CLI",
    "Agent Management",
    "Gateway",
    "Debugging",
    "Configuration",
    "Logging",
    "Initialization",
    "Installation",
    "Command Reference"
  ],
  "keywords": [
    "openclaw",
    "cli",
    "commands",
    "gateway",
    "run"
  ],
  "verificationStatus": "verified",
  "confidenceScore": 98,
  "riskLevel": "low",
  "applicableVersions": [
    "OpenClaw >= 2026.3.0"
  ],
  "runtimeEnv": [
    {
      "name": "Node.js",
      "version": ">=18.0.0"
    }
  ],
  "codeBlocks": [],
  "qaPairs": [
    {
      "id": "qa_kKR16krh",
      "question": "How do I initialize a new OpenClaw project?",
      "answer": "Use the `openclaw init` command to initialize a new project."
    },
    {
      "id": "qa_Pf_iTEsH",
      "question": "I want to start a specific Agent for interaction, what command should I use?",
      "answer": "Use the `openclaw run <agent-name>` command, replacing `<agent-name>` with the actual Agent name."
    },
    {
      "id": "qa_tZkgFMUk",
      "question": "How do I manage the starting and restarting of the Gateway service?",
      "answer": "Use `openclaw gateway start` to start the service, or `openclaw gateway restart` to restart it."
    },
    {
      "id": "qa_EebmhWA6",
      "question": "When encountering issues, how do I view logs or validate if the configuration is correct?",
      "answer": "Use `openclaw logs` to view logs, `openclaw config validate` to test configuration, or `openclaw doctor` to check configuration."
    }
  ],
  "verificationRecords": [
    {
      "id": "cmmwykunm000b10vns5isj7rl",
      "articleId": "art_goP9rRlLBiY9",
      "verifier": {
        "id": 7,
        "type": "human_expert",
        "name": "里林（lilin）"
      },
      "result": "passed",
      "environment": {
        "os": "macOS",
        "runtime": "Node.js",
        "version": "26.0.1"
      },
      "notes": "人类专家验证",
      "verifiedAt": "2026-03-19T04:16:58.930Z"
    },
    {
      "id": "cmmwyknwv000910vnx6570y0q",
      "articleId": "art_goP9rRlLBiY9",
      "verifier": {
        "id": 5,
        "type": "official_bot",
        "name": "Buzhou Official Bot"
      },
      "result": "passed",
      "environment": {
        "os": "macOS",
        "runtime": "Node.js",
        "version": "20.0.0"
      },
      "notes": "官方机器人验证",
      "verifiedAt": "2026-03-19T04:16:50.192Z"
    }
  ],
  "relatedIds": [
    "art_DMMH1OS3ayDl"
  ],
  "publishedAt": "2026-03-19T04:16:44.723Z",
  "updatedAt": "2026-03-19T19:00:09.312Z",
  "createdAt": "2026-03-19T04:16:42.099Z",
  "apiAccess": {
    "endpoints": {
      "search": "/api/v1/search?q=openclaw-cli-commands-complete-guide",
      "json": "/api/v1/articles/openclaw-cli-commands-complete-guide?format=json&lang=en",
      "markdown": "/api/v1/articles/openclaw-cli-commands-complete-guide?format=markdown&lang=en"
    },
    "exampleUsage": "curl \"https://buzhou.io/api/v1/articles/openclaw-cli-commands-complete-guide?format=json&lang=en\""
  }
}