https://github.com/peeeuzin/hooky
Git hooks helper made in Rusty
https://github.com/peeeuzin/hooky
git git-hooks hooks rust
Last synced: about 1 month ago
JSON representation
Git hooks helper made in Rusty
- Host: GitHub
- URL: https://github.com/peeeuzin/hooky
- Owner: peeeuzin
- License: mit
- Created: 2024-03-24T15:06:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T22:24:36.000Z (over 2 years ago)
- Last Synced: 2025-07-05T07:07:21.067Z (12 months ago)
- Topics: git, git-hooks, hooks, rust
- Language: Rust
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hooky
Git hooks helper made in Rust
## Features
- [x] Zero dependencies
- [x] Easy to use
- [x] Fast
- [x] Cross-platform
# Installation
```bash
cargo install hooky-rs
```
# CLI usage
## Initialize Hooky
To initialize the hooks, run the following command:
```bash
hooky init
```
This will create a `.hooky` directory in the root of your project, where the hooks will be stored. Also automatically adds `pre-commit` and hooks, but you can disable this by passing the `--no-pre-commit` flag.
## Add a hook
To add a hook, run the following command:
```bash
hooky add
```
## Uninstall Hooky
To uninstall Hooky, run the following command:
```bash
hooky uninstall
```
# Library usage (Experimental)
The library usage is made for Rust projects, to bind the hooks automatically.
To use Hooky as a library, add the following to your `Cargo.toml`:
```toml
[build-dependencies]
hooky-rs = "*"
```
Add `src/build.rs`:
```rust
fn main() {
// Initialize Hooky
hooky::initialize_build();
}
```