Pre-commit hook that uses AI to check for mistakes leading to security issues
- npm install --save-dev sanity-check
-
cp node_modules/@iteam/sanity-check/pre-commit .git/hooks/pre-commit
(or add it's content to a pre-existing pre-commit) - Add an .env file in root of your repository, with the key
CLAUDE_API_KEY
set to your api key.