Git Clients

hk – Git hooks manager and project linting tool

hk is a Git hooks manager and project linting tool written in Rust. It helps developers automate code-quality checks and formatting tasks, both when committing changes and during ordinary development.

The application is particularly useful for projects that use several linters and formatters. Running these tools sequentially can be unnecessarily slow, while running them all at once risks conflicts when multiple tools modify the same files. hk addresses this through coordinated task execution.

Its configuration can be shared across a development team, allowing the same checks to run locally and in continuous integration environments. The aim is to catch problems early without turning every commit into a lengthy exercise.

This is free and open source software.

Key Features

  • Runs linters, formatters and other project checks concurrently, using read/write file locks to prevent conflicting modifications.
  • Uses Pkl for configuration, with support for typed settings, imports and reusable definitions.
  • Provides built-in configurations for popular development tools, including Prettier, ESLint, Ruff, Black and other linters and formatters.
  • Can detect available project tools and generate an initial configuration with the hk init command.
  • Separates checking from fixing: hk check reports problems without modifying files, while hk fix applies available corrections.
  • Supports checks against modified files or the entire repository, with options to preview planned operations and explain why particular steps are selected.
  • Temporarily stashes unstaged changes during pre-commit operations, protecting partially staged files from unintended modifications.
  • Supports automatic staging of corrected files during hooks, with explicit control over staging during manual fixes.
  • Filters files by patterns and types, and supports dependencies between individual processing steps.
  • Can produce structured diagnostics, including SARIF output for integration with code-quality reporting systems.
  • Integrates with mise for managing development toolchains and executing project commands.

Website: github.com/jdx/hk
Support:
Developer: Jeff Dickey
License: MIT License

hk

hk is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Git Hook Managers
lefthookGit hooks manager for Node.js, Ruby, Python and more
huskyGit hooks made easy
pre-commitManage and maintain multi-language pre-commit hooks
prekReimagined version of pre-commit
overcommitManage and configure Git hooks
hkGit hooks manager and project linting tool focusing on performance
simple-git-hooksSimple git hooks manager for small projects
CaptainHookFlexible Git hook manager
GithooksPlatform-independent hooks manager
git-hooksRewritten from icefox/git-hooks, with extra features
JigGit pre-commit hook on steroids

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted