Hooks
기준일: 2026-07-26
공식 기준: Hooks
Hooks 문서는 OpenClaw 공식 문서(cli/hooks)를 한국어로 정리한 가이드입니다. CLI reference for openclaw hooks (agent hooks) 명령·설정 키·코드 예시는 공식 문서를 그대로 보존하며, 해석과 절차 안내는 한국어로 제공합니다. 최종 동작은 설치된 CLI 버전과 공식 원문을 확인하세요.
핵심 요약
CLI reference for openclaw hooks (agent hooks)
한국어 가이드 범위: cli/hooks 경로의 설정·명령·제약·예시를 학습용으로 재구성합니다.
문서 구성
공식 문서의 주요 섹션은 다음과 같습니다.
- List hooks
- Get hook info
- Check eligibility
- Enable a hook
- Disable a hook
- Install and update hook packs
- Bundled hooks
- command-logger log file
- 참고
- 관련 문서
상세 내용
openclaw hooks
Manage agent hooks (event-driven automations for commands like /new, /reset, and gateway startup). Bare openclaw hooks is equivalent to openclaw hooks list.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
List hooks
Lists hooks discovered from workspace, managed, extra, and bundled directories.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
--eligible: only hooks whose requirements are met.--json: structured output.-v, --verbose: include a Missing column with unmet requirements.
openclaw hooks list [--eligible] [--json] [-v|--verbose]
Hooks (4/5 ready)
Ready:
🚀 boot-md ✓ - Run BOOT.md on gateway startup
📎 bootstrap-extra-files ✓ - Inject additional 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 issued
Get hook info
`` is the hook name or hook key (for example session-memory). Shows source, file/handler paths, homepage, events, and per-requirement status (binaries, env, config, OS).
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
openclaw hooks info <name> [--json]
Check eligibility
Prints a ready/not-ready count summary; with hooks not ready, lists each with its blocking reason.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
openclaw hooks check [--json]
Enable a hook
Adds/updates hooks.internal.entries..enabled = true in config and also flips the hooks.internal.enabled master switch on (the gateway does not load any internal hook handler until at least one is configured). Fails if the hook does not exist, is plugin-managed, or is not eligible (missing requirements).
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
openclaw hooks enable <name>
Disable a hook
Sets hooks.internal.entries..enabled = false. Restart the gateway afterward.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
openclaw hooks disable <name>
Install and update hook packs
Hook packs install through the unified plugins installer/updater; openclaw hooks install / openclaw hooks update still work as deprecated aliases that print a warning and forward to the plugins commands.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- Npm specs are registry-only: package name plus an optional exact version or dist-tag. Git/URL/file specs and semver ranges are rejected. Dependency installs run project-local with
--ignore-scripts. - Bare specs and
@lateststay on the stable track; if npm resolves to a prerelease, OpenClaw stops and asks you to opt in explicitly (@beta,@rc, or an exact prerelease version). - Supported archives:
.zip,.tgz,.tar.gz,.tar. -l, --linklinks a local directory instead of copying it (adds it tohooks.internal.load.extraDirs); linked hook packs are managed hooks from an operator-configured directory, not workspace hooks.--pinrecords npm installs as an exact resolvedname@versionin shared SQLite state.- Install copies the pack into
~/.openclaw/hooks/<id>, enables its hooks underhooks.internal.entries.*, and records install provenance in shared SQLite state. - If a stored integrity hash no longer matches the fetched artifact, OpenClaw warns and prompts before continuing; pass global
--yesto bypass the prompt (for example in CI).
openclaw plugins install <package> # npm by default
openclaw plugins install npm:<package> # npm only
openclaw plugins install <package> --pin # pin resolved version
openclaw plugins install <path> # local directory or archive
openclaw plugins install -l <path> # link a local directory instead of copying
openclaw plugins update <id>
openclaw plugins update --all
openclaw plugins update --dry-run
Bundled hooks
Enable any bundled hook with openclaw hooks enable . Full details, config keys, and defaults: Bundled hooks.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
| Hook | Events | What it does |
|---|---|---|
| boot-md | gateway:startup |
Runs BOOT.md at gateway startup for each configured agent scope |
| bootstrap-extra-files | agent:bootstrap |
Injects extra bootstrap files (for example monorepo AGENTS.md/TOOLS.md) during agent bootstrap |
| command-logger | command |
Logs command events to ~/.openclaw/logs/commands.log |
| compaction-notifier | session:compact:before, session:compact:after |
Sends visible chat notices when session compaction starts and finishes |
| session-memory | command:new, command:reset |
Saves session context to memory on /new or /reset |
command-logger log file
tail -n 20 ~/.openclaw/logs/commands.log # recent commands
cat ~/.openclaw/logs/commands.log | jq . # pretty-print
grep '"action":"new"' ~/.openclaw/logs/commands.log | jq . # filter by action
참고
주요 항목:
hooks list --json,info --json, andcheck --jsonwrite structured JSON directly to stdout.
관련 문서
주요 항목:
- CLI reference
- Automation hooks
실습 체크리스트
- 공식 문서와 로컬 버전을 대조합니다:
https://docs.openclaw.ai/cli/hooks - 관련 CLI는
openclaw --help및 하위 명령--help로 옵션을 확인합니다. - 설정 변경 시
openclaw config/openclaw doctor로 유효성을 검사합니다. - Gateway·채널·플러그인 변경 후에는 필요 시 Gateway를 재시작합니다.
자주 쓰는 명령·설정 예시
openclaw hooks list [--eligible] [--json] [-v|--verbose]
Hooks (4/5 ready)
Ready:
🚀 boot-md ✓ - Run BOOT.md on gateway startup
📎 bootstrap-extra-files ✓ - Inject additional 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 issued
openclaw hooks info <name> [--json]
openclaw hooks check [--json]
openclaw hooks enable <name>
openclaw hooks disable <name>
관련 링크
- 공식 원문: cli/hooks
- OpenClaw 문서 홈
이 가이드는 공식 문서를 한국어 학습용으로 재구성한 것입니다. 옵션 기본값·플래그 이름은 설치 버전에 따라 달라질 수 있습니다.