pre-commit-crocodile
Git hooks manager intended for developers using pre-commit, prek and commitizen.
Documentation: https://radiandevcore.gitlab.io/tools/pre-commit-crocodile
Package: https://pypi.org/project/pre-commit-crocodile/
Features
pre-commit-crocodile uses the following features:
- CLI - pre-commit: Automated Git hooks before commits and upon pushes
- CLI - prek: Better
pre-commit, re-engineered in Rust - CLI - commitizen: Commits tools and validation based upon conventional commits
- Hooks - pre-commit-hooks: Common
pre-commithooks useful for developers
pre-commit-crocodile provides the following features:
- CLI - pre-commit-crocodile: Management tool for
pre-commitGit hooks - CLI - pre-commit-crocodile: Easy Git hooks activation for development teams
- CLI - pre-commit-crocodile: Dependencies preparation for pre-commit or prek.
- CLI - pre-commit-crocodile: Automated customized configurations for maintainers
- Hooks - prepare-commit-msg: Prepare commit message automatically based on changes
Preview
Usage
usage: pre-commit-crocodile [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]
[-l | -i | -c | -b | -e | -d | -a | -C | -r] [--config FOLDER | -D] [--commit]
[--components | --remotes | --no-components] [--offline] [--stage STAGE]
[--set-engine [ENGINE]] [--]
pre-commit-crocodile: Git hooks manager intended for developers using pre-commit, prek and commitizen
internal arguments:
-h, --help # Show this help message
--version # Show the current version
--no-color # Disable colors outputs with 'NO_COLOR=1'
# (or default settings: [themes] > no_color)
--update-check # Check for newer package updates
--settings # Show the current settings path and contents
--set GROUP KEY VAL # Set settings specific 'VAL' value to [GROUP] > KEY
# or unset by using 'UNSET' as 'VAL'
modes arguments:
-l, --list # List Git hooks installed in sources
-i, --install # Install dependencies for pre-commit hooks
-c, --configure # Update sources with hooks configurations
-b, --badges # Update documentation with badges configurations
-e, --enable # Enable pre-commit hooks
-d, --disable # Disable pre-commit hooks
-a, --autoupdate # Autoupdate pre-commit hooks
-C, --clean # Clean pre-commit cached hooks
-r, --run # Run pre-commit hooks
configurations arguments:
--config FOLDER # Use configurations from a specific folder
-D, --default # Use global default configurations instead of sources
--commit # Commit configurations changes automatically (implies --configure)
--components # Import components from GitLab with 'include: component:'
--remotes # Import components from GitLab with 'include: remote:'
--no-components # Import components templates locally instead of 'include: component:'
--offline # Use offline mode to disable configurations autoupdate
--stage STAGE # Run a specific pre-commit stage with --run
# (use 'list' to list supported stages)
settings arguments:
--set-engine [ENGINE] # Set pre-commit engine to use (pre-commit, prek, default: pre-commit)
positional arguments:
-- # Positional arguments separator (recommended)
Installation
{
# Option 1: If using pipx
if type pipx >/dev/null 2>&1; then
pipx ensurepath
pipx install pre-commit-crocodile
pipx upgrade pre-commit-crocodile
# Option 2: If using pip
else
sudo pip3 install pre-commit-crocodile
fi
}
Compatibility
Projects compatible with pre-commit-crocodile can use this badge to ease things for developers, both as an indicator and a documentation shortcut button :
[](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
<a href="https://radiandevcore.gitlab.io/tools/pre-commit-crocodile"><img src="https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab" alt="pre-commit-crocodile" style="max-width:100%;"></a>
Projects with configurations | 
Configure engine to use (once per user)
- prek: Recent Rust re-implementation, in development and faster (default, recommended)
- pre-commit: Original Python implementation, stable but slower (legacy)
pre-commit-crocodile --set-engine [pre-commit,prek]
Install dependencies (once per user)
pre-commit-crocodile --install
Enable hooks for a project
pre-commit-crocodile --enable
Manually run hooks of a project
pre-commit-crocodile --run
Disable hooks for a project
pre-commit-crocodile --disable
Projects without configurations | 
Import or refresh configurations
pre-commit-crocodile --configure
Projects maintenance | 
Update hooks automatically
pre-commit-crocodile --autoupdate
Cleanup hooks cache
pre-commit-crocodile --clean
Dependencies
- colored: Terminal colors and styles
- commitizen: Simple commit conventions for internet citizens
- pre-commit: A framework for managing and maintaining pre-commit hooks
- pre-commit-crocodile: Git hooks manager intended for developers using pre-commit, prek and commitizen
- prek: Better
pre-commit, re-engineered in Rust - setuptools: Build and manage Python packages
- update-checker: Check for package updates on PyPI
- uv: An extremely fast Python package and project manager, written in Rust.
References
- .gitlab-ci.yml: GitLab CI/CD Pipeline Configuration Reference
- conventionalcommits: Conventional Commits specification for commit messages
- gcil: Launch .gitlab-ci.yml jobs locally
- git-cliff: CHANGELOG generator
- gitlab-release: Utility for publishing on GitLab
- mkdocs: Project documentation with Markdown
- mkdocs-coverage: Coverage plugin for mkdocs documentation
- mkdocs-exporter: Exporter plugin for mkdocs documentation
- mkdocs-material: Material theme for mkdocs documentation
- mypy: Optional static typing for Python
- pexpect-executor: Automate interactive CLI tools actions
- PyPI: The Python Package Index
- termtosvg: Record terminal sessions as SVG animations
- twine: Utility for publishing on PyPI
Metadata
Release files for pre-commit-crocodile 8.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pre_commit_crocodile-8.4.0.tar.gz | 162.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pre_commit_crocodile-8.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 214.2 kB
Release files / pre_commit_crocodile-8.4.0.tar.gz
| Download URL | pre_commit_crocodile-8.4.0.tar.gz |
|---|---|
| Size | 162.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2949e345ec6167990377774e3b90cc460001148e6070439a8809695a9077d967
|
|
BLAKE2b-256 checksum How to use checksums |
d4eff3c805afae63fef7116b192059189e11751ac96d6cb0cd50cee60fd1f9f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / pre_commit_crocodile-8.4.0-py3-none-any.whl
| Download URL | pre_commit_crocodile-8.4.0-py3-none-any.whl |
|---|---|
| Size | 51.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0277bc4032aab9c12ce7bcbccedcce37dca6578b5948ea73169b21429138503d
|
|
BLAKE2b-256 checksum How to use checksums |
257c99ef1dba684f3955ba1879efdc0de314fb50af2bb592cf6f0039133531b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|