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.typstyleformats.typfiles andBuiltins.tinymistlints them.hk initdetects both in Typst projects. In fix mode, hk applies the diff that typstyle prints.tinymistneeds 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 } } }
-
jactionlintbuiltin (#1663, @jdx).Builtins.jactionlintlints.github/workflows/*.ymland*.yamlwith jdx/jactionlint, a maintained fork of actionlint. Its findings appear inhk check --sarif. Theactionlintbuiltin 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--quietor--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, sostylua,seleneandluacheckpick them up. Version numbers at the end of interpreter names are ignored, andluajit,pypyandnodejsmap to their languages. For example,lua5.4andluajitbecomelua,pypy3becomespython,perl5becomesperlandphp8.2becomesphp(#1676). - Scripts with a
denoorbunshebang are now typeddenoorbun. They don't get ajavascriptortypescripttag, so a step needs to select them by name, for exampletypes = List("deno", "bun").nodescripts are still typedjavascriptandnode(#1680).
- Lua scripts are now typed
Fixed
hk agent stop-hookno 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 runhk init. Now, if there's no config or the config has nocheckhook, 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
rylbuiltin no longer prints a deprecation warning (#1655, @jdx). The builtin now runsryl checkfor its check, diff, list-files and fix commands. ryl 0.20.0 doesn't have thechecksubcommand, 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=falsefor 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 haveryl 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.