{
  "title": "`openclaw hooks`",
  "content": "Manage agent hooks (event-driven automations for commands like `/new`, `/reset`, and gateway startup).\n\n* Hooks: [Hooks](/hooks)\n* Plugin hooks: [Plugins](/plugin#plugin-hooks)\n\nList all discovered hooks from workspace, managed, and bundled directories.\n\n* `--eligible`: Show only eligible hooks (requirements met)\n* `--json`: Output as JSON\n* `-v, --verbose`: Show detailed information including missing requirements\n\n**Example (verbose):**\n\nShows missing requirements for ineligible hooks.\n\nReturns structured JSON for programmatic use.\n\n## Get Hook Information\n\nShow detailed information about a specific hook.\n\n* `<name>`: Hook name (e.g., `session-memory`)\n\n* `--json`: Output as JSON\n\n## Check Hooks Eligibility\n\nShow summary of hook eligibility status (how many are ready vs. not ready).\n\n* `--json`: Output as JSON\n\nEnable a specific hook by adding it to your config (`~/.openclaw/config.json`).\n\n**Note:** Hooks managed by plugins show `plugin:<id>` in `openclaw hooks list` and\ncan’t be enabled/disabled here. Enable/disable the plugin instead.\n\n* `<name>`: Hook name (e.g., `session-memory`)\n\n* Checks if hook exists and is eligible\n* Updates `hooks.internal.entries.<name>.enabled = true` in your config\n* Saves config to disk\n\n* Restart the gateway so hooks reload (menu bar app restart on macOS, or restart your gateway process in dev).\n\nDisable a specific hook by updating your config.\n\n* `<name>`: Hook name (e.g., `command-logger`)\n\n* Restart the gateway so hooks reload\n\nInstall a hook pack from a local folder/archive or npm.\n\n* Copies the hook pack into `~/.openclaw/hooks/<id>`\n* Enables the installed hooks in `hooks.internal.entries.*`\n* Records the install under `hooks.internal.installs`\n\n* `-l, --link`: Link a local directory instead of copying (adds it to `hooks.internal.load.extraDirs`)\n\n**Supported archives:** `.zip`, `.tgz`, `.tar.gz`, `.tar`",
  "code_samples": [
    {
      "code": "List all discovered hooks from workspace, managed, and bundled directories.\n\n**Options:**\n\n* `--eligible`: Show only eligible hooks (requirements met)\n* `--json`: Output as JSON\n* `-v, --verbose`: Show detailed information including missing requirements\n\n**Example output:**",
      "language": "unknown"
    },
    {
      "code": "**Example (verbose):**",
      "language": "unknown"
    },
    {
      "code": "Shows missing requirements for ineligible hooks.\n\n**Example (JSON):**",
      "language": "unknown"
    },
    {
      "code": "Returns structured JSON for programmatic use.\n\n## Get Hook Information",
      "language": "unknown"
    },
    {
      "code": "Show detailed information about a specific hook.\n\n**Arguments:**\n\n* `<name>`: Hook name (e.g., `session-memory`)\n\n**Options:**\n\n* `--json`: Output as JSON\n\n**Example:**",
      "language": "unknown"
    },
    {
      "code": "**Output:**",
      "language": "unknown"
    },
    {
      "code": "## Check Hooks Eligibility",
      "language": "unknown"
    },
    {
      "code": "Show summary of hook eligibility status (how many are ready vs. not ready).\n\n**Options:**\n\n* `--json`: Output as JSON\n\n**Example output:**",
      "language": "unknown"
    },
    {
      "code": "## Enable a Hook",
      "language": "unknown"
    },
    {
      "code": "Enable a specific hook by adding it to your config (`~/.openclaw/config.json`).\n\n**Note:** Hooks managed by plugins show `plugin:<id>` in `openclaw hooks list` and\ncan’t be enabled/disabled here. Enable/disable the plugin instead.\n\n**Arguments:**\n\n* `<name>`: Hook name (e.g., `session-memory`)\n\n**Example:**",
      "language": "unknown"
    },
    {
      "code": "**Output:**",
      "language": "unknown"
    },
    {
      "code": "**What it does:**\n\n* Checks if hook exists and is eligible\n* Updates `hooks.internal.entries.<name>.enabled = true` in your config\n* Saves config to disk\n\n**After enabling:**\n\n* Restart the gateway so hooks reload (menu bar app restart on macOS, or restart your gateway process in dev).\n\n## Disable a Hook",
      "language": "unknown"
    },
    {
      "code": "Disable a specific hook by updating your config.\n\n**Arguments:**\n\n* `<name>`: Hook name (e.g., `command-logger`)\n\n**Example:**",
      "language": "unknown"
    },
    {
      "code": "**Output:**",
      "language": "unknown"
    },
    {
      "code": "**After disabling:**\n\n* Restart the gateway so hooks reload\n\n## Install Hooks",
      "language": "unknown"
    },
    {
      "code": "Install a hook pack from a local folder/archive or npm.\n\n**What it does:**\n\n* Copies the hook pack into `~/.openclaw/hooks/<id>`\n* Enables the installed hooks in `hooks.internal.entries.*`\n* Records the install under `hooks.internal.installs`\n\n**Options:**\n\n* `-l, --link`: Link a local directory instead of copying (adds it to `hooks.internal.load.extraDirs`)\n\n**Supported archives:** `.zip`, `.tgz`, `.tar.gz`, `.tar`\n\n**Examples:**",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h2",
      "text": "List All Hooks",
      "id": "list-all-hooks"
    },
    {
      "level": "h2",
      "text": "Get Hook Information",
      "id": "get-hook-information"
    },
    {
      "level": "h2",
      "text": "Check Hooks Eligibility",
      "id": "check-hooks-eligibility"
    },
    {
      "level": "h2",
      "text": "Enable a Hook",
      "id": "enable-a-hook"
    },
    {
      "level": "h2",
      "text": "Disable a Hook",
      "id": "disable-a-hook"
    },
    {
      "level": "h2",
      "text": "Install Hooks",
      "id": "install-hooks"
    }
  ],
  "url": "llms-txt#`openclaw-hooks`",
  "links": []
}