ghooks 0.0.1

  • Readme
  • Changelog
  • Installing
  • 0

dart ghooks #

A library to easily use git hooks from Dart

Install #

To start using ghooks, add it to your dev_dependencies and run pub get

To install hooks in your project, run:

$ pub run ghooks install

Add your hook to pubspec.yaml


        pre-commit: ./ && ./

Install options #

--precommit-samplenoneIf flag is passed it will create a sample pre commit Dart script. Defaults to false
--hook <hook-name>-kCreates a bash script for the hook passed, supports passing multiple hooks. Defaults to all scripts. Example: -k pre-commit -k commit-msg

Remove #

To remove all hooks in your project, run:

$ pub run ghooks remove

Or if you want to remove a specific hook:

$ pub run ghooks remove -k pre-commit -k commit-msg

Git Hooks #

Git hooks are scripts that run automatically every time a particular event occurs in a Git repository. ghooks supports all git hooks (

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.0.1 #

  • Rework Hanzo to use sh inside pubspec.yaml

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  ghooks: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:ghooks/ghooks.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0