The professional, zero-dependency Git hook manager for modern teams.
Read the full documentation at freightapp.co.
Freight streamlines Git workflows by rewiring every Git hook in your repository to a single Conductor binary. All
logic is defined in a declarative Railcar manifest (railcar.json), ensuring your hooks are portable, fast, and
easy to manage.
Unlike Husky (which requires Node.js) or pre-commit (which requires Python), Freight is a single, static Go binary. Your developers don't need to install a specific runtime just to run Git hooks.
Manage every hook—from pre-commit to post-merge—in one railcar.json manifest. No more messy .git/hooks directory
filled with ad-hoc scripts.
Freight's 'Conductor/Railcar' architecture ensures that your hooks work identically across Windows, macOS, and Linux.
| Feature | Freight | Husky |
|---|---|---|
| Runtime | None (Static Binary) | Node.js |
| Setup | freight init |
npm install |
| Config | Single JSON file | Multiple files/package.json |
| Portability | High (Binary included) | Moderate (Requires Node) |
- Homebrew (macOS):
brew install --cask devbytes-cloud/tap/freight - One-liner Install (Linux/macOS):
curl -fsSL https://raw.githubusercontent.com/devbytes-cloud/freight/main/curl.sh | bash- Custom
INSTALL_DIR(optional):INSTALL_DIR=~/.local/bin curl -fsSL ... | bash
- Custom
- Precompiled Binaries: GitHub Releases
Run the following command in your Git repository:
freight initThis installs the Conductor binary and creates a starter Railcar manifest (railcar.json).
By default, Freight installs all supported Git hooks. You can use the --allow (or -a) flag to specify only the hooks
you want:
freight init --allow pre-commit,commit-msgValid hooks are: pre-commit, prepare-commit-msg, commit-msg, post-commit, and post-checkout.
Add a script to your railcar.json and watch it run on your next commit!
Freight operates on a simple, powerful metaphor:
- The Conductor: A tiny, high-performance binary placed at your repo root. It is the single entry point for all Git hooks.
- The Railcar: A
railcar.jsonmanifest that defines exactly what the Conductor should execute for each hook.
When a Git hook fires, the Conductor extracts the logic from the Railcar and executes it with precision.
For full documentation, recipes, and advanced configuration, visit freightapp.co.
MIT. See LICENSE for full text.