Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
github-actions edited this page Nov 26, 2025 · 10 revisions

fisherman logo

Small git hook management tool for developer.

Overview

Fisherman is a lightweight, declarative Git hook manager that simplifies automation of your local Git workflows. While many hook managers focus on basic tasks like running tests or linting code, Fisherman enables more sophisticated hook configurations with minimal effort.

Key Features

  • Declarative Configuration - Define hooks using TOML, YAML, or JSON files
  • Context-Aware Rules - Create hooks that respond to branch names, file paths, and more
  • Variable Extraction - Pull information from your environment using regex patterns
  • Multiple Hook Types - Support for all standard Git hooks (pre-commit, commit-msg, pre-push, etc.)
  • Conditional Execution - Execute rules based on expressions using the when parameter
  • Template Support - Use variables in your configurations with {{variable}} syntax
  • Multiple Scopes - Global, repository, and local configuration support
  • Parallel Execution - Async rules (exec, shell, write-file) run in parallel for faster hook execution
  • Easy Installation - Single binary, no runtime dependencies

Quick Start

Installation

Install Fisherman using Cargo:

cargo install --git https://github.com/evg4b/fisherman.git

Basic Usage

  1. Create a configuration file in your repository (.fisherman.toml, .fisherman.yaml, or .fisherman.json)
  2. Define your hooks and rules
  3. Install the hooks with fisherman install

Example Configuration

# .fisherman.toml

# Run tests before committing
[[hooks.pre-commit]]
type = "exec"
command = "cargo"
args = ["test"]

# Validate commit message format
[[hooks.commit-msg]]
type = "message-regex"
regex = "^(feat|fix|docs|style|refactor|test|chore):\\s.+"

Install Hooks

# Install configured hooks
fisherman install

# Install specific hooks
fisherman install pre-commit pre-push

# Force install (override existing hooks)
fisherman install --force

Documentation

Why Fisherman?

Fisherman was designed to be:

  • Simple - Easy-to-read configuration without complex scripting
  • Flexible - Supports multiple rule types and conditional execution
  • Consistent - Same configuration format across all hooks
  • Portable - Single binary written in Rust, no runtime dependencies
  • Global - Define rules once in your home directory for all repositories

Contributing

Contributions are welcome! Please check the GitHub repository for more information.

License

MIT License - see the LICENSE file for details.

Clone this wiki locally