11---
2- summary : " CLI reference for `clawdbot hooks` (internal hooks + Gmail Pub/Sub + webhook helpers )"
2+ summary : " CLI reference for `clawdbot hooks` (internal hooks)"
33read_when :
44 - You want to manage internal agent hooks
5- - You want to wire Gmail Pub/Sub events into Clawdbot hooks
6- - You want to run the gog watch service and renew loop
5+ - You want to install or update internal hooks
76---
87
98# ` clawdbot hooks `
109
11- Webhook helpers and hook-based integrations .
10+ Manage internal agent hooks (event-driven automations for commands like ` /new ` , ` /reset ` , etc.) .
1211
1312Related:
1413- Internal Hooks: [ Internal Agent Hooks] ( /internal-hooks )
15- - Webhooks: [ Webhook] ( /automation/webhook )
16- - Gmail Pub/Sub: [ Gmail Pub/Sub] ( /automation/gmail-pubsub )
17-
18- ## Internal Hooks
1914
20- Manage internal agent hooks (event-driven automations for commands like ` /new ` , ` /reset ` , etc.).
21-
22- ### List All Hooks
15+ ## List All Hooks
2316
2417``` bash
25- clawdbot hooks internal list
18+ clawdbot hooks list
2619```
2720
2821List all discovered internal hooks from workspace, managed, and bundled directories.
@@ -45,23 +38,23 @@ Ready:
4538** Example (verbose):**
4639
4740``` bash
48- clawdbot hooks internal list --verbose
41+ clawdbot hooks list --verbose
4942```
5043
5144Shows missing requirements for ineligible hooks.
5245
5346** Example (JSON):**
5447
5548``` bash
56- clawdbot hooks internal list --json
49+ clawdbot hooks list --json
5750```
5851
5952Returns structured JSON for programmatic use.
6053
61- ### Get Hook Information
54+ ## Get Hook Information
6255
6356``` bash
64- clawdbot hooks internal info < name>
57+ clawdbot hooks info < name>
6558```
6659
6760Show detailed information about a specific hook.
@@ -75,7 +68,7 @@ Show detailed information about a specific hook.
7568** Example:**
7669
7770``` bash
78- clawdbot hooks internal info session-memory
71+ clawdbot hooks info session-memory
7972```
8073
8174** Output:**
@@ -96,10 +89,10 @@ Requirements:
9689 Config: ✓ workspace.dir
9790```
9891
99- ### Check Hooks Eligibility
92+ ## Check Hooks Eligibility
10093
10194``` bash
102- clawdbot hooks internal check
95+ clawdbot hooks check
10396```
10497
10598Show summary of hook eligibility status (how many are ready vs. not ready).
@@ -117,10 +110,10 @@ Ready: 2
117110Not ready: 0
118111```
119112
120- ### Enable a Hook
113+ ## Enable a Hook
121114
122115``` bash
123- clawdbot hooks internal enable < name>
116+ clawdbot hooks enable < name>
124117```
125118
126119Enable a specific hook by adding it to your config (` ~/.clawdbot/config.json ` ).
@@ -131,7 +124,7 @@ Enable a specific hook by adding it to your config (`~/.clawdbot/config.json`).
131124** Example:**
132125
133126``` bash
134- clawdbot hooks internal enable session-memory
127+ clawdbot hooks enable session-memory
135128```
136129
137130** Output:**
@@ -148,10 +141,10 @@ clawdbot hooks internal enable session-memory
148141** After enabling:**
149142- Restart the gateway so hooks reload (menu bar app restart on macOS, or restart your gateway process in dev).
150143
151- ### Disable a Hook
144+ ## Disable a Hook
152145
153146``` bash
154- clawdbot hooks internal disable < name>
147+ clawdbot hooks disable < name>
155148```
156149
157150Disable a specific hook by updating your config.
@@ -162,7 +155,7 @@ Disable a specific hook by updating your config.
162155** Example:**
163156
164157``` bash
165- clawdbot hooks internal disable command-logger
158+ clawdbot hooks disable command-logger
166159```
167160
168161** Output:**
@@ -174,6 +167,53 @@ clawdbot hooks internal disable command-logger
174167** After disabling:**
175168- Restart the gateway so hooks reload
176169
170+ ## Install Hooks
171+
172+ ``` bash
173+ clawdbot hooks install < path-or-spec>
174+ ```
175+
176+ Install a hook pack from a local folder/archive or npm.
177+
178+ ** What it does:**
179+ - Copies the hook pack into ` ~/.clawdbot/hooks/<id> `
180+ - Enables the installed hooks in ` hooks.internal.entries.* `
181+ - Records the install under ` hooks.internal.installs `
182+
183+ ** Options:**
184+ - ` -l, --link ` : Link a local directory instead of copying (adds it to ` hooks.internal.load.extraDirs ` )
185+
186+ ** Supported archives:** ` .zip ` , ` .tgz ` , ` .tar.gz ` , ` .tar `
187+
188+ ** Examples:**
189+
190+ ``` bash
191+ # Local directory
192+ clawdbot hooks install ./my-hook-pack
193+
194+ # Local archive
195+ clawdbot hooks install ./my-hook-pack.zip
196+
197+ # NPM package
198+ clawdbot hooks install @clawdbot/my-hook-pack
199+
200+ # Link a local directory without copying
201+ clawdbot hooks install -l ./my-hook-pack
202+ ```
203+
204+ ## Update Hooks
205+
206+ ``` bash
207+ clawdbot hooks update < id>
208+ clawdbot hooks update --all
209+ ```
210+
211+ Update installed hook packs (npm installs only).
212+
213+ ** Options:**
214+ - ` --all ` : Update all tracked hook packs
215+ - ` --dry-run ` : Show what would change without writing
216+
177217## Bundled Hooks
178218
179219### session-memory
@@ -183,7 +223,7 @@ Saves session context to memory when you issue `/new`.
183223** Enable:**
184224
185225``` bash
186- clawdbot hooks internal enable session-memory
226+ clawdbot hooks enable session-memory
187227```
188228
189229** Output:** ` ~/clawd/memory/YYYY-MM-DD-slug.md `
@@ -197,7 +237,7 @@ Logs all command events to a centralized audit file.
197237** Enable:**
198238
199239``` bash
200- clawdbot hooks internal enable command-logger
240+ clawdbot hooks enable command-logger
201241```
202242
203243** Output:** ` ~/.clawdbot/logs/commands.log `
@@ -216,12 +256,3 @@ grep '"action":"new"' ~/.clawdbot/logs/commands.log | jq .
216256```
217257
218258** See:** [ command-logger documentation] ( /internal-hooks#command-logger )
219-
220- ## Gmail
221-
222- ``` bash
223- clawdbot hooks gmail setup --account
[email protected] 224- clawdbot hooks gmail run
225- ```
226-
227- See [ Gmail Pub/Sub documentation] ( /automation/gmail-pubsub ) for details.
0 commit comments