hardpoint hook
Install, uninstall, or check status of Hardpoint git hooks.Usage
Subcommands
| Command | Description |
|---|---|
install | Install a git hook |
uninstall | Remove a git hook |
status | Check hook installation status |
Flags
| Flag | Description |
|---|---|
--type <type> | Hook type: pre-commit, pre-push, commit-msg (default: pre-commit) |
--manager <manager> | Hook manager: native, husky, lefthook (default: native) |
Examples
Install Hook
Check Status
Uninstall Hook
Hook Managers
Hardpoint detects and integrates with popular hook managers:| Manager | Detection | Integration |
|---|---|---|
| Native git | .git/hooks/ | Direct installation |
| Husky | .husky/ | Adds to existing config |
| Lefthook | lefthook.yml | Adds to existing config |
Native Git Hooks
By default, Hardpoint creates.git/hooks/pre-commit:
Husky Integration
If Husky is detected, install with:Lefthook Integration
If Lefthook is detected, install with:lefthook.yml:
Hook Behavior
The installed hook:- Runs
hardpoint scan --ci --staged - Only scans staged files (fast)
- Exits with code 1 if findings detected
- Blocks the commit until issues are fixed