Installation

Get CommitGuard running in under 60 seconds. No config files, no setup - just install and commit for free.

Quick Start

1

Install CommitGuard globally

$ npm install -g commitguard
2

Navigate to your project

$ cd your-project
3

Initialize CommitGuard

$ commitguard init
4

Commit as usual

CommitGuard now runs automatically on every commit. That's it (Also will automatically work with VSCode and other git integrations)!

$ git commit -m "Add new feature"
[CommitGuard] Analyzing commit...
Commit passed all checks

CLI Commands

commitguard init

Install git hooks in your current repository

$ commitguard init
✓ CommitGuard hooks installed successfully
commitguard list

Show all installed hooks in the current repository

$ commitguard list
Installed hooks:
  • pre-commit
commitguard remove

Remove CommitGuard hooks from the current repository

$ commitguard remove
✓ CommitGuard hooks removed
commitguard keys

Manage your global API key for AI-powered analysis

$ commitguard keys
Current API key: sk-ant-***************
commitguard pre-commit

Manually run pre-commit check (automatically used by git hook)

$ commitguard pre-commit
✓ Commit passed all checks

What Happens After Installation?

  • CommitGuard hooks are installed in .git/hooks/
  • 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 --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 hooks are installed:

$ commitguard list
How do I skip a single commit?

Use the standard git bypass flag:

$ git commit --no-verify -m "Emergency hotfix"
How do I completely remove CommitGuard?

Remove from a specific repo:

$ commitguard remove

Uninstall globally:

$ npm uninstall -g commitguard