MCPcopy Index your code
hub / github.com/automation-co/husky

github.com/automation-co/husky @v0.2.17

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.17 ↗ · + Follow
30 symbols 88 edges 11 files 23 documented · 77%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

logo

Husky

Build Status Release GitHub go.mod Go version Go Report Card GitHub GitHub issues

Make githooks easy!

Inspired from the husky.js


Husky - Git hooks made easy on go | Product Hunt

Docs

Installation

go install github.com/automation-co/husky@latest

Getting Started

Warning: All husky commands are potentially destructive, they will delete all files in .git/hooks and recreate them from .husky/hooks. If you already have custom hooks in .git/hooks, make sure to create a backup of the hooks before starting to use husky.

You can initialise husky by $ husky init

Make sure you have git initialised

This will make the .husky folder with the hooks folder and a sample pre-commit hook

You can add hooks using

$ husky add <hook> "
  <your commands for that hook>
"

Example

$ husky add pre-commit "
  go build -v ./... 
  go test -v ./...
"

If you have made any other changes in the hooks you can apply them by using $ husky install


Blogs and Resources


Get Familiar with Git Hooks

Learn more about git hooks from these useful resources: - Customizing Git - Git Hooks - Atlassian Blog on Git Hooks - Fei's Blog | Get Started with Git Hooks


Other Alternatives

If you feel husky does not fulfill your needs you can also check out: - https://github.com/typicode/husky - https://pre-commit.com/


Developed by @automation-co

Core symbols most depended-on inside this repo

renderHuskyDir
called by 4
internal/lib/utils.go
exitOnError
called by 4
cmd/util.go
renderWorktreeRoot
called by 3
internal/lib/utils.go
renderHuskyHooksDir
called by 3
internal/lib/utils.go
Install
called by 3
internal/lib/install.go
Init
called by 1
internal/lib/init.go
contains
called by 1
internal/lib/utils.go
isValidHook
called by 1
internal/lib/utils.go

Shape

Function 30

Languages

Go100%

Modules by API surface

internal/lib/lib_test.go14 symbols
internal/lib/utils.go6 symbols
cmd/root.go2 symbols
main.go1 symbols
internal/lib/install.go1 symbols
internal/lib/init.go1 symbols
internal/lib/add.go1 symbols
cmd/util.go1 symbols
cmd/install.go1 symbols
cmd/init.go1 symbols
cmd/add.go1 symbols

For agents

$ claude mcp add husky \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact