sumgit
v1.0.4
Published
AI-powered CLI to instantly summarize Git commits, diffs, and generate intelligent commit messages for cleaner repos and better changelogs.
Maintainers
Readme
Sumgit 🧠📦
Sumgit is a powerful CLI tool that uses AI to summarize Git commit messages and diffs, generate new commit messages, and help automate new commits — ideal for cleaner PRs and smarter commit hygiene.
✨ Features
- 🔍 Summarize commit messages
- Command:
sumgitorsumgit 5
- Command:
- 🧠 Summarize actual code diffs
- Command:
sumgit --difforsumgit --diff 3
- Command:
- 📝 Generate commit messages based on current diff
- Command:
sumgit --gen
- Command:
- ✅ Auto-stage and commit with AI-generated message
- Command:
sumgit --gen --commit
- Command:
- 🔎 Preview commit without writing it (dry run)
- Command:
sumgit --gen --commit --dry-run
- Command:
- 📂 Summarize the diff of a specific file
- Command:
sumgit --file path/to/file.js
- Command:
- 🌐 Fully configurable prompt system handled on the client
- Prompts are constructed in CLI and sent directly to backend
🚀 Installation
npm install -g sumgit🧪 Usage
sumgit [options] [number_of_commits]🔄 Examples
| Command | Description |
|----------------------------------|--------------------------------------------------|
| sumgit | Summarize the last 10 commit messages |
| sumgit 5 | Summarize the last 5 commit messages |
| sumgit --diff | Summarize last 10 commits by code diffs |
| sumgit --diff 3 | Summarize last 3 commits by diffs |
| sumgit --gen | Generate a commit message from current git diff |
| sumgit --gen --commit | Generate and commit with AI-generated message |
| sumgit --gen --commit --dry-run | Preview the AI commit before executing |
| sumgit --file index.js | Summarize changes in index.js |
📌 Options
--diff– Summarize code diffs instead of commit messages--gen– Generate a commit message from current unstagedgit diff--commit– Stage and commit with the generated commit message (requires--gen)--dry-run– Preview the generated commit message and git commands without committing--file <path>– Summarize the unstaged diff of a specific file-h,--help– Show usage
🛠️ Requirements
- Node.js 16+
- A Git repository with commits
🤝 Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
Feel free to fork the repo and submit a PR.
📄 License
MIT © anthonyhalim150
