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 install

Installs all four hooks into .git/hooks/. Non-destructive — appends to existing hooks, preserving Husky and lint-staged.

contxt hook status

Shows which hooks are installed and whether each is enabled in your project config.

contxt hook uninstall

Removes only the Contxt-managed lines from each hook file. Your existing hook logic is untouched.

Installed hooks

HookWhat it does
post-commitScans commit messages for decision keywords; creates drafts
pre-pushUpdates active context with session summary; optionally syncs to cloud
post-checkoutSwitches Contxt memory branch to match the checked-out git branch
prepare-commit-msgInjects 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.