This week's tip of the week is hk.
I've always found Git hooks useful, but I think they matter even more now that agents are writing and changing more of our code.
The more code our tools generate, the more valuable it is to automatically catch formatting issues, lint errors, broken tests, or even leaked secrets before they become commits.
The problem is that slow Git hooks are easy to resent.
You make a commit, stare at your terminal while formatting runs, then linting, then tests... and before long git commit --no-verify starts looking very tempting.
That's where hk comes in.
hk is a Git hook manager that can run independent checks like formatting, linting, and type checking in parallel when it's safe to do so, while still making sure dependent steps happen in the right order.
hk supports several installation methods across macOS, Linux, and Windows. Check out the installation docs for your platform.
Once it's installed, add its Git hooks to your repository:
hk installI've spent a lot of time in the JavaScript and TypeScript ecosystems, so I've generally used Git hook tooling distributed as npm packages. But Git hooks are really repository infrastructure. The repository might contain Go, Rust, Python, JavaScript, or all of the above.
If you're happy with tools like Husky, lint-staged, or maybe Vite+'s hooks support, there's no urgent reason to switch. But if your hooks are starting to feel slow, or you're working across multiple languages, hk is well worth a look.
Give it a go and let me know what you think.
That's it! Short and sweet. Until the next one!

