bd help --doc hooks.
Install, uninstall, or list git hooks for beads integration.
The hooks provide:
- pre-commit: Run chained hooks before commit
- post-merge: Run chained hooks after pull/merge
- pre-push: Run chained hooks before push
- post-checkout: Run chained hooks after branch checkout
- prepare-commit-msg: Add agent identity trailers for forensics
bd hooks install
Install git hooks for beads integration. By default, hooks are installed to .git/hooks/ in the current repository. Use —beads to install to .beads/hooks/ (recommended for Dolt backend). Use —shared to install to a versioned directory (.beads-hooks/) that can be committed to git and shared with team members. Hooks use section markers to coexist with existing hooks — any user content outside the markers is preserved across installs and upgrades. Installed hooks:- pre-commit: Run chained hooks before commit
- post-merge: Run chained hooks after pull/merge
- pre-push: Run chained hooks before push
- post-checkout: Run chained hooks after branch checkout
- prepare-commit-msg: Add agent identity trailers (for orchestrator agents)
bd hooks list
Show the status of bd git hooks (installed, outdated, missing).bd hooks run
Execute the logic for a git hook. This command is typically called by thin shim scripts installed in .git/hooks/. Supported hooks:- pre-commit: Run chained hooks before commit
- post-merge: Run chained hooks after pull/merge
- pre-push: Run chained hooks before push
- post-checkout: Run chained hooks after branch checkout
- prepare-commit-msg: Add agent identity trailers for forensics