Keep your tools busy.
Read/write locks coordinate overlapping steps. Diff and file-list checks let hk narrow the work that needs an exclusive lock.
How execution works →
Git hooks · linting · formatting
hk runs your linters and formatters together, coordinating access to each file so fixes don’t overwrite one another.
mise use hkInstall with mise, or choose another installation method. All options →
local linters = new Mapping<String, Step> {
["prettier"] = Builtins.prettier
["eslint"] = Builtins.eslint
["ruff"] = Builtins.ruff
}
hooks {
["pre-commit"] {
fix = true
stash = "git"
steps = linters
}
["check"] { steps = linters }
}Independent files, concurrent work
app.tsmain.pyReads can overlap. Writes wait for access to the same file.
Read/write locks coordinate overlapping steps. Diff and file-list checks let hk narrow the work that needs an exclusive lock.
How execution works →Stash unstaged work before fixing the staged version of a file, then restore it after the hook finishes.
Understand stashing →Start with built-in configurations or write a shell command. Use mise or your existing package manager to provide the tools.
Browse builtins →From your editor to CI
Define your steps once in Pkl. Reuse them when you check a change, fix your working tree, or validate the whole repository.
Learn the workflow →hk checkhk fixhk check --allhk check --plan