crewship hooks
Manage the lifecycle-hook registry — shell commands, HTTP webhooks, or subagents that fire on platform events (pre_tool_call, post_agent_stop, on_approval_requested, …). See the Hooks guide for the full 15-event catalog and the three handler kinds.
Every write requires
OWNER or ADMIN. Creating or editing a shell
hook requires OWNER — a shell handler runs its command on the
crewshipd host, outside container isolation.Subcommands
hooks list, create, and update honour the global --format flag
(json/yaml/ndjson) — see Output Formats.
crewship hooks list
Sample output:
handler_config: the URL for http, the command for shell, the agent for subagent, truncated to 40 characters.
crewship hooks create
--event and --handler, plus a target for that handler kind.
New hooks are enabled unless you pass --disabled.
crewship hooks update <id>
create, all optional. Only the flags you pass are sent — an omitted flag keeps its current server-side value, so changing the event does not quietly clear your matcher or blocking flag. Passing no flags at all is an error rather than an empty patch.
Converting a hook to --handler shell, or editing one that is already shell, requires OWNER.
crewship hooks delete <id>
Without
--yes the command refuses and points at crewship hooks disable, which stops the hook firing while keeping its definition.
crewship hooks enable <id>
OWNER or ADMIN (403 otherwise). Emits system.hook_toggled into the Crew Journal with the actor’s user ID.
crewship hooks disable <id>
Errors
Currently-dispatched events
Which events actually fire (as of PR #210)
Which events actually fire (as of PR #210)
Dispatched:
pre_agent_start,post_agent_stopon_approval_requested