hk Updates & Release Notes
62 updates curated from 1 source by the Releasebot Team. Last updated: Nov 30, 2026
- Nov 30, 2026
- Date parsed from source:Nov 30, 2026
- First seen by Releasebot:Nov 30, 2026
- Modified by Releasebot:Dec 1, 2026
v2.15.0: hk: config imports, CI annotations, per-hook jobs, and nine new builtins
hk releases a broad update with offline module imports, native GitHub and GitLab reporting, per-hook controls, and easier tool setup. It adds built-in checks across more languages and file types while improving Git push validation, read-only runs, and Windows compatibility.
hk 2.15.0 lets hk.pkl import hk's own modules through hk: URIs, so configs no longer need a version bump on every upgrade. hk check can now report findings as GitHub Actions annotations and GitLab Code Quality reports, and hooks can set their own jobs and hide_when_done. Each run writes per-step output files for agents and CI, and hk init --mise installs the detected linters. This release adds builtins for C#, C/C++, Clojure, Kotlin, Snakemake, API specs, reStructuredText, Python security and GitHub's Actions lockfile. It also fixes pre-push runs that update several refs, index locking during read-only runs, and Windows batching through pnpm exec/npx.
Added
hk: module URIs (#1912)
Configs can import the modules of the hk that evaluates them, so you no longer bump a versioned package:// URL on each upgrade. hk serves these modules from its own binary, so they work offline and never download anything. hk init, hk migrate pre-commit, the examples and the docs now generate this form:
amends "hk:/Config.pkl" import "hk:/Builtins.pkl"Single builtins are available as hk:/builtins/.pkl. package:// URLs keep working, and they remain the option for pkl-lsp (0.9.0 and earlier can't resolve hk:), for plain pkl without hk, and for shared packages that should pin one schema. The plain pkl CLI can resolve hk: through the new hk read command, an external module reader: run pkl eval --external-module-reader 'hk=hk read' hk.pkl, or register hk read under evaluatorSettings.externalModuleReaders in a PklProject.
CI-native reporting (#1938)
hk check, hk fix and hk run accept two new flags:
- --github-annotations prints a workflow command for each finding, so GitHub shows it inline on the pull request. Annotations don't need GitHub Advanced Security. A failed step with no parsed findings gets one ::error with its output, and so does a run that fails before its hook starts. When GITHUB_STEP_SUMMARY is set, hk also appends a Markdown job summary with each step's status, duration and findings. With --format json/jsonl, annotations go to stderr.
- --gitlab-code-quality PATH writes a Code Quality report for the merge request widget. Fingerprints don't include line numbers, so moving code doesn't make a finding look new.
- run: hk check --all --github-annotations
Findings come from steps that set diagnostic_format, the same source as --sarif. Absolute paths inside the repository are made repository-relative. A run that fails before its hook starts now also writes the requested --sarif and --junit-xml reports. The CI docs now cover jdx/hk-action, which installs a pinned hk and passes --github-annotations when the installed hk supports it (#1941).
Per-hook jobs and hide_when_done (#1933)
A hook can limit how many of its steps run at once, or hide each step's output after it succeeds:
hooks { ["pre-commit"] { jobs = 2; steps = linters } ["post-checkout"] { hide_when_done = true; steps = linters } }A hook's value overrides the top-level hk.pkl setting. hk.jobs git config, HK_JOBS/HK_HIDE_WHEN_DONE and --jobs still override it. hk validate now warns when a hook's env sets an hk setting such as HK_JOBS, because that env only reaches the step commands and hk never reads it.
One output file per step (#1943)
Each hook run also writes every step's output summary to .log in HK_OUTPUT_DIR, which defaults to /hk/output/. An agent or CI job can read one step's output without loading the whole run. Step names are percent-encoded in the file names, for example lint/js becomes lint%2Fjs.log. Each run deletes .log files left by earlier runs, and overlapping runs take a lock, so the directory never mixes output from two runs.
hk init --mise adds the linters' tools (#1939)
Along with hk, the generated mise.toml now lists each detected or selected builtin's tools at latest, so mise install installs everything the hooks need. Tools already in mise.toml stay as they are, even under another backend (for example aqua:astral-sh/ruff counts as ruff). Language runtimes such as node, python or rust are never added; hk prints the mise use command for them instead. When a builtin step fails because its tool isn't installed, hk now ends the run with a hint such as mise use prettier shfmt shellharden.
New builtins
- gh_actions_lock checks that .github/workflows/actions.lock pins every action your workflows use. The check runs offline. The fix calls the GitHub API only when pins are missing, using GH_TOKEN/GITHUB_TOKEN when set (#1922).
- csharpier formats C# and MSBuild files one file at a time, without a restore or build (#1958).
- roslynator runs Roslynator's analyze/fix on the changed .cs files of a project or solution. It needs the Roslynator.Analyzers package in the project and runs dotnet restore first (#1957).
- cppcheck runs the C/C++ static analyzer. clang_format, cpp_lint and cppcheck now share a "C/C++" category in the catalogue and the hk init picker (#1954).
- clj_kondo lints Clojure, ClojureScript, EDN and babashka files, and cljstyle checks and fixes Clojure formatting (#1930).
- detekt runs the detekt 1.x Kotlin analyzer and picks up detekt.yml or config/detekt/detekt.yml on top of the default rules. It is skipped on Windows (#1932).
- snakefmt formats Snakemake files, and snakemake runs snakemake --lint once per workflow (#1956).
- spectral lints OpenAPI, Swagger, AsyncAPI and Arazzo files. Without a project ruleset, it uses a default one. It is skipped on Windows (#1955).
- bandit runs the Python security linter and reads [tool.bandit] in pyproject.toml or a .bandit file (#1931).
- rstcheck checks reStructuredText files, including the code inside their code blocks (#1929).
All of these except csharpier, cljstyle and snakefmt set diagnostic_format = "gcc", so their findings appear in --sarif, --json and the new CI reports. roslynator doesn't: its output isn't in a format hk parses.
Fixed
- Pre-push with several refs (#1924, reported by @Gerry9000 in #1910). When one git push updated several refs, hk selected files from only the first ref, so commands such as git push origin feat-a feat-b or git push origin :old feat-b could push files that were never checked. hk now checks the files changed across every ref the push updates, and skips deletions. A step with requires_ref_range = true (such as gitleaks with scan = "commits") now fails on a multi-ref push and asks you to push the refs one at a time, instead of scanning only the first range. {{from_ref}}/{{to_ref}} hold the first range.
- hk run pre-push --from-ref X --to-ref Y no longer waits on an open stdin (#1923, reported by @dev1952 in #1909). When both refs are given, hk doesn't read stdin, and hook_stdin is empty. Hooks run by git push are unaffected.
- Read-only runs no longer lock or rewrite .git/index (#1928, reported by @Gerry9000 in #1911). hk check and hooks that don't stash or stage now read status with GIT_OPTIONAL_LOCKS=0, so they no longer collide with a git add or git commit running in the same worktree.
- output.log covers the whole run (#1940). HK_OUTPUT_FILE (default /hk/output.log) now holds every step's output summary from the latest hook run, with each step's status and no ANSI codes. Before, it held only the single failure that ended the run. Each run replaces the file, passing runs included. The file is removed when no step produced output.
- Windows batching through package managers (#1935, reported by @hcoona in #1919). Commands that start with npm, npx, pnpm, pnpx or yarn (including native .exe installs) are now split into batches that fit cmd.exe's 8191-character limit. Before, large runs failed with The command line is too long.
- check_added_large_files skips Git LFS files (#1934, reported by @CallumKerson in #1920). Files with filter=lfs are no longer reported, which matches pre-commit's behavior.
- hadolint matches more Dockerfile names (#1953). It now lints *.Dockerfile, lowercase dockerfile names and Podman/Buildah Containerfile variants. It no longer passes files in directories named like Dockerfiles.d/, or *.dockerignore files.
- Config cache with optional imports (#1946, reported by @pawelad in #1945). hk now reloads the config when the file named by an optional import without a wildcard, such as import* "extra.pkl", is created or deleted.
Full Changelog: v2.14.0...v2.15.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Nov 23, 2026
- Date parsed from source:Nov 23, 2026
- First seen by Releasebot:Nov 24, 2026
- Modified by Releasebot:Nov 25, 2026
v2.14.0: Secret scanning across pushed commits, recheck_after_fix, and new builtins
hk releases 2.14.0 with secret scanning across every pushed commit, optional checks after fixes, and new built-in tools for formatting, sorting, spelling, and validation. It also improves stash recovery, mise launchers, and formatter handling.
hk 2.14.0 lets secret scanners check every commit in a push. It adds an opt-in
recheck_after_fixsetting so a check runs again when a later fixer changes its files, and it adds thebun_fmt,keep_sorted,cspell,cspell_commit_messageandhk_validatebuiltins. It also fixes bugs in stash handling,--miselaunchers and stdin formatters.Added
Scan every pushed commit for secrets (#1880, @jdx). Before, a scanner on pre-push only checked the final state of the files. A credential added in one commit and removed in a later one passed, even though the push still sent the first commit. gitleaks, betterleaks, trufflehog and kingfisher now accept
scan = "commits", which scans each commit in the run's ref range (pre-push,--from-refor--pr):hooks { ["pre-push"] { steps { ["gitleaks"] = (Builtins.gitleaks) { scan = "commits" } } } }The default scan for each builtin is unchanged. This change also adds a
requires_ref_rangestep field. When a step sets it and the run has no ref range, the step fails with an error such asgitleaks: needs a ref range (pre-push, --from-ref, or --pr)instead of scanning nothing and passing. Step tests can now setfrom_refandto_ref.scan = "staged"for betterleaks (#1878, @jdx). This option works like the one on gitleaks. It runsbetterleaks git --pre-commit --stagedon the index, so a partially staged file is checked as it will be committed. It ignores hk's file selection, so use it in pre-commit rather than withhk check --all. The default (scan = "files") is unchanged.recheck_after_fixsetting (#1891, @jdx). Steps in a fix run (hk fix, or a pre-commit hook withfix = true) run in parallel. A check could pass on a file before another step's fixer rewrote it, and nothing checked the new contents. With this setting on, hk runs such a check again after all steps finish if a fixer changed the contents of a file the check had passed on. The run fails if the new contents no longer pass. Turn it on with any of these:recheck_after_fix = truein hk.pkl or ~/.hkrc.pklHK_RECHECK_AFTER_FIX=1git config hk.recheckAfterFix true
The setting is off by default because it adds file reads to every fix run. Each check runs at most once more, and the second runs keep the original group order, depends and exclusive. Steps with
check_firstare not rerun. hk check is unaffected.New builtins:
bun_fmtruns Bun's built-in formatter for hk check, hk fix and hk check --diff. It passes--no-scriptso a fmt script in package.json can't replace the formatter. hk detects it from bunfig.toml, bun.lock or bun.lockb (#1870, @jdx).keep_sortedchecks and sorts the lines between keep-sorted start and keep-sorted end markers (#1898, @jdx).cspellspell-checks text files and follows the project's cspell config. It has no fixer (#1898, @jdx).cspell_commit_messagespell-checks the message in a commit-msg hook. It skips git's comment lines and, with git commit --verbose, the diff below the scissors line (#1898, @jdx).hk_validateruns hk validate --deny-warnings when hk.pkl or .config/hk.pkl changes, so config warnings fail the hook (#1862, @jdx).
hooks { ["pre-commit"] { fix = true steps { ["keep-sorted"] = Builtins.keep_sorted ["cspell"] = Builtins.cspell ["hk_validate"] = Builtins.hk_validate } } ["commit-msg"] { steps { ["cspell"] = Builtins.cspell_commit_message } } }Changed
ox_lintreports diagnostics (#1871, @jdx). The check command now runsoxlint --deny-warnings --format sarif, so oxlint findings appear in hk check --sarif and JSON output. As a result, a failing ox_lint check now prints SARIF JSON instead of oxlint's human-readable report. fix is unchanged.to_refdefaults to HEAD (#1880, @jdx). When only--from-refis given,{{to_ref}}andHK_TO_REFare now HEAD instead of empty.Fixed
Stash recovery no longer stalls behind a nested hk (#1852, @jdx). After an interrupted run, recovering a stash that contained untracked files triggered post-checkout. If post-checkout ran hk, that second hk waited on the stash lock until HK_STASH_LOCK_TIMEOUT (300 s by default) before the commit could go through. The nested hk now skips its own recovery check.
Stash restore no longer starts a nested hk (#1869, @jdx). With
stash = "git", restoring an untracked file ran post-checkout, which started a second hk inside the stash window. hk now setsHK=0for that restore. Hooks that aren't managed by hk still run.Intent-to-add files stay out of commits with
stash = "none"(#1884, @jdx). With the default libgit2 backend, files marked with git add -N were treated as staged. Steps received them in{{files}}, and changes a fixer made to them were committed. hk now leaves them out, as git does and as hk already did withstash = "git"or HK_LIBGIT2=0.--miselaunchers work without mise on PATH. Git clients that start with a minimal PATH, such as GUIs, IDEs and agent shells, could fail withmise: command not found:- The global hk install --global --mise launcher now adds mise's directory to the end of PATH, so steps that call mise run ... work (#1875, @jdx).
- The per-repo hk install --mise launcher now records mise's absolute path at install time and adds the same PATH entry, for both config hooks and --legacy shims (#1883, @jdx). Run hk install --mise again to update existing hooks. mise must be on PATH while you run the install.
Empty files stay empty with stdin formatters (#1874, @jdx). hk fix with tofu (and other builtins that format through hk util format-diff, such as terraform) wrote a newline into intentionally empty files. hk now treats an empty file as unchanged when the formatter outputs only whitespace for it.
GIT_WORK_TREEis set only for steps with dir (#1889, @jdx). Before, every hook step received GIT_WORK_TREE. A step that ran git init elsewhere could then write core.worktree into the repository's config. In a linked worktree, that config is shared, so the main checkout was silently repointed. Steps without dir now see the same environment as a plain git hook. The new "Git environment variables in steps" docs section covers the remaining GIT_DIR pitfall.Security
Updated the url crate to 2.5.9 to address RUSTSEC-2026-0592 (#1893, @jdx).
Full Changelog: v2.13.0...v2.14.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source All of your release notes in one feed
Join Releasebot and get updates from jdx and hundreds of other software products.
- Nov 16, 2026
- Date parsed from source:Nov 16, 2026
- First seen by Releasebot:Nov 17, 2026
- Modified by Releasebot:Nov 17, 2026
v2.13.0: Opt-in step result caching and ref range access for steps
hk releases 2.13.0 with cached checks that skip unchanged files and ref-range values available to steps. It also fixes Windows Terraform validation and Python detection for uv scripts, and updates its Pkl evaluator for closer compatibility with Apple Pkl.
hk 2.13.0 adds two step features. With cache = true, a check that already passed is skipped when its input files haven't changed. Steps can also read the --from-ref/--to-ref range. This release also fixes terraform_validate/tofu_validate on Windows and Python detection for uv run --script scripts.
Added
Skip checks that already passed on the same file contents (#1835, @jdx). Set cache = true on a step. If its check exited 0 before and the same check runs again on the same file contents, hk skips the command and shows "passed before, unchanged". This helps when pre-commit reruns checks that hk check just passed. If a step reads more than the files it was given, such as a workspace-wide build or cargo clippy, list those inputs in cache_inputs. Those globs replace the job's file list in the cache key:
["clippy"] { glob = "*.rs" check = "cargo clippy --workspace -- -D warnings" cache = true cache_inputs = List("**/*.rs", "**/Cargo.toml", "Cargo.lock", "mise.toml") }The cache key includes:
- the hk version and step name
- the rendered command
- the working directory
- the step's env, shell and stdin
- the contents of each input file
Modification times are not part of the key, so touching a file does not trigger a rerun, but editing it does. Tool versions are not in the key either. To rerun when a tool version changes, add the file that pins it (for example mise.toml) to cache_inputs. Without cache_inputs, only set cache on a command that reads nothing but its own files. hk check and pre-commit share a cache entry only when they select the same files and render the same command.
hk never skips fix commands, interactive steps or failed checks. Caching is off by default. Entries are stored in HK_CACHE_DIR/results. Entries unused for 14 days are deleted, and at most 2000 are kept. Set HK_CACHE=0 to turn the cache off.
Ref range available to steps (#1830, @jdx). Steps can now read the range that hk used to select files. It is available as the template variables {{from_ref}} / {{to_ref}}, which also work in condition expressions, and as the environment variables HK_FROM_REF / HK_TO_REF. The values come from --from-ref, --to-ref, --pr or the pre-push hook. They are empty when there is no range, as in a plain pre-commit, and a step's own env can override them. This lets tools that need a base commit share hk's range, so you no longer pass the ref twice:
["eslint"] { glob = "*.js" check = "eslint {{files}}" env { ["ESLINT_PLUGIN_DIFF_COMMIT"] = "{{from_ref}}" } }hk passes the refs exactly as given, without resolving them to a SHA or merge base. hk itself diffs from the merge base, so a tool given the raw from_ref may compare against a different base than hk used. Because HK_FROM_REF and HK_TO_REF are always set, steps that list them as required no longer get skipped.
Fixed
terraform_validate and tofu_validate on Windows (#1839, @jdx). On Windows, both builtins failed before running with f was unexpected at this time. Because their POSIX shell pipeline ran through cmd.exe. They now set
shell = "sh -o errexit -c". On Windows, this needs a POSIX sh with dirname and sort on PATH, such as the one from Git for Windows. Linux and macOS are unaffected.uv run --script scripts detected as Python (#1847, @jdx). Extensionless scripts with a shebang like #!/usr/bin/env -S uv run --script (or -s, including forms with extra uv options) now get the python file type. Before, steps using
types = List("python")skipped these scripts. uv shebangs without --script, such as uv run or uv tool run, still get no language tag. Arguments passed through env -S are now read correctly, including quoted and escaped ones.Changed
Pkl evaluator updated to pklr 6 (#1850). hk's built-in Pkl evaluator now behaves more like Apple Pkl. Configs that pklr 5 accepted but Pkl rejects, such as type constraint violations or undeclared properties in amending modules, may now fail to evaluate.
Full Changelog: v2.12.0...v2.13.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Nov 9, 2026
- Date parsed from source:Nov 9, 2026
- First seen by Releasebot:Nov 10, 2026
v2.12.0: Restrict conventional commit scopes
hk releases version 2.12.0 with scope restrictions for conventional commit checks and fixes for clearer signal errors, legacy hook installation, and stash restoration across linked worktrees.
hk 2.12.0 lets the
check_conventional_commitbuiltin restrict which scopes a commit can use. It also fixes three bugs: misleading errors when a run is stopped by SIGTERM or SIGHUP, missing hooks afterhk install --legacyon top of a global install, and stash restore failures caused by another linked worktree.Added
Allowed scopes for conventional commits (#1817, @jonahsnider)
Set
allowed_scopesoncheck_conventional_committo limit which scopes commit messages can use:["conventional-commit"] = (Builtins.check_conventional_commit) { allowed_scopes = List("web", "api") }Commits without a scope are always accepted. A commit with any other scope is rejected, and the error lists the allowed scopes. If you omit
allowed_scopes, any scope is accepted. To accept only commits without a scope, setallowed_scopes = List(). Each list entry must hold one scope, with no commas. The same option is available directly ashk util check-conventional-commit --allowed-scopes web,api.Fixed
Clearer message when a run is stopped by SIGTERM or SIGHUP (#1814, @jdx)
When an external signal stopped hk, such as a job supervisor's deadline, the hook error named whichever step was running with "command was cancelled". That made the step look like it had failed. hk now names the signal instead, for example stopped by SIGTERM before the run finished (no step failed); exit 143. Exit codes are unchanged (143 for SIGTERM, 129 for SIGHUP). Ctrl-C output and real step failures are also unchanged.
hk install --legacy after a global install (#1828, @jdx)
If
hk install --globalhad already written hook.hk-* entries,hk install --legacyprinted "skipping local install" and wrote nothing. Git versions older than 2.54 don't read config-based hooks, so commits there ran with no hook and no error. With--legacy, hk now installs the .git/hooks/ shims even when a global install exists. Plainhk installdoes the same when the git on PATH is older than 2.54. On git 2.54+, having both global hooks and shims makes hk run twice per event. Without--legacy, git 2.54+ still skips the local install, and--force-localstill overrides the skip.Stash restore across linked worktrees (#1827, @jdx)
With
stash = "git", a commit could fail at the restore step with bad revision 'refs/stash' and failed to restore stash. This happened when another linked worktree emptied the shared stash stack while the hook ran. No work was lost, but unstaged and untracked changes stayed stashed until you recovered them by hand. hk now looks up its entry on its private refrefs/hk/stash/<commit>first, so races on the shared stack no longer affect those entries. Entries that older hk versions pushed to the shared stack can still hit the race.New Contributors
- @jonahsnider made their first contribution in #1817
Full Changelog: v2.11.1...v2.12.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Nov 3, 2026
- Date parsed from source:Nov 3, 2026
- First seen by Releasebot:Nov 4, 2026
v2.11.1: Fix stash restore under git --literal-pathspecs
hk releases version 2.11.1 with a fix for pre-commit hooks that failed to restore stashed files or stage fixes when Git literal pathspecs were enabled. The update isolates hkβs Git commands while preserving the environment passed to hook steps.
hk 2.11.1 fixes pre-commit hooks that failed to restore stashed files when git ran with
--literal-pathspecs(orGIT_LITERAL_PATHSPECS=1).Fixed
Stash restore under GIT_LITERAL_PATHSPECS (#1796, @jdx)
Running
git --literal-pathspecs commitsetsGIT_LITERAL_PATHSPECS=1for every child process, including hooks. Some tools pass this flag on every git call. Under that variable, git read hk's:(literal)PATHpathspecs as part of the file name. As a result, hk couldn't restore a stashed untracked file or git add fixed files, and the commit failed with errors like:git error: pathspec ':(literal)src/affected/cargo.rs' did not match any file(s) known to git hk ERROR pre-commit: hook finished with error: failed to restore stashhk's own git commands now run with
GIT_LITERAL_PATHSPECS,GIT_GLOB_PATHSPECS,GIT_NOGLOB_PATHSPECSandGIT_ICASE_PATHSPECSset to 0, so git reads its pathspecs as hk wrote them. Steps still get the environment the caller set. Plain git commit was not affected.Full Changelog: v2.11.0...v2.11.1
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source Similar to hk with recent updates:
- Claude Code updates500 release notes Β· Latest Dec 4, 2026
- Claude updates210 release notes Β· Latest Dec 2, 2026
- Firefox updates54 release notes Β· Latest Dec 2, 2026
- Safari updates26 release notes Β· Latest Nov 3, 2026
- iOS updates28 release notes Β· Latest Nov 4, 2026
- macOS updates28 release notes Β· Latest Nov 4, 2026
- Nov 1, 2026
- Date parsed from source:Nov 1, 2026
- First seen by Releasebot:Nov 3, 2026
v2.11.0: Structured diagnostics from clippy, ruff, eslint, tsc, shellcheck and more builtins
hk releases 2.11.0 with structured diagnostics across more built-in tools, clearer installation guidance and fixes for pre-commit checks involving unstaged deletions. It also updates a build dependency to address a security advisory.
In hk 2.11.0, many more builtins report structured diagnostics (file, line, column, rule and message), so --sarif, JSON output and the MCP dashboard now show them. It also fixes pre-commit checks that ran while a file deleted from the worktree was still staged in the index.
Added
Diagnostics for more builtins (#1791, @jdx). Before this release, hk check --sarif, the diagnostics arrays in --format json/jsonl and the MCP dashboard were empty for many popular builtins. You got a failed step and a block of raw text. hk now parses the output these tools print by default, without changing any builtin's command:
diagnostic_format builtins rustc cargo_clippy, cargo_check, ruff (0.12+), ty rustfmt rustfmt, cargo_fmt (diff hunks reported as warnings) stylish eslint, stylelint tsc tsc, tsserver shellcheck shellcheck pyright pyright biome biome gcc-paren golangci_lint, staticcheck$ hk check --all --format json | jq -c '.steps[].diagnostics[]' {"step":"cargo_clippy","tool":"cargo_clippy","severity":"warning","message":"length comparison to zero","path":"src/main.rs","range":{"start":{"line":4,"column":8}},"rule":"clippy::len_zero","help_url":"https://rust-lang.github.io/rust-clippy/beta/index.html#len_zero"}You can also set these formats on your own steps with diagnostic_format. Before parsing, hk strips terminal colour codes. Lines it doesn't recognise appear as parse_warnings only when hk finds no diagnostics in the output, so tool crashes and configuration errors still show up. Ruff versions before 0.12 use an older output format, so their findings appear as a parse warning. yamllint still has no default format because its output changes under GitHub Actions. Outside Actions, you can set diagnostic_format = "stylish" on a yamllint step yourself.
Install instructions in the builtins docs (#1785, @jdx). Each builtin that needs an external tool now has an Install line on the built-in linters page, such as mise use shfmt or mise use npm:eslint. Tools that mise doesn't provide link to their project page instead.
Fixed
Unstaged deletions with stash = "git" (#1789, @jdx). If you deleted a tracked file from the worktree but didn't stage the deletion, the file stayed missing while pre-commit checks ran, even though the commit would include it. As a result, checks could fail on a valid commit, or skip a file because it looked absent. hk now puts back the indexed version of the file while the hook runs, then deletes it again afterwards, still unstaged. If a step stages the deletion itself, hk removes the file afterwards. If the step also writes new contents to that path, hk keeps them, reports the path as not restored and keeps the stash entry.
Build-time security advisory (#1793, @jdx). libz-sys is updated to 1.1.31 to fix RUSTSEC-2026-0418. In 1.1.30, the build script printed the full build environment, which could leak secrets into target/ caches when building hk from source.
Full Changelog: v2.10.0...v2.11.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 29, 2026
- Date parsed from source:Oct 29, 2026
- First seen by Releasebot:Oct 30, 2026
v2.10.0: Hook timeouts and six new builtins
hk 2.10.0 adds hook-level timeouts and six built-in tools for secret scanning, vulnerability checks, type checking and linting. It also clarifies malformed pre-push input, helping teams catch issues and keep commits running smoothly.
hk 2.10.0 adds a hook-level timeout that fails a hook when it runs too long. It also adds six builtins: trufflehog, osv-scanner, pyright, phpstan, protolint and dotenv-linter.
Added
Hook timeout (#1776, @jdx)
Set timeout on a hook to cap how long it can run in total. The limit covers all of the hook's steps, including time spent waiting for the stash lock. When the time runs out, hk stops the running steps the way Ctrl-C does, restores any stashed changes, and fails the hook with pre-commit: timed out after 10s, so the commit or push is blocked.
hooks { ["pre-commit"] { fix = true timeout = "10s" steps = linters } }A value is a number followed by a unit (ms, s, m or h). You can combine units, as in "1m30s". hk rejects a bare number, zero or an unknown unit when it loads the config. If you don't set timeout, a hook runs until its steps finish, as before. The setting applies only to whole hooks: there is no per-step or global timeout. As with other hook-level settings, hk ignores it in subproject configs.
New builtins (all by @illesnagy1)
- trufflehog (#1774) scans text files for secrets. It runs offline with --no-verification, so it does not contact providers to check whether a credential it finds is live. Add a trufflehog:ignore comment to suppress a finding.
- osv_scanner (#1782) checks dependency lockfiles and manifests for known vulnerabilities using the OSV database. It covers files such as Cargo.lock, package-lock.json, pnpm-lock.yaml, uv.lock, go.mod and Gemfile.lock, and it reads osv-scanner.toml for ignores. The scanner queries api.osv.dev, so it needs network access. It only checks and has no fix mode.
- pyright (#1775) type-checks *.py, *.pyi and *.pyw files.
- phpstan (#1778) runs static analysis on *.php files.
- protolint (#1777) lints and fixes *.proto files.
- dotenv_linter (#1779) lints and fixes .env, .env.* and *.env files. Fixes don't leave .bak files behind.
hk init detects some of these tools from your project files: osv-scanner.toml; pyrightconfig.json or a [tool.pyright] table in pyproject.toml; phpstan.neon, phpstan.neon.dist, phpstan.dist.neon or a composer.json that mentions phpstan; and .protolint.yaml, .protolint.yml, protolint.yaml or protolint.yml.
Changed
Pre-push explains the expected stdin format (#1781, @connormharris)
Before, a malformed line on pre-push stdin only got a per-line warning. hk now also prints the expected format once: <local ref> <local SHA> <remote ref> <remote SHA>, with full-length SHAs. Valid lines are still processed.
Full Changelog: v2.9.0...v2.10.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 26, 2026
- Date parsed from source:Oct 26, 2026
- First seen by Releasebot:Oct 27, 2026
v2.9.0: OpenTofu validation builtin and shfmt formatting for zsh startup files
hk releases 2.9.0 with OpenTofu validation, expanded zsh formatting support, and improved Terraform documentation coverage. The release also restores installation through cargo install hk, making the crate available on crates.io again.
hk 2.9.0 adds a
tofu_validatebuiltin for OpenTofu, and theshfmtbuiltin now formats zsh startup files and scripts that have a zsh shebang. It is also the first release since 2.7 that installs withcargo install hk, because the 2.8.2 crate was never published.Added
tofu_validatebuiltin (#1766, @illesnagy1)This builtin runs
tofu validateonce in each directory that contains changed*.tf,*.tfvars,*.tf.json,*.tofu,*.tofu.jsonor.terraform.lock.hclfiles. It skips anything under.terraform/. If validation fails on a module that hasn't been initialized, it runstofu init -backend=false -input=falseand validates again. The builtin is a POSIX shell script, so on Windows you need to set shell to a POSIX shell.hooks { ["pre-commit"] { steps { ["tofu_validate"] = Builtins.tofu_validate } } }shfmtformats zsh startup files and zsh-shebang scripts (#1759, @sahidvelji)hk now gives the zsh and shell types to
.zshenv,.zprofile,.zshrc,.zloginand.zlogoutbased on their filenames. It does the same for those names without the leading dot (zshrc and so on), which is how many dotfiles repos store them. Theshfmtbuiltin now matches the zsh type as well as sh and bash. This means it picks up these files, plus extensionless scripts that start with#!/bin/zsh, without any extra globs. To format zsh files you need shfmt 3.13.1 or newer.These files now count as shell files. If a custom step selects
types = List("shell")and runs a tool that can't handle zsh, that step will start receiving zsh startup files.Changed
terraform_docsnow picks up*.tf.jsonmodules (#1766, @illesnagy1).Fixed
The crate is published to crates.io again (#1770, @jdx). The publish job for v2.8.2 failed, so that version never reached crates.io. 2.9.0 is published with the generated Pkl package included, so
cargo install hkbuilds work offline in the same way as the prebuilt release binaries.Full Changelog: v2.8.2...v2.9.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 26, 2026
- Date parsed from source:Oct 26, 2026
- First seen by Releasebot:Oct 27, 2026
v2.8.2: Resolve check file arguments from the current directory
hk releases 2.8.2 with corrected relative file path handling, safer cache writes when processes run concurrently, offline-ready cargo installs, and clearer reporting of the global Git config file used for hooks.
hk 2.8.2 makes
hk check <file>resolve paths from the directory you run it in, and stops hk processes that start at the same time from reading half-written config cache files.cargo install hkbuilds now include the Pkl package, so offline mode works with them, andhk install --globalreports the git config file it actually wrote to.Fixed
File arguments are resolved from the directory hk was run in (#1754, @jdx)
hk changes to the repository root before it runs, so relative file arguments used to be resolved from the root. Running
hk check a.jsinsidesub/checked<root>/a.jsinstead ofsub/a.js. Paths given as arguments or through--files0-fromare now resolved from where you ran hk. Absolute paths and paths outside the repository still work. Fixes #1753.$ cd sub $ hk check a.js # checks sub/a.js (previously <root>/a.js) $ hk check ../a.js # checks a.js at the repository root $ hk check . # checks sub/No more cache parse warnings when hk processes start at the same time (#1750, @zachbornheimer)
Several hk processes can start together, for example a pre-commit and a pre-push hook, or agents running in parallel. When that happened, one process could read a config cache entry another was still writing. It then printed
failed to parse cache file ...: EOF while parsing a valueand evaluated the config again. hk now writes each cache entry to a temporary file and renames it into place, so readers always get a complete entry. A replaced entry keeps its Unix file mode. If a write fails, the error names the entry.cargo install hkbuilds can run offline (#1755, @jdx)The crate on crates.io was published without the generated Pkl builtins, so builds from it embedded an empty Pkl package. With
HK_PKL_OFFLINE=1, they failed withpackage is not cached and offline mode is enabled, even whenhk.pklpinned the installed version. The publish step now generates the package and fails if it is missing. Starting with this release,cargo install hkembeds the package just like the prebuilt release binaries do.hk install --globalnames the git config file it wrote to (#1758, @sahidvelji)Git writes global settings to
~/.config/git/configwhen~/.gitconfigdoesn't exist, or to$GIT_CONFIG_GLOBALif that is set. hk installed the hooks in the correct file but always said~/.gitconfig. hk now asks git which file holds the hooks. Messages fromhk install --global,hk uninstall --global, skipped per-repo installs andhk install --force-localnow name that file. If git can't report one, the messages say "the global git config".New Contributors
- @zachbornheimer made their first contribution in #1750
Full Changelog: v2.8.1...v2.8.2
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 23, 2026
- Date parsed from source:Oct 23, 2026
- First seen by Releasebot:Oct 24, 2026
v2.8.1: Stash entries no longer shared across linked worktrees
hk releases 2.8.1 with safer, parallel pre-commit stashing across linked worktrees and fixes deprecation warnings in its Markdown and Nushell completions.
hk 2.8.1 stops pre-commit hooks in different linked worktrees from taking each other's stash entries, and lets those hooks run in parallel. It also removes a deprecation warning printed by the ryl_markdown builtin.
Fixed
Stashing is now separate for each linked worktree (#1747, @jdx). With stash = "git", hk used to put its entry on refs/stash, and every linked worktree shares that stack. A git stash pop, drop or push in one worktree could take hk's entry while a hook was running in another worktree. The hook then failed with "hk's stash entry β¦ is no longer in the stash list", and its unstaged and untracked changes were left in a stash that the other worktree could pop. hk now keeps its entry under a private ref, refs/hk/stash/<commit-id>, which git stash never reads or writes. hk-stash.lock now lives in each worktree's own git directory, so hooks in different worktrees run in parallel. Two hk processes in the same worktree still take turns. Entries that older hk versions pushed onto git stash can still be restored or dropped. Fixes #1746.
git stash list no longer shows hk's entries. To inspect or recover one, use its commit id:
git for-each-ref refs/hk/stash git stash show -p <commit-id> git stash apply <commit-id> git update-ref -d refs/hk/stash/<commit-id>ryl_markdown no longer prints a deprecation warning (#1741, @illesnagy1). The builtin ran bare ryl --markdown <paths>, which made ryl print bare ryl <paths> is deprecated. Like the ryl builtin, it now runs ryl check.
Nushell completions no longer print a deprecation warning on nushell 0.116 (#1749). This comes from updating usage-rs to 7.1.1, which fixes the completer generated by hk completion nu.
Full Changelog: v2.8.0...v2.8.1
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 20, 2026
- Date parsed from source:Oct 20, 2026
- First seen by Releasebot:Oct 21, 2026
v2.8.0: YAML formatting with ryl and a builtin for global mise config repositories
hk 2.8.0 adds YAML and Markdown formatting builtins and support for formatting repositories with global mise configuration. It also fixes tests affected by Git commit signing and updates trusted certificates to remove compromised eMudhra intermediates.
hk 2.8.0 adds builtins that format YAML with ryl format and a builtin for repositories that hold a global mise config. It also stops commit signing from breaking hk test, and updates the bundled TLS certificate crates after the eMudhra CA compromise.
Added
ryl_formatandryl_markdown_formatbuiltins (#1737, @jdx). Builtins.ryl_format formats YAML files. Builtins.ryl_markdown_format formats YAML front matter and fenced yaml/yml blocks in Markdown files. check runsryl format --check, check_diff runsryl format --diff, and fix runsryl format. Set formatting options in the[format]table of.ryl.toml. These builtins need ryl 0.25 or later. The existing ryl and ryl_markdown linters work as before.
["ryl_format"] = Builtins.ryl_format ["ryl_markdown_format"] = Builtins.ryl_markdown_formatmise_config_dirbuiltin (#1733, @jdx). This opt-in builtin formats a repository checked out at~/.config/mise, for example one set up withmise bootstrap --adopt. It matchesconfig.toml,config.*.toml,conf.d/*.toml,conf.d/*/mise.tomlandconf.d/*/mise.*.toml. Each file goes throughmise fmt --stdin, so files outside the repository are never touched. Builtins.mise is unchanged, which means repositories that use config.toml for other tools aren't affected. fix uses sh, so on Windows it needs a POSIX shell.
hooks { ["check"] { steps { ["mise"] = Builtins.mise_config_dir } } }Fixed
- hk test passes when commit signing is turned on (#1735, @jdx). The tests for the no_commit_to_branch and destroyed_symlinks builtins create commits in a scratch repository. If your git config set commit.gpgsign without a signing key that applies to that repository, those commits failed and so did the tests. The test commits now turn signing off.
Security
- Compromised eMudhra intermediate CAs are no longer trusted (#1742, @jdx). rustls-webpki is updated to 0.103.16 and webpki-root-certs to 1.0.10. hk ships its own list of trusted root certificates, and the updated list stops trusting eight eMudhra intermediate certificates whose private keys were compromised.
Full Changelog: v2.7.1...v2.8.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 19, 2026
- Date parsed from source:Oct 19, 2026
- First seen by Releasebot:Oct 21, 2026
v2.7.1: Global pre-commit hook keeps partial commits intact
hk releases 2.7.1 with safer global pre-commit stashing, more reliable Vite+, oxfmt, and standard_rb checks, and a fix for hk initβs editorconfig-checker configuration. The update prevents unstaged changes from slipping into commits and smooths common linting workflows.
hk 2.7.1 fixes the global pre-commit hook adding unstaged changes to commits. It also fixes spurious failures in the Vite+, oxfmt and standard_rb builtins, and makes hk init write a valid identifier for editorconfig-checker.
Fixed
- Global pre-commit hook now stashes unstaged changes (#1715, @jdx). The hook installed by hk install --global runs hk run pre-commit --from-hook --staged. Because --staged always turned stashing off, the hook ignored its stash setting, including the default stash = "git". If you staged part of a file with git add -p and a fixer then changed that file, the unstaged hunks ended up in the commit. When --staged is used together with --from-hook, hk now follows the hook's stash setting. HK_STASH is ignored in that case, so a global HK_STASH can't override a repository's stash = "none". Running hk run pre-commit --staged yourself still doesn't stash.
- vp_check, vp_fmt and vp_lint pass when no files match (#1716, @jdx). These Vite+ builtins now pass --no-error-on-unmatched-pattern, as the oxfmt builtin already does. Steps no longer fail when the Vite+ config ignores every staged file, and you don't need custom check/fix overrides for this.
- oxfmt skips lockfiles (#1717, @jdx). Commits that staged pnpm-lock.yaml or package-lock.json used to print oxfmt failed / Unsupported file type for stdin-filepath. The builtin now excludes both lockfiles from check, check_diff and fix.
- standard_rb respects .standard.yml exclusions (#1719, @beauraF). Standard ignores exclusions for paths passed to it directly, so hk could report offenses in excluded files. The builtin's check and fix commands now pass --force-exclusion, as the RuboCop builtin already does.
- hk init writes a valid editorconfig-checker step (#1726, @jdx). hk init --interactive used to write Builtins.editorconfig-checker, which Pkl can't resolve. It now writes ["editorconfig_checker"] = Builtins.editorconfig_checker. The picker now shows this builtin's category and description. hk builtins lists it as editorconfig_checker, the name you use in hk.pkl.
Full Changelog: v2.7.0...v2.7.1
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 16, 2026
- Date parsed from source:Oct 16, 2026
- First seen by Releasebot:Oct 16, 2026
v2.7.0: profile_condition for steps, new builtins, and per-repository logs and backups
hk 2.7.0 adds flexible profile-based steps, clearer JSON validation for CI, and new built-ins for Herb, Ansible and Packer. It also improves lint diagnostics and keeps logs and backups separate for each repository.
Added
profile_condition for steps (#1684, @jdx). profiles only runs a step when every listed profile is enabled. profile_condition takes an expression, so you can write rules like "run when ci or slow is enabled". The new profile(name) function is true when a profile is enabled and not turned off with --profile !name. You can also use profile() in condition expressions.
["prettier"] = (Builtins.prettier) { profile_condition = "profile(ci) or (profile(slow) and not profile(fast))" }profile_condition applies on top of profiles, so existing configs work as before. Skipped steps report which profiles could enable them. If the expression is invalid, hk logs a warning and skips the step.
hk validate --json and --deny-warnings (#1699, @jdx). --json prints one document on stdout, { "path": ..., "valid": ..., "warnings": [...] }, and stops logging warnings to stderr. --deny-warnings makes the command exit non-zero when the config has warnings. If you use both, hk prints the JSON first and then exits with the error. Invalid configs still fail as before.
jactionlint builtin can fix files and covers more of them (#1687, @jdx). hk check prints one line per finding and turns each into an hk diagnostic. hk fix applies jactionlint's fixes: it uses the SARIF patch when every finding has a fix and falls back to jactionlint --fix when one doesn't. Besides workflows, the builtin now checks composite actions (.github/actions/**/action.yml) and .github/dependabot.yml. GitHub API checks stay off unless you pass --online or set JACTIONLINT_ONLINE. This needs jactionlint v2.
Herb builtins (#1706, @beauraF). Builtins.herb_format (experimental) and Builtins.herb_lint format and lint HTML+ERB templates (*.html.erb, *.herb, *.html, *.rhtml, *.turbo_stream.erb and similar). hk init suggests them when it finds .herb.yml or the @herb-tools packages in package.json.
ansible_lint builtin (#1707, @illesnagy1). This builtin lints Ansible playbooks, roles and collections in .yml/.yaml files. fix runs ansible-lint --fix and is skipped on Windows. hk init suggests the builtin when it finds .ansible-lint, .ansible-lint.y(a)ml, .config/ansible-lint.y(a)ml or ansible.cfg.
packer_fmt builtin (#1708, @illesnagy1). This builtin formats *.pkr.hcl and *.pkrvars.hcl files with packer fmt. hk init suggests it when the project contains *.pkr.hcl files.
Changed
Logs, failure output and stash backups are stored per repository (#1705, @jdx). Before, every repository and worktree shared ~/.local/state/hk. That meant a failure could point to an output.log containing another repository's output, and old-patch cleanup could delete another repository's backups. Inside a repository, the defaults are now:
- hk.log and output.log in <git-dir>/hk/, separate for each checkout
- stash backups in <common-git-dir>/hk/patches/, shared by linked worktrees
HK_STATE_DIR, HK_OUTPUT_FILE and HK_LOG_FILE still take precedence. Runs outside a repository, and repositories that set core.sharedRepository, still use the platform state directory. When several repositories share an HK_STATE_DIR, patch cleanup no longer touches another repository's patches; for example, app no longer deletes app-web's. hk leaves existing files in ~/.local/state/hk in place but no longer uses them, so look there for backups made before upgrading.
Fixed
Failed checks show readable findings instead of raw SARIF (#1695, @jdx). For steps with diagnostic_format = "sarif" or "eslint-json", the summary for a failed step now prints one line per finding, such as a.yml:3:2: error: no timeout [missing-timeout], instead of the tool's JSON. If hk can't parse any findings, it shows the raw output as before.
brakeman builtin scans the whole Rails app (#1704, @beauraF). The builtin used to pass changed files as arguments, and brakeman read them as the application path. It now runs brakeman -q -w2 on the whole app.
New Contributors
@beauraF made their first contribution in #1704
Full Changelog: v2.6.0...v2.7.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 12, 2026
- Date parsed from source:Oct 12, 2026
- First seen by Releasebot:Oct 13, 2026
v2.6.0: Typst and jactionlint builtins, more shebang file types
hk 2.6.0 adds Typst and jactionlint builtins, expands script detection from shebangs, and improves run feedback with a success line after passing output-heavy checks. It also fixes agent stop-hook blocking, updates ryl and Pkl handling, and refines docs.
hk 2.6.0 adds builtins for Typst and jactionlint, detects more script types from their shebang, and ends passing runs with a success line when step output is shown. The agent stop hook no longer blocks in projects that don't use hk.
Added
Typst builtins (#1646, @jdx). Builtins.typstyle formats .typ files and Builtins.tinymist lints them. hk init detects both in Typst projects. In fix mode, hk applies the diff that typstyle prints. tinymist needs version 0.14.20 or newer. It checks each file separately, and the step still fails if an earlier file fails even when later files pass.
hooks { ["pre-commit"] { fix = true steps { ["typstyle"] = Builtins.typstyle ["tinymist"] = Builtins.tinymist } } }jactionlint builtin (#1663, @jdx). Builtins.jactionlint lints .github/workflows/*.yml and *.yaml with jdx/jactionlint, a maintained fork of actionlint. Its findings appear in hk check --sarif. The actionlint builtin is unchanged.
Success line after passing runs that show step output (#1678, @jdx). If every step passes but the end-of-run summary prints step output, such as stderr from a passing test, hk now ends with a line like β check passed. The line isn't printed on failure or cancellation, with --quiet or --silent, in machine-output modes, or when no summary was shown.
More file types from shebangs (@jdx). These changes affect extensionless scripts selected with types:
Lua scripts are now typed lua, so stylua, selene and luacheck pick them up. Version numbers at the end of interpreter names are ignored, and luajit, pypy and nodejs map to their languages. For example, lua5.4 and luajit become lua, pypy3 becomes python, perl5 becomes perl and php8.2 becomes php (#1676).
Scripts with a deno or bun shebang are now typed deno or bun. They don't get a javascript or typescript tag, so a step needs to select them by name, for example types = List("deno", "bun"). node scripts are still typed javascript and node (#1680).
Fixed
hk agent stop-hook no longer blocks in projects without hk (#1649, @jdx). Claude Code and Codex Stop hooks set in user-level settings run in every project. In a project with no hk config, the hook used to block the agent's turn and tell it to run hk init. Now, if there's no config or the config has no check hook, the stop hook passes: it prints nothing for Claude Code and {} for Codex. A config that fails to load still blocks with its error.
The ryl builtin no longer prints a deprecation warning (#1655, @jdx). The builtin now runs ryl check for its check, diff, list-files and fix commands. ryl 0.20.0 doesn't have the check subcommand, so this needs a newer ryl. It was tested with 0.22.0 and 0.23.0.
Changed
Pkl config loading moved to pklr v5 (#1650, @jdx). Some config errors are worded differently. For example, some invalid regex patterns now fail while Pkl evaluates the config, with a message like "Syntax error in regex", instead of with hk's old validation message.
Documentation now explains when generated files are staged, how that relates to step output allowlists, and a limitation with HK_STASH_UNTRACKED=false for newly generated files (#1652, @zeitlinger).
Breaking Changes
If you use Builtins.ryl, upgrade ryl past 0.20.0 (0.22.0 or newer is verified). Older versions don't have ryl check, so the builtin fails with them.
Full Changelog: v2.5.0...v2.6.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source - Oct 4, 2026
- Date parsed from source:Oct 4, 2026
- First seen by Releasebot:Oct 4, 2026
v2.5.0: Safer stashing, faster config loading, and diagnostics for more builtins
hk 2.5.0 ships major speedups, safer stashing, richer diagnostics, stricter config checks, and many Windows and reliability fixes. It also adds broader built-in support for more tools and better MCP and test behavior.
Highlights
hk 2.5.0 makes stashing safe when hk is killed and when several hk processes run at once, loads configs much faster, and reports diagnostics from many more builtins. It also fixes a long list of cases where a check passed without checking anything, along with several Windows problems.
Stashing holds up under interruption and concurrency. SIGTERM, SIGHUP and crashes no longer leave your unstaged changes stuck in git stash. Hooks running in linked worktrees now take turns stashing. Several edge cases that dropped or mixed up changes are fixed.
Configs load faster. A cold config load drops from about 1.4 s to about 0.07 s, and hk validate is about 14x faster. Several per-step and stashing costs are lower in large repos.
Fewer checks pass when they should fail. hk validate now catches more config mistakes. Several builtins and hk util checks no longer skip binary files, case conflicts in directory names, or executable bits recorded in git.
Added
Diagnostics from more builtins. actionlint, flake8, revive, buf_lint, clang_format, mypy, mado, rumdl, ktlint, buildifier_lint, cpp_lint, xmllint and sorbet now feed hk check --sarif, --format json and the MCP dashboard. Their normal output doesn't change. (#1623, #1624, #1626, #1627, #1630, @jdx)
Broader gcc diagnostic format and a new diagnostic_severity step setting (#1629, #1630, @jdx). The gcc parser now reads:
lines with no column (path:line: message)
a vet: prefix and Go # pkg header lines
tool output that ends with a summary line, which is no longer added to the last finding
diagnostic_severity (error, warning, note or help; default error) sets the severity for rule-name: message findings that don't name one.
expect.diagnostics in step tests (#1622, @jdx). hk test can check that a step's diagnostic_format turns its output into the diagnostics you expect. Fields you leave out match anything, and message matches a substring.
tests { ["reports a warning"] { expect { code = 1 diagnostics { new { path = "src/main.c"; line = 2; severity = "warning"; rule = "W1" } } } } }exec_ok() for step conditions (#1610, @jdx). exec_ok(command) is true when the command exits 0. Use it to gate a step on a shell test. exec() still returns stdout, and now gives a clear error instead of panicking on bad arguments or output that isn't valid UTF-8.
condition = "exec_ok('test -f check.js')"MCP scope argument (#1600, #1640, @jdx). start_check, start_safe_check and start_safe_fix accept scope:
all (default): the whole project, as before
changed: staged, unstaged and untracked files
unstaged: unstaged and untracked files
staged: only files in the index
hk agent stop-hook (#1604, @jdx). The Stop hooks that hk agent hooks --target claude-code|codex generates now run this command. It runs hk run check --safe, always exits 0, and prints a valid {"decision":"block","reason":...} when the check fails. Before, the hooks printed raw JSON and exited with the linter's status, which the agents didn't handle. Regenerate your hook snippets to use it.
hk validate warnings (#1590, @jdx). hk validate now warns about:
misspelled properties, with a did-you-mean suggestion
depends entries that have no effect
steps with no command
globs that can never match, such as ./src/*.js, a leading /, ! patterns or comma-separated lists
min_hk_version now accepts v1.2.3 and two-part versions like 2.5.
hk init detects 47 more tools from their own config files or from manifest entries that name them. Examples include .flake8, stylua.toml, deno.json, .sqlfluff, .clang-format, [tool.isort] and typos. (#1576, @jdx)
Stash lock timeout. HK_STASH_LOCK_TIMEOUT (or git config hk.stashLockTimeout) sets how long hk waits for another hk process that is stashing. The default is 300 seconds, and 0 fails at once. (#1636, @jdx)
Changed
Cold config loads are about 20x faster. A config now evaluates only the builtins it uses, which cuts a cold load from about 1.4 s to about 0.07 s (#1581). The pklr 4.0 update makes hk validate on hk's own config about 14x faster (#1644). (@jdx)
Other speedups:
workspace_indicator is resolved once per directory, saving about 120 ms per step in large monorepos (#1599).
Runs that name their files, such as hk check FILE, skip the untracked-file scan (#1587).
Stashing no longer rescans the worktree first, saving about 80 ms on large repos (#1595).
Unchanged unstaged files are restored with one git process (#1612).
hk now uses the mimalloc memory allocator (#1635).
(@jdx)
Read-only checks run in parallel in fix hooks (#1586, @jdx). In fix hooks, steps that only have a check declared with effect = "read" now run side by side instead of one after another. They still wait for any fixer that writes the same files. The builtin mypy and tsc declare effect = "write", so they are not affected.
CRLF files stay CRLF in trailing_whitespace, newlines and mixed_line_ending (#1621, @jdx). trailing-whitespace strips only spaces and tabs, so it no longer strips form feeds or other Unicode whitespace. end-of-file-fixer appends the file's most common line ending. mixed-line-ending --fix converts to the file's most common line ending instead of always LF. On a tie it uses LF.
User config lists are merged with the project's (#1596, @jdx). skip_steps, skip_hooks and hide_warnings from the user config are now combined with the project's lists, as the docs describe. Before, the project's list replaced the user's.
hk now warns when hk.local.pkl doesn't amend hk.pkl, because the local file then replaces the shared config. Hide the warning with HK_HIDE_WARNINGS=local-config-replaces-shared.
Subproject skip_steps now apply to that subproject's own steps. hk now warns about other top-level subproject settings that have no effect. (#1615, @jdx)
Clearer error messages.
Failures print once, without Rust Location: lines. hk no longer suggests a fix command when the tool isn't installed. (#1588)
Argv steps say "command not found" when the tool is missing (#1579).
Pkl syntax errors show the file, line and column, including in imported files (#1598).
Hook 'β¦' not found explains why: there is no hk.pkl, it's empty, or the name is wrong (it lists the defined hooks). hk init prints next steps. (#1564)
(@jdx)
Interrupted steps report cancelled. In structured output and MCP, a step or run stopped by Ctrl-C now reports cancelled instead of failed (#1643, @jdx).
Capped structured output. Each step's output in JSON, JSONL, MCP and JUnit results is limited to 64 KiB. JSON output now includes a failed run_result when hk fails before any step runs, for example on a broken config. (#1605, @jdx)
Fixed
Stashing
If hk is stopped by SIGINT, SIGTERM or SIGHUP (or a Windows console close), it restores stashed changes before exiting. After a crash or kill -9, the next hk run restores them if the working tree is clean. Otherwise it prints the git stash apply command to run. (#1641, @jdx)
hk processes in the same repository, including linked worktrees, now take turns stashing and restoring (#1636). hk restores its own stash entry by commit id, so other stash entries are never touched (#1637). (@jdx)
Stashing now handles these cases (@jdx):
A merge or cherry-pick in progress is kept (#1609).
A staged edit is kept when its worktree copy was reverted to HEAD (#1602).
Tracked files whose names start with : are stashed (#1614).
Unstaged text over a staged binary file is restored (#1580).
CRLF line endings are kept when unstaged files are restored (#1535).
Steps and file selection
Steps that depend on a step with no files now run instead of hanging (#1584).
Diagnostics from every job that started are kept when another job fails (#1642).
An exclude that names a directory now excludes the files in it (#1606).
Files are selected in directories whose names contain brackets or braces (#1592).
Tracked files whose names aren't valid UTF-8 are skipped with a warning in --all, --glob, --from-ref and file arguments (#1613).
Diagnostic paths are relative to the repository root for steps that run in a subdirectory (#1638).
Scripts whose env shebang uses -S, options or variables now get the right file type (#1611).
interactive = true steps run in hk's process group, so TUI tools such as fzf, helix and gimoji display correctly (#1557).
Formatter patches are applied and rolled back without interference from other commands or staging (#1392, @nettlesh).
Configuration and CLI
Top-level jobs in hk.pkl or the user config is now applied (#1594).
HK_STASH accepts true/1 and false/0, and an invalid value gives an error instead of a panic (#1594).
hk config no longer crashes when a setting is unset (#1594).
Dependency cycles, steps that depend on themselves, and invalid globs or regexes are rejected when the config loads, with the hook and step named. Before, hk check could hang. (#1567)
hk check --step with an unknown name now fails instead of passing after running nothing (#1603).
Configs that amend the v1 package schema load again (#1560).
Mirror credentials are hidden in errors from failed package downloads (#1620).
--help, --version and shell completion keep their normal exit code when the reader closes the pipe early (#1540).
Installed hooks
hk install --global records a path that still works after upgrades: the mise shim or the hk on PATH, not a versioned install path. Local hooks add hk's directory to the end of PATH, so they work in GUI git clients with a minimal PATH. (#1597)
The message for hk install --force-local when a global install exists is now correct (#1616).
Builtins and hk util
check_added_large_files and check_case_conflict now check binary files (#1571).
no-commit-to-branch works when a tag has the same name as the branch (#1577).
The executable and shebang checks use the file mode recorded in git, so they also work on Windows and with core.fileMode=false (#1577).
check-case-conflict finds conflicts between directory names, such as Foo/ and foo/ (#1577).
Text checks no longer skip files when the 8 KiB sample ends in the middle of a multibyte character. Key checks now also handle files that aren't valid UTF-8. (#1572)
fix-smart-quotes leaves files that aren't valid UTF-8, and symlinks, unchanged (#1570).
check-conventional-commit accepts merge and revert titles generated by git (#1566).
MCP and agents
cancel_run stops the hk run instead of staying in cancelling (#1607).
get_diff includes untracked and binary files and reports capture errors (#1601).
Windows
Percent signs in file names stay literal under cmd.exe (#1568).
Batches for cmd shims stay under the cmd.exe command-line length limit (#1618).
A custom shell runs directly, and quoted shell paths work (#1628).
Tools still running when a fail-fast cancel stops a run are now ended (#1625).
Security
hk check --safe and hk fix --safe now refuse a hook-level report whose effect is unknown or destructive. report accepts the same command forms as check, so you can declare its effect. (#1573)
Patches from check_diff that write inside .git, in any spelling git treats as .git, are refused, and hk runs the fixer instead. On Unix, hk creates new state directories with mode 0700. (#1585)
Legacy hk install (Git older than 2.54, or --legacy) no longer overwrites hooks that hk didn't write and no longer writes through symlinks; see Breaking Changes (#1593).
Breaking Changes
Legacy installs refuse to replace foreign hooks. If .git/hooks/ contains a hook that hk didn't write, or a symlink, hk install changes nothing and lists the files. Pass --force to replace them; a symlink's target is left untouched. Setups where another tool owns hooks, such as git lfs install, need hk install --force. Config-based installs on Git 2.54+ are not affected. (#1593)
Line-ending fixers keep CRLF. Repos that relied on trailing_whitespace or mixed_line_ending converting CRLF files to LF need another way to normalize line endings. (#1621)
Signal exit codes. When stopped by a signal, hk exits with 128 + signal: 130 for Ctrl-C (previously 1), 143 for SIGTERM and 129 for SIGHUP. Pressing Ctrl-C twice exits at once. (#1641)
Stricter config checks.
Dependency cycles and invalid step globs now fail when the config loads (#1567).
--step with an unknown name fails (#1603).
min_hk_version values such as "2.6" or "v2.6.0" are now enforced. Before, they were ignored. (#1590)
--safe and plain-string reports. A plain-string hook report blocks --safe runs. Declare it as a CommandSpec with effect = "read" to keep using it under --safe. (#1573)
Full Changelog: v2.4.0...v2.5.0
π Sponsor hk
hk is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If hk speeds up your pre-commit loop or makes linting less painful, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep hk fast, free, and independent.
Original source
Curated by the Releasebot team
Releasebot is an aggregator of official product update announcements from hundreds of software vendors and thousands of sources.
Our editorial process involves the manual review and audit of release notes procured with the help of automated systems.