hooksmith-1.4.2 has been yanked.
Features
- ⚙️ Automate the hooks installation process with
build.rsfiles. - 💻 Run hooks locally without triggering them via Git.
- ⚙️ Dry-run mode to preview changes without applying them.
Installation
With Cargo
You can install it using cargo:
Build Dependency
You can add it as a build dependency:
Then create a build.rs file:
use Path;
Usage
Create a configuration file named monk.yaml in your project root:
pre-commit:
commands:
- cargo fmt --all -- --check
- cargo clippy --workspace --release --all-targets --all-features -- --deny warnings
pre-push:
commands:
- cargo test
Commands
hooksmith compare: Compare installed hooks with the configuration file.hooksmith install: Install the hooks from the configuration file.hooksmith run <hook_name>: Run a hook.hooksmith uninstall [hook_name]: Uninstall a hook (all if no name is provided).hooksmith validate: Validate hooks in the configuration file against standard Git hooks.
All commands can be preceded by:
--dry-runflag to preview changes without applying them.--verboseflag to print more information.