Skip to content

About hk ​

hk is a Git hook manager and project linting tool built by @jdx. It is written in Rust and released under the MIT license.

Why it exists ​

Git hooks sit directly in the path of a commit. Their speed matters, but running formatters concurrently introduces a coordination problem: two tools can read the same file and then overwrite one another’s changes.

hk uses read/write file locks to coordinate those tools. Checks can share read access; fixes take exclusive access to the files they modify. Builtins expose tool features such as diff output and lists of files needing changes, which help hk keep more work running concurrently.

Why hk? explains the execution model and its tradeoffs.

Where it fits ​

hk decides which checks to run, on which files, and when. Linters still own their rules and configuration. Your package manager provides their executables; mise can manage those versions and the environment used by Git.

Configuration uses Pkl for types, imports, and reusable step definitions. The default evaluator is included in hk.

Get involved ​

Report bugs in GitHub issues, discuss ideas in GitHub Discussions or Discord, and read the contributing guide before starting a larger change.

For something less technical, there is also a sea shanty.

MIT LicenseCopyright © 2026jdx.dev