PRE-COMMIT CLI REVIEWS
Review both staged and unstaged local changes before committing.
GitRabbit CLI (`gitrabbit-cli`) provides a powerful terminal integration that allows developers to run comprehensive code reviews locally. Validate staged files, check against security vulnerabilities, and generate docstrings directly from your terminal session prior to pushing to remote git repositories.
Key_Capabilities
Staged Changes Scanning
Scan only what you've staged with 'git add' to keep commits clean and precise.
Offline Capabilities
Local lightweight model execution mode for offline reviews without network connection.
Husky & Git Hooks
Easily integrate as a pre-commit hook in your project's pipeline.
Setup_Sequence
Install CLI Utility
Install the GitRabbit CLI globally via npm or homebrew.
Authenticate Session
Log in with your GitRabbit credentials to link your local CLI to your organization settings.
Run Pre-Commit Scan
Run a scan on your current unstaged modifications.
Code_Example
# Install husky npm install husky --save-dev npx husky init # Add gitrabbit command to hook echo "gitrabbit review --staged --strict" > .husky/pre-commit chmod +x .husky/pre-commit
Pro_Tips
- ✦Use the '--fix' parameter with 'gitrabbit review' to let the CLI automatically apply modifications directly to your source files.
- ✦Pass '--output=json' to pipe review errors into your custom dev tooling pipelines.