Git hooks intended for developers using pre-commit
Project description
pre-commit-crocodile
Git hooks intended for developers using pre-commit 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 - commitizen: Commits tools and validation based upon conventional commits
- Hooks - pre-commit-hooks: Common
pre-commit
hooks useful for developers - 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] [--stage STAGE] [--]
pre-commit-crocodile: Git hooks intended for developers using pre-commit
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
--stage STAGE # Run a specific pre-commit stage with --run
# (use 'list' to list supported stages)
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 | 
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 intended for developers using pre-commit
- setuptools: Build and manage Python packages
- update-checker: Check for package updates on PyPI
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-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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pre_commit_crocodile-4.0.0.tar.gz
(145.5 kB
view details)
Built Distribution
File details
Details for the file pre_commit_crocodile-4.0.0.tar.gz
.
File metadata
- Download URL: pre_commit_crocodile-4.0.0.tar.gz
- Upload date:
- Size: 145.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bf11a57ef37bf8dc1934a19909fd6d2d7f9ca1268e96d088e5c8266bf42fd64 |
|
MD5 | ef3db70cc020bd6913af2766b13e5fd2 |
|
BLAKE2b-256 | dd490900d04c67f174e69128bd1eac4b9af66a2df195803184196dfe6ff6b7b6 |
File details
Details for the file pre_commit_crocodile-4.0.0-py3-none-any.whl
.
File metadata
- Download URL: pre_commit_crocodile-4.0.0-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94298384d9c4e33cfeea496c20894c1c2708740d463b78b76e979c0c2b8baf39 |
|
MD5 | b35a10098b6270890e9123f46e6b93dc |
|
BLAKE2b-256 | de21361b30157fb217098bd19bbe6232462c625e1857e0fbc76de0401e694944 |