// commit-message-generator
Paste a unified git diff and get a Conventional Commits message. Heuristic parser, fully client-side — review and edit before you commit.
Presets:
Generated message
Paste a diff and press “Generate Message”.
// how-it-works
Parse
Reads diff --git headers, hunk markers, and counts added/removed lines per file. Detects new, deleted, and renamed files.
Classify
Applies ordered heuristics over changed paths and added lines to pick a Conventional Commits type: feat, fix, refactor, test, docs, and more.
Summarize
Derives a scope from the common path segment and an imperative summary from changed symbols and filenames — never generic filler.
Compose
Assembles a header, per-file body bullets with real counts, and a BREAKING CHANGE footer when public signatures were removed.
// limitations
- Type inference is heuristic, not semantic. It reads paths and diff lines, not your intent.
- No language server, no AST — symbol extraction is pattern-based and can miss or misread code.
- Ambiguous diffs (mixed concerns, large refactors) may need a manual type or scope change.
- Renames, binary files, and generated files are noted but not deeply analyzed.
- Always review and edit the message before committing. This tool is a starting point, not an authority.