{"id":15712467,"url":"https://github.com/metov/yaghm","last_synced_at":"2025-04-19T14:40:29.256Z","repository":{"id":47013943,"uuid":"381218803","full_name":"metov/yaghm","owner":"metov","description":"Minimal git hook manager for the command line.","archived":false,"fork":false,"pushed_at":"2023-06-30T23:33:20.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T08:43:45.223Z","etag":null,"topics":["git","git-hooks","hacktoberfest","hacktoberfest2021","hooks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-29T02:43:11.000Z","updated_at":"2023-07-01T00:15:10.000Z","dependencies_parsed_at":"2024-10-24T13:21:01.932Z","dependency_job_id":null,"html_url":"https://github.com/metov/yaghm","commit_stats":{"total_commits":29,"total_committers":4,"mean_commits":7.25,"dds":0.5172413793103448,"last_synced_commit":"1712fb0cb1b3800b327c849243dd00518d694b98"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metov%2Fyaghm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metov%2Fyaghm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metov%2Fyaghm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metov%2Fyaghm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metov","download_url":"https://codeload.github.com/metov/yaghm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249254969,"owners_count":21238676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","git-hooks","hacktoberfest","hacktoberfest2021","hooks"],"created_at":"2024-10-03T21:16:19.229Z","updated_at":"2025-04-19T14:40:29.238Z","avatar_url":"https://github.com/metov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yet Another Git Hook Manager\nYaghm is a minimal [git hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) manager. You write a simple YAML config file listing the hooks you want. `yaghm enable` enables them in your repo. `yaghm disable` disables them.:\n\n* Yaghm is simple. Hooks are not rocket science. The config is just a list of shell commands. When you enable them, yaghm writes a wrapper script in `.git/hooks` that calls the commands you gave. If they work in your shell they'll work in the hook.\n* Because it's so simple, the documentation is complete, troubleshooting is easy and writing your own extensions is a breeze.\n* **Your** workflow, not mine. You can store the config wherever you want. Maybe you version your hooks, maybe you don't, maybe you keep them in a separate repo, or your home dir, or your dotfiles...\n\n## Usage\nTo use yaghm, you create a config that lists your hook commands (see [detailed syntax](doc/config.md)):\n\n```yaml\npre-commit:\n  - ...\n  # Assuming you have a program called current_branch_not\n  - current_branch_not master \n  - enable: black --check .\n    install: pip install black\n    update: pip install -U black\n  - enable: require_version_bump master setup.py\n    update: pip install -U metovhooks\n\npost-commit:\n  - ...\n```\n\nYou can use `yaghm -h` to see general help. There are three main subcommands (which also support `-h`): \n\n* Enable hooks: `yaghm enable`\n* List enabled hooks: `yaghm list`\n* Disable hooks: `yaghm disable`\n\nWhen using `enable` and `disable`, if you pass `--dryrun` no files will actually be written.\n\nYou can also run custom hook commands (e.g. update) with `yaghm update`. If any hooks in your config [specify the command](doc/config.md), it will be executed.\n\n## Install\nInstall with `pip install yaghm`\n\n## Further reading\n\n* [How it works](doc/technical.md)\n* [Config syntax](doc/config.md)\n* [Developing hooks](doc/custom-hooks.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetov%2Fyaghm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetov%2Fyaghm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetov%2Fyaghm/lists"}