Hooks
remoteclaw hooks
Manage agent hooks (event-driven automations for commands like /new, /reset, and gateway startup).
Running remoteclaw hooks with no subcommand is equivalent to remoteclaw hooks list.
Related:
- Hooks: Hooks
- Plugin hooks: Plugin hooks
List all hooks
remoteclaw hooks listList all discovered hooks from workspace, managed, extra, and bundled directories. Gateway startup does not load internal hook handlers until at least one internal hook is configured.
Options:
--eligible: Show only eligible hooks (requirements met)--json: Output as JSON-v, --verbose: Show detailed information including missing requirements
Example output:
Hooks (4/4 ready)
Ready: π boot-md β - Run BOOT.md on gateway startup π bootstrap-extra-files β - Inject extra workspace bootstrap files during agent bootstrap π command-logger β - Log all command events to a centralized audit file πΎ session-memory β - Save session context to memory when /new or /reset command is issuedExample (verbose):
remoteclaw hooks list --verboseShows missing requirements for ineligible hooks.
Example (JSON):
remoteclaw hooks list --jsonReturns structured JSON for programmatic use.
Get hook information
remoteclaw hooks info <name>Show detailed information about a specific hook.
Arguments:
<name>: Hook name or hook key (e.g.,session-memory)
Options:
--json: Output as JSON
Example:
remoteclaw hooks info session-memoryOutput:
πΎ session-memory β Ready
Save session context to memory when /new or /reset command is issued
Details: Source: remoteclaw-bundled Path: /path/to/remoteclaw/hooks/bundled/session-memory/HOOK.md Handler: /path/to/remoteclaw/hooks/bundled/session-memory/handler.ts Homepage: https://docs.remoteclaw.org/automation/hooks#session-memory Events: command:new, command:reset
Requirements: Config: β workspace.dirCheck hooks eligibility
remoteclaw hooks checkShow summary of hook eligibility status (how many are ready vs. not ready).
Options:
--json: Output as JSON
Example output:
Hooks Status
Total hooks: 4Ready: 4Not ready: 0Enable a Hook
remoteclaw hooks enable <name>Enable a specific hook by adding it to your config (~/.remoteclaw/remoteclaw.json by default).
Note: Workspace hooks are disabled by default until enabled here or in config. Hooks managed by plugins show plugin:<id> in remoteclaw hooks list and canβt be enabled/disabled here. Enable/disable the plugin instead.
Arguments:
<name>: Hook name (e.g.,session-memory)
Example:
remoteclaw hooks enable session-memoryOutput:
β Enabled hook: πΎ session-memoryWhat it does:
- Checks if hook exists and is eligible
- Updates
hooks.internal.entries.<name>.enabled = truein your config - Saves config to disk
If the hook came from <workspace>/hooks/, this opt-in step is required before
the Gateway will load it.
After enabling:
- Restart the gateway so hooks reload (menu bar app restart on macOS, or restart your gateway process in dev).
Disable a Hook
remoteclaw hooks disable <name>Disable a specific hook by updating your config.
Arguments:
<name>: Hook name (e.g.,command-logger)
Example:
remoteclaw hooks disable command-loggerOutput:
βΈ Disabled hook: π command-loggerAfter disabling:
- Restart the gateway so hooks reload
Notes
remoteclaw hooks list --json,info --json, andcheck --jsonwrite structured JSON directly to stdout.- Plugin-managed hooks cannot be enabled or disabled here; enable or disable the owning plugin instead.
Install hook packs
remoteclaw plugins install <package> # npm by defaultremoteclaw plugins install npm:<package> # npm onlyremoteclaw plugins install <package> --pin # pin versionremoteclaw plugins install <path> # local pathInstall hook packs through the unified plugins installer.
remoteclaw hooks install still works as a compatibility alias, but it prints a
deprecation warning and forwards to remoteclaw plugins install.
Npm specs are registry-only (package name + optional exact version or
dist-tag). Git/URL/file specs and semver ranges are rejected. Dependency
installs run project-local with --ignore-scripts for safety, even when your
shell has global npm install settings.
Bare specs and @latest stay on the stable track. If npm resolves either of
those to a prerelease, RemoteClaw stops and asks you to opt in explicitly with a
prerelease tag such as @beta/@rc or an exact prerelease version.
What it does:
- Copies the hook pack into
~/.remoteclaw/hooks/<id> - Enables the installed hooks in
hooks.internal.entries.* - Records the install under
hooks.internal.installs
Options:
-l, --link: Link a local directory instead of copying (adds it tohooks.internal.load.extraDirs)--pin: Record npm installs as exact resolvedname@versioninhooks.internal.installs
Supported archives: .zip, .tgz, .tar.gz, .tar
Examples:
# Local directoryremoteclaw plugins install ./my-hook-pack
# Local archiveremoteclaw plugins install ./my-hook-pack.zip
# NPM packageremoteclaw plugins install @remoteclaw/my-hook-pack
# Link a local directory without copyingremoteclaw plugins install -l ./my-hook-packLinked hook packs are treated as managed hooks from an operator-configured directory, not as workspace hooks.
Update hook packs
remoteclaw plugins update <id>remoteclaw plugins update --allUpdate tracked npm-based hook packs through the unified plugins updater.
remoteclaw hooks update still works as a compatibility alias, but it prints a
deprecation warning and forwards to remoteclaw plugins update.
Options:
--all: Update all tracked hook packs--dry-run: Show what would change without writing
When a stored integrity hash exists and the fetched artifact hash changes,
RemoteClaw prints a warning and asks for confirmation before proceeding. Use
global --yes to bypass prompts in CI/non-interactive runs.
Bundled hooks
session-memory
Saves session context to memory when you issue /new or /reset.
Enable:
remoteclaw hooks enable session-memoryOutput: ~/.remoteclaw/workspace/memory/YYYY-MM-DD-HHMM.md by default. Set hooks.internal.entries.session-memory.llmSlug: true for model-generated filename slugs.
See: session-memory documentation
bootstrap-extra-files
Injects additional bootstrap files (for example monorepo-local AGENTS.md / TOOLS.md) during agent:bootstrap.
Enable:
remoteclaw hooks enable bootstrap-extra-filesSee: bootstrap-extra-files documentation
command-logger
Logs all command events to a centralized audit file.
Enable:
remoteclaw hooks enable command-loggerOutput: ~/.remoteclaw/logs/commands.log
View logs:
# Recent commandstail -n 20 ~/.remoteclaw/logs/commands.log
# Pretty-printcat ~/.remoteclaw/logs/commands.log | jq .
# Filter by actiongrep '"action":"new"' ~/.remoteclaw/logs/commands.log | jq .See: command-logger documentation
boot-md
Runs BOOT.md when the gateway starts (after channels start).
Events: gateway:startup
Enable:
remoteclaw hooks enable boot-md