Fisherman is a simple cross-platform command-line tool for managing Git pre-commit hooks in a friendly way. It allows you to easily lint, run tests and other code-quality functions every time you commit your code.
- Improve Code Quality: Run code quality checks automatically on every commit.
- Enable/Disable Hooks: Quickly disable/re-enable commit hooks with 1 command.
- Temporarily Disable Hooks: Temporarily disable hooks for a set period if you need to get work done quickly with the
-disabled-for 1h
flag. - Cross-Platform Support: Works on macOS, Windows, and Linux.
You can download the executable for your operating system from the GitHub Releases page, or you can use go install github.com/TomStowe/fisherman@latest
- Download the
fisherman
executable from the GitHub Releases page. - Move the executable to a directory in your
PATH
, e.g.,/usr/local/bin
:mv /path/to/downloaded/fisherman /usr/local/bin/fisherman chmod +x /usr/local/bin/fisherman
- Verify the installation:
fisherman -h
- Download the fisherman.exe file from the GitHub Releases page.
- Move the executable to a directory included in your PATH, e.g.,
C:\Windows\System32
. - Verify the installation by opening the Command Prompt and running:
fisherman -h
- Download the fisherman executable from the GitHub Releases page.
- Move the executable to a directory in your PATH, e.g., /usr/local/bin:
mv /path/to/downloaded/fisherman /usr/local/bin/fisherman chmod +x /usr/local/bin/fisherman
- Verify the installation:
fisherman -h
Fisherman allows you to enable or disable Git pre-commit hooks with simple commands.
To enable a pre-commit hook using a script file:
fisherman -file=path/to/your/hook_script.sh
To disable the pre-commit hook:
fisherman -disable
To temporarily disable the pre-commit hook for 2 hours:
fisherman -disabled-for 2h
Where units are:
Unit | Value |
---|---|
w | week |
d | day |
h | hour |
m | minute |
s | second |
To re-enable an existing pre-commit hook:
fisherman -enable
Contributions are welcome! If you have ideas, find bugs, or want to add new features, feel free to submit a pull request or open a new issue.
To build Fisherman from source, ensure you have Go installed, and then run the following commands:
- Clone the repository:
git clone https://github.com/TomStowe/fisherman.git cd fisherman
- Build the executable:
go build -o fisherman main.go
- Run the tool:
./fisherman -h
Fisherman is licensed under the MIT License. See the LICENSE file for more details.