Getting started
Requirements
- Python 3.13 or newer on
PATH - A Git working tree
- The multiplexer
installed as
.git/hooks/pre-commitif you want this file run as a subhook
Copy the template
mkdir -p hooks/pre-commit
cp /path/to/pre-commit-template/src/pre-commit-template hooks/pre-commit/01-ruff
chmod +x hooks/pre-commit/01-ruff
A later setup tool will copy this same file from a hook repo.
Fill the header
Set REQUIRED_COMMANDS, TOOL, and FILE_EXTENSIONS. Example:
Do not edit below # STOP HERE.
First check
With no matching staged files the hook exits 0.