Skip to content
pubscout

husky

0.1.7, released 3 years ago by an unverified publisher

Manage git hooks easily for your Dart and Flutter projects.

$ flutter pub add husky
Source repository

What it does

Husky makes it easy to manage git hooks for Dart and Flutter projects, allowing you to run tests, lint code, or check commit messages upon commit or push. It uses the modern Git feature core.hooksPath and supports macOS, Linux, and Windows.

AI-written summary of version 0.1.7, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to enforce code linting or formatting before commits
  • You want to automatically run tests before pushing code

Skip it when

  • Your project does not use Git
  • You prefer manual hook management inside .git/hooks

Strengths

  • Easy installation and setup via Dart commands
  • Cross-platform support for macOS, Linux, and Windows
  • Supports monorepos and custom directories

Weaknesses

  • Relies on shell scripts which require Git and a proper environment on Windows

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

Add husky to dev_dependencies and run `dart run husky install`.

dart pub add --dev husky
dart run husky install
dart run husky add .husky/pre-commit "dart test"

Alternatives

Packages that do the same job and could replace husky.

Works with

Packages commonly used together with husky: ones it builds on, ones built on it, and its own family.