Christian Ledermann: Stop Copying Your .pre-commit-config.yaml
Setting up quality gates for new projects often involves copying and editing existing configuration files, which is a tedious and disruptive process. This "config archeology" workflow requires manually identifying tools, finding their repository details, and writing YAML, breaking developer flow. To solve this, pc-init, a Command Line Interface tool, was developed. Pc-init automates the scaffolding of a production-ready pre-commit configuration file based on a project's technology stack. Users simply specify their language and framework, and pc-init generates the necessary setup. For example, pc-init --lang py or pc-init --lang js --framework react. This eliminates the need to hunt for URLs or manually manage complex YAML. Pc-init promotes standardization by enforcing consistent quality standards across projects. The tool is also extensible, allowing users to define their own presets for team-wide consistency. It integrates seamlessly with both pre-commit and prek. Installation is straightforward using uv tool install pc-init. After generating the config, users should run pre-commit autoupdate or prek autoupdate to get the latest tool versions. Suggestions and issues can be reported on the project's GitHub repository.
pc-init --lang pyorpc-init --lang js --framework react. This eliminates the need to hunt for URLs or manually manage complex YAML. Pc-init promotes standardization by enforcing consistent quality standards across projects. The tool is also extensible, allowing users to define their own presets for team-wide consistency. It integrates seamlessly with both pre-commit and prek. Installation is straightforward usinguv tool install pc-init. After generating the config, users should runpre-commit autoupdateorprek autoupdateto get the latest tool versions. Suggestions and issues can be reported on the project's GitHub repository.