{"id":28918000,"url":"https://github.com/captainhook-git/captainhook-bin","last_synced_at":"2025-10-14T08:32:53.995Z","repository":{"id":203960833,"uuid":"710776784","full_name":"captainhook-git/captainhook-bin","owner":"captainhook-git","description":"CaptainHook is a very flexible git hook manager for software developers that makes sharing git hooks with your team a breeze.","archived":false,"fork":false,"pushed_at":"2025-06-08T12:47:29.000Z","size":1312,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T13:11:31.914Z","etag":null,"topics":["automation","code-quality","git","git-hooks","hacktoberfest","tool"],"latest_commit_sha":null,"homepage":"http://captainhook.info","language":"Go","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/captainhook-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"sebastianfeldmann"}},"created_at":"2023-10-27T12:18:33.000Z","updated_at":"2025-06-08T12:47:32.000Z","dependencies_parsed_at":"2023-11-24T20:31:03.993Z","dependency_job_id":"7184db16-5577-4f6c-8be4-64b56334490d","html_url":"https://github.com/captainhook-git/captainhook-bin","commit_stats":null,"previous_names":["captainhook-go/captainhook","captainhook-git/captainhook-bin"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/captainhook-git/captainhook-bin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainhook-git%2Fcaptainhook-bin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainhook-git%2Fcaptainhook-bin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainhook-git%2Fcaptainhook-bin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainhook-git%2Fcaptainhook-bin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/captainhook-git","download_url":"https://codeload.github.com/captainhook-git/captainhook-bin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captainhook-git%2Fcaptainhook-bin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261217812,"owners_count":23126280,"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":["automation","code-quality","git","git-hooks","hacktoberfest","tool"],"created_at":"2025-06-22T01:03:23.575Z","updated_at":"2025-10-14T08:32:48.945Z","avatar_url":"https://github.com/captainhook-git.png","language":"Go","readme":"![Version](https://img.shields.io/github/v/release/captainhook-git/captainhook-bin?style=flat-square\u0026label=version)\n[![License](https://poser.pugx.org/captainhook/captainhook/license.svg?v=1)](https://packagist.org/packages/captainhook/captainhook)\n[![Go Report Card](https://goreportcard.com/badge/github.com/captainhook-git/captainhook-bin?style=flat-square)](https://goreportcard.com/report/github.com/captainhook-git/captainhook-bin)\n![Go Version](https://img.shields.io/badge/go%20version-%3E=1.21-61CFDD.svg?style=flat-square)\n[![Go Reference](https://pkg.go.dev/badge/github.com/captainhook-git/captainhook-bin.svg?style=flat-square)](https://pkg.go.dev/github.com/captainhook-git/captainhook-bin)\n[![Mastodon](https://img.shields.io/badge/Mastodon-%40captainhook-purple.svg)](https://phpc.social/@captainhook)\n\n\n# CaptainHook\n\n\u003cimg src=\"https://captainhook-git.github.io/captainhook-bin/gfx/ch.png\" alt=\"CaptainHook logo\" align=\"right\" width=\"200\"/\u003e\n\n*CaptainHook* is an easy to use and very flexible git hook manager for software developers.\nIt enables you to configure your git hook actions in a simple json file and easily share them within your team.\n\nYou can use *CaptainHook* to validate or prepare your commit messages, ensure code quality\nor run unit tests before you commit or push changes to git. You can automatically clear\nlocal caches or install the correct dependencies after pulling the latest changes.\n\nYou can run your own commands or use loads of built-in functionality.\nFor more information have a look at the [documentation](https://go.captainhook.info/ \"CaptainHook Documentation\").\n\n## Installation\n\nYou can download the application binary for your platform from the [release page](https://github.com/captainhook-git/captainhook-bin/releases/latest \"Latest CaptainHook Release\").\nOr use one of the following options.\n\nUse `Homebrew` to install *CaptainHook*.\n```bash\nbrew tap captainhook-git/captainhook\nbrew install captainhook\n```\nUse `go install` to install *CaptainHook*.\n```bash\ngo install github.com/captainhook-git/captainhook-bin/cmd/captainhook@latest\n```\n\n\n## Setup\n\nAfter installing CaptainHook, navigate to your project directory and use the *captainhook* init command to create a configuration file.\n```bash\ncd my-project-repo\ncaptainhook init\n```\n\nAs soon as you have a configuration file the only thing left is to activate the hooks by installing them to\nyour local `.git/hooks` directory. To do so just run the following *captainhook* command.\n```bash\ncaptainhook install\n```\n\n## Configuration\n\nHere's an example *captainhook.json* configuration file.\n```json\n{\n  \"hooks\": {\n    \"commit-msg\": {\n      \"actions\": [\n        {\n          \"run\": \"CaptainHook.Message.MustFollowBeamsRules\"\n        }\n      ]\n    },\n    \"pre-commit\": {\n      \"actions\": [\n        {\n          \"run\": \"unittest\"\n        }\n       ]\n    },\n    \"pre-push\": {\n      \"actions\": [\n        {\n          \"run\": \"CaptainHook.Branch.PreventPushOfFixupAndSquashCommits\",\n          \"options\": {\n            \"branches-to-protect\": [\"main\", \"integration\"]\n          }\n        }\n      ]\n    }\n  }\n}\n```\n\n## Contributing\n\nSo you'd like to contribute to `CaptainHook`? Excellent! Thank you very much.\nI can absolutely use your help.\n\nHave a look at the [contribution guidelines](CONTRIBUTING.md).","funding_links":["https://github.com/sponsors/sebastianfeldmann"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptainhook-git%2Fcaptainhook-bin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptainhook-git%2Fcaptainhook-bin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptainhook-git%2Fcaptainhook-bin/lists"}