* docs: generate CLI reference from live help * docs(cli): move bd version stamp from per-command pages to index only Drops the `(bd version X.Y.Z)` suffix from the auto-generated header on every per-command CLI reference page (writeSingleCommandDoc) and the docs/CLI_REFERENCE.md preamble (writeAllHelp). The version label now lives only on the index page emitted by scripts/generate-cli-docs.sh: - Dev tree (website/docs/cli-reference/index.md, docs/CLI_REFERENCE.md): labelled "Latest" - Versioned snapshots (website/versioned_docs/version-X.Y.Z/...): labelled with the explicit semver tag parsed from the directory name This eliminates the 100+-file no-signal diff a release version bump otherwise produces, restoring the "regen as a separate small commit" workflow PR #3704 enables. After this change a version bump alone yields zero diff on the dev tree; only the new versioned snapshot created at release-cut time carries the new tag. No datestamps are introduced anywhere — scripts/generate-cli-docs.sh --check remains deterministic across CI runs. Refs: mybd-afb, PR #3704 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: CI Bot <ci@beads.test> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
91 lines
2.4 KiB
Markdown
91 lines
2.4 KiB
Markdown
---
|
|
id: hooks
|
|
title: bd hooks
|
|
slug: /cli-reference/hooks
|
|
sidebar_position: 999
|
|
---
|
|
|
|
<!-- AUTO-GENERATED: do not edit manually -->
|
|
Generated from `bd help --doc hooks`
|
|
|
|
## bd 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
|
|
```
|
|
|
|
### 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 install [flags]
|
|
```
|
|
|
|
**Flags:**
|
|
|
|
```
|
|
--beads Install hooks to .beads/hooks/ (recommended for Dolt backend)
|
|
--chain Chain with existing hooks (run them before bd hooks)
|
|
--force Overwrite existing hooks without backup
|
|
--shared Install hooks to .beads-hooks/ (versioned) instead of .git/hooks/
|
|
```
|
|
|
|
### bd hooks list
|
|
|
|
Show the status of bd git hooks (installed, outdated, missing).
|
|
|
|
```
|
|
bd hooks list
|
|
```
|
|
|
|
### 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
|
|
|
|
The thin shim pattern ensures hook logic is always in sync with the
|
|
installed bd version - upgrading bd automatically updates hook behavior.
|
|
|
|
```
|
|
bd hooks run <hook-name> [args...]
|
|
```
|
|
|
|
### bd hooks uninstall
|
|
|
|
Remove bd git hooks from .git/hooks/ directory.
|
|
|
|
```
|
|
bd hooks uninstall
|
|
```
|