| Crates.io | gitfluff |
| lib.rs | gitfluff |
| version | 0.8.0 |
| created_at | 2025-10-16 18:42:07.725192+00 |
| updated_at | 2026-01-18 07:54:59.69459+00 |
| description | Commit message linting tool with presets, custom formats, and cleanup automation. |
| homepage | https://github.com/Goldziher/gitfluff |
| repository | https://github.com/Goldziher/gitfluff |
| max_upload_size | |
| id | 1886536 |
| size | 156,845 |
Commit messages should be clear, consistent, and human-friendly. gitfluff is a commit linter for the AI agent era: it keeps your history tidy, removes noisy AI signatures, and enforces lightweight standards without getting in your way.
Lint the message Git is editing:
gitfluff lint .git/COMMIT_EDITMSG
Auto-clean the message in place:
gitfluff lint .git/COMMIT_EDITMSG --write
Install the commit-msg hook:
gitfluff hook install commit-msg
Homebrew:
brew tap goldziher/tap
brew install gitfluff
npm:
npm install -g gitfluff
Cargo:
cargo install gitfluff
One-off runs:
npx gitfluff@0.8.0 --version
uvx gitfluff --version
No config is required. If you want project-wide rules, add .gitfluff.toml:
preset = "conventional"
write = true
[rules]
no_emojis = true
ascii_only = false
exit_nonzero_on_rewrite = true
title_prefix = "ABC-123"
title_prefix_separator = " - "
Notes:
title_prefix and title_suffix can be simple literals or a pattern like ABC-[0-9]+.write = true applies safe cleanups and preserves your intent.gitfluff works with pre-commit, Husky, Lefthook, and raw Git hooks. If you already use a hook manager, just call gitfluff lint from your commit-msg hook. It accepts the commit message path as the first argument.
By default, gitfluff enforces the Conventional Commits 1.0.0 format, including title line structure, optional body and footer rules, and BREAKING CHANGE support.
If you want a stricter or custom format, you can override the title check with a custom pattern in CI or config. Run gitfluff lint --help for the full command reference.