Skip to main content

Pre-commit hooks

nimbus install-hooks installs a git pre-commit hook that reviews staged changes before every commit. Issues are caught before they enter version history.

Install

nimbus install-hooks

Output:

  ✓ Nimbus pre-commit hook installed
blocking on severity: high
skip with: git commit --no-verify
remove with: nimbus uninstall-hooks

How it works

On every git commit:

  1. Runs git diff --cached to get staged changes
  2. Sends to Claude Haiku with your active repo rules injected
  3. If issues above the configured severity threshold: prints warning and blocks the commit
  4. If no blocking issues: commit proceeds silently

Configuration

In ~/.nimbus/config.toml:

[hooks]
block_on = "high" # high | medium | low | none
model = "claude-haiku-4-5-20251001" # fast model for speed
timeout_seconds = 15 # abort if takes longer than this

Skip for a single commit

git commit --no-verify -m "message"

Uninstall

nimbus uninstall-hooks