https://github.com/mrmarble/yahm
Simple cli tool to manage git hooks
https://github.com/mrmarble/yahm
git hooks pre-commit
Last synced: 18 days ago
JSON representation
Simple cli tool to manage git hooks
- Host: GitHub
- URL: https://github.com/mrmarble/yahm
- Owner: MrMarble
- License: gpl-3.0
- Created: 2021-03-18T20:42:22.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-30T14:16:30.000Z (over 2 years ago)
- Last Synced: 2025-01-17T19:14:49.096Z (12 months ago)
- Topics: git, hooks, pre-commit
- Language: Go
- Homepage:
- Size: 321 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### YAHM
Yet Another Hook Manager
[](https://github.com/MrMarble/yahm/actions/workflows/golangci.yml)
[](https://goreportcard.com/report/github.com/mrmarble/yahm)

---
YAHM is a simple cli to manage your git hooks without third dependencies like python or node.
## Why?
Because I wanted to. I also don't like using [pre-commit](https://pre-commit.com/) because I don't have python on all the computers I use for coding and having to rely on third party repositories to run my hooks is a little weird, especially for running simple commands like `go test ./...` or `npm test` (although husky is :ok_hand: if you use node).
I like my tools to be a single binary without system dependencies to use them anywhere without too much overhead.
## Usage
Just run `yahm install` on a folder containing the `.yahm.yaml` file (or pass the file using `-c`) and thats it
### Config file
This is the basic structure of the config file, check this repo [.yahm.yaml](.yahm.yaml) file for more examples:
```yaml
hooks:
pre-commit:
actions:
- name: format
cmd: gofumpt -w -extra ./..
- name: test
cmd: go test ./...
```
### Planned features
Things I'm interested in doing but may never implement lol
- Load from file
- Load from url
- Improve git output
- Built-in hooks. Like conventional commit messages
- Show installed/modified hook on `yahm list`
- Run in parallel?