Parallel execution
Read/write locks coordinate overlapping steps. Diff and file-list checks let hk narrow the work that needs an exclusive lock.
How execution works →Configure your checks once and run them before commits, while you work, or in CI. hk runs independent steps in parallel and coordinates changes to shared files.
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.pyChecks can read a file concurrently; fixes wait for exclusive access.
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 →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