Installation
Get CommitGuard running in under 60 seconds and start protecting your codebase with every commit. CommitGuard works seamlessly with any git repository and works out of the box with VSCode.
Quick Start
Install CommitGuard globally
Navigate to your project
Initialize CommitGuard
Commit as usual
CommitGuard now runs automatically on every commit. That's it (Also will automatically work with VSCode and other git integrations)!
[CommitGuard] Analyzing commit...
✓ Commit passed all checks
Want to bypass checks for a commit?
You can bypass CommitGuard checks for a specific commit by adding --skip to your commit message.
Want to configure CommitGuard checks?
You can view or update CommitGuard preferences for the current repository using. On the pro plan you can add your own custom rules here too!
CLI Commands
commitguard initInstall git hooks in your current repository
$ commitguard init ✓ CommitGuard hooks installed successfully
commitguard removeRemove CommitGuard hooks from the current repository
$ commitguard remove ✓ CommitGuard hooks removed
commitguard configView or update CommitGuard preferences for the current repository. On the Pro plan you can add your own custom rules here too!
$ commitguard config Select enabled checks for this project: Security, Performance, Code Quality, Architecture
commitguard keysManage your global API key for AI-powered analysis
$ commitguard keys Current API key: sk-ant-***************
What Happens After Installation?
- •CommitGuard hooks are installed
- •Every commit is automatically analyzed before it's created
- •No config files are added to your project
- •You can bypass checks anytime with
git commit -m "chore: update unsecure --skip"in your commit message (Obvioulsy it is auto removed ;). If you use git in your terminal you will be auto-prompted to bypass if you want.
Troubleshooting
CommitGuard isn't running on commits
Make sure you're in a git repository and that commitguard is installed:
$ commitguard init How do I skip a single commit?
Use the standard git bypass flag:
$ git commit -m "Emergency hotfix --skip" How do I completely remove CommitGuard?
Remove from a specific repo:
$ commitguard remove Uninstall globally:
$ npm uninstall -g @commitguard/cli