Git Clients

husky – Git hooks made easy

Husky is a lightweight Git hooks manager designed primarily for JavaScript and Node.js projects. It lets developers run checks automatically when committing or pushing code, helping catch mistakes before changes reach a shared repository.

The application uses Git’s native hook mechanism rather than introducing a separate task runner. Hook commands are ordinary shell scripts, making them straightforward to inspect, modify and share with other contributors.

Husky is particularly convenient for projects that already use npm scripts for linting, formatting and testing. It adds very little overhead to the development workflow and doesn’t require a complicated configuration file.

This is free and open source software.

Key Features

  • Uses Git’s core.hooksPath setting to manage hooks in a dedicated project directory.
  • Supports all client-side Git hooks, including pre-commit, commit-msg and pre-push.
  • Runs commands using POSIX shell scripts, allowing conditional execution, environment variables and more elaborate workflows.
  • Supports branch-specific hooks, so different checks can run depending on the current Git branch.
  • Integrates with npm’s prepare script to initialise hooks when project dependencies are installed.
  • Works with Git graphical clients, Node.js version managers, nested projects and monorepositories.
  • Allows a custom hooks directory to be configured for projects with unusual directory structures.
  • Supports startup scripts for preparing the execution environment before hooks run.
  • Hooks can be temporarily or globally disabled using the HUSKY environment variable.
  • Has no runtime package dependencies and a small installation footprint.

Website: github.com/typicode/husky
Support:
Developer: typicode
License: MIT License

husky is written in JavaScript. Learn JavaScript 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
GrumPHPAutomates PHP code quality checks through configurable Git 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
AutohookRuns and organises Git hook scripts using a single Bash script
JigGit pre-commit hook on steroids

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted