CLI Reference
contxt hook
Install, check, and remove Contxt git hooks. Hooks are installed automatically by contxt init — use these commands only when managing hooks manually.
Commands
contxt hook installInstalls all four hooks into .git/hooks/. Non-destructive — appends to existing hooks, preserving Husky and lint-staged.
contxt hook statusShows which hooks are installed and whether each is enabled in your project config.
contxt hook uninstallRemoves only the Contxt-managed lines from each hook file. Your existing hook logic is untouched.
Installed hooks
| Hook | What it does |
|---|---|
| post-commit | Scans commit messages for decision keywords; creates drafts |
| pre-push | Updates active context with session summary; optionally syncs to cloud |
| post-checkout | Switches Contxt memory branch to match the checked-out git branch |
| prepare-commit-msg | Injects active context as comment lines into the commit template |
See the Git Hooks page for a detailed breakdown of each hook's behavior and configuration options.