CLI Commands - evg4b/fisherman GitHub Wiki
Fisherman provides several commands to help you manage Git hooks. This document outlines the available commands and how to use them.
fisherman install [OPTIONS] [HOOKS]
Installs Git hooks into your repository's .git/hooks
directory.
Options:
-
-f
,--force
- Overwrite existing hook scripts
Arguments:
-
HOOKS
- Optional list of specific hooks to install (e.g., pre-commit, commit-msg) If omitted, all hooks configured in .fisherman.toml will be installed
Example:
# Install all configured hooks
fisherman install
# Force install specific hooks
fisherman install --force pre-commit commit-msg
fisherman explain <HOOK>
Displays detailed information about a specific hook's configuration and rules.
Arguments:
-
HOOK
- The Git hook to explain (required)
Example:
fisherman explain pre-commit
Output shows the hook description and all configured rules that will run when the hook is triggered.
fisherman handle <HOOK>
Executes the specified hook and its associated rules. This command is primarily used internally when Git triggers a hook. But it can be useful for testing or debugging purposes.
Arguments:
-
HOOK
- The Git hook to handle (required)
Example:
fisherman handle pre-commit
All commands support the following common options:
-
-h
,--help
- Print help information. -
-V
,--version
- Print version information.