amont
v1.60.0
Published
Opinionated git hooks that judge what you are committing, not what is on disk
Maintainers
Readme
amont
Catch the bad commit before it exists — and take the whole thing back out in one command.
A single Rust binary that checks git commit and git push. It ships
thirty-nine built-in checks — commit-message conventions, conflict markers,
secrets, the linters and test suites of the languages your repository actually
uses — and each one fires only where the repository has opted into its tool, so
there is no YAML to write before it is useful. The commit path links no
external crates, a cloned repository's own checks stay inert until you
amont trust them, and amont uninstall removes exactly the six shims install
wrote. How it compares to pre-commit, lefthook and
husky.

amont list says what runs in the repository you are standing in — here, a
Python one:
pre-commit
● ban-terms
● ruff
● secrets
…
pre-push
● audit-python
…
15 active here. 23 inert (Go, JavaScript, Kubernetes, Python, Rust) — amont list --allInstall
# Linux and macOS
curl -fsSL https://raw.githubusercontent.com/fredericrous/amont/main/install/install.sh | sh# Windows
irm https://raw.githubusercontent.com/fredericrous/amont/main/install/install.ps1 | iexEither one downloads a release binary, checks it against the published
SHA256SUMS, and enables nothing. Homebrew, crates.io, npm, prebuilt
archives and building from source: installing. Needs git
2.31 or later.
Turning hooks on
cd <your-repo> && amont install # this repository only — the default
amont-fleet install --root ~/Developer # many repositories at once
amont enroll --conventions declared # every future clone on this machineenroll is a standing grant; read rolling out to a team
before you use it. amont uninstall removes the shims again —
opting out covers that and everything short of it.
Day to day
amont run # would my commit pass? (the staged set)
amont run --all-files # does my working tree pass?
amont check src/main.rs # these files, in the format editors already parse
amont rehearse --wait # the push gate on a snapshot of HEAD, before you push
amont land # push this branch, then read the remote back to prove it moved
amont trust # review what this repository's amont.conf declares
git config amont.severity.clippy warn # runs, reports, does not block
git config hook.skip clippy # does not run at allDocumentation
Versioned with the code in docs/ and published as a
book:
- Installing and activating · Rolling out to a team · The CI backstop
- The checks · Configuration · Opting out · Commit conventions
- Where the hooks fit in your flow · The trust model · Custom checks and packs
- Why you can let this near your commits · The repositories around it · SECURITY.md · design records
Contributing
make check is the CI-parity target; setup, the zero-dependency rule and the
house style are in CONTRIBUTING.md. Questions in
Discussions, bugs in
issues. By participating you
agree to the Code of Conduct.
License
MIT.
