{"repo":"greenbone/autohooks","free":true,"listed":false,"github":"https://github.com/greenbone/autohooks","clone":"git clone https://github.com/greenbone/autohooks.git","description":"Library for managing git hooks","language":"Python","stars":206,"topics":["linting","python","githooks-plugin","git","formatting","hooks","pre-commit","pre-commit-hooks","python3","automation"],"license":"GPL-3.0","category":"workflow-automation","readme_excerpt":"Autohooks Library for managing and writing git hooks in Python using pyproject.toml for its settings. Looking for automatic formatting and linting, e.g., with [black] and [ruff], while creating a git commit using a pure Python implementation? Do you just want to have your git hook settings in the pyproject.toml file too? Welcome to autohooks ! - Why? - Solution - Requirements - Plugins - Installing autohooks - Command Completion - Setup for bash - Setup for zsh - Maintainer - Contributing - License Why? Several outstanding libraries for managing and executing git hooks exist already. To name a few: husky, lint-staged, precise-commits or pre-commit. However, they need another interpreter besides python (like husky), require a different config file besides pyproject.toml or are too ambiguous (like pre-commit). pre-commit is written in python but has support hooks written in all kind of languages. Additionally, it maintains the dependencies by itself and does not install them in the current environment. Solution autohooks is a pure python library that installs a minimal executable git hook. It allows the decision of how to maintain the hook dependencies by supporting different modes and stores its settings in the well known pyproject.toml file. Requirements Python 3.10+ is required for autohooks. Plugins Python code formatting via black Python code formatting via autopep8 Python code linting via ruff Python code linting via pylint Python code linting via flake8 Python code linti","default_branch":null,"files":null,"tree":[],"storefront":"/r/greenbone","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/greenbone/autohooks/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}