cmit is a lightweight, elegant CLI tool that makes your Git commit workflow faster, cleaner, and more consistent.
It provides an interactive staging and commit experience, enforcing good commit hygiene while staying simple to use.
-
🚀 Interactive commit flow Stage/unstage files, choose type, write messages — all in a guided UI.
-
⚡ Quick mode (
-q) Commit instantly without UI:cmit -q feat "Add login button" "Additional optional description" -
🔒 Safe commits
- Detects merge conflicts
- Prevents empty commits
- Protects against broken Git hooks
- Warns if nothing is staged
-
📌 Supports amend (
--amend) -
📤 Optional auto-push (
--push) Or enable autoPush in config. -
🔧 Custom commit types via config (
cmitconfig file) -
📊 Tracks your usage stats in
.cmit-stats.json -
🧩 Small & dependency-light No complex configs or global setup needed.
npm install -g cmitnpx cmitnpm install cmit --save-devRun it via:
npx cmitRunning cmit without arguments opens the full interactive mode:
cmit- File staging (stage / unstage)
- Selecting commit type
- Writing commit message
- Optional description
- Preview commit before finishing
If you want to bypass the UI:
cmit -q <type> <message> [description]Examples:
cmit -q fix "Correct path bug"
cmit -q feat "Add search API" "Supports pagination + caching"| Flag | Description |
|---|---|
-q, --quick |
Quick commit mode |
--push |
Push after committing |
--amend |
Amend previous commit |
--ai |
Reserved for future AI-based commit generation |
-h, --help |
Show help |
-v, --version |
Show version |
cmit auto-detects a configuration file using cosmiconfig.
You may create any of the following:
cmit.config.js.cmitrc.cmitrc.json.cmitrc.yaml
{
"types": {
"feat": "new feature",
"fix": "bug fix",
"refactor": "code refactor",
"deps": "dependency update",
"perf": "performance improvement"
},
"emoji": false,
"autoScope": false,
"lintBefore": false,
"aiEnabled": false,
"autoPush": false
}cmitcmit -q chore "Update ignore patterns"cmit --amendcmit --pushcmit -q fix "Crash fix" --pushPlanned enhancements:
- 🧪 Pre-commit lint support
- 🧩 Scopes auto-detection (folder-based)
- 📝 Conventional Commit validation
- 📤 Auto-changelog generator
- 🌈 Emoji mode
- ⚡ CI integration for status checks
You can request or vote for features in the Upcoming Issues tab.
Click Fork in GitHub.
git clone https://github.com/<your-username>/cmit
cd cmitgit checkout -b feat/new-featurenpm installnpm run devnpx cmitgit push origin feat/new-featureThen open a PR targeting:
test branch
I will review PRs quickly and provide feedback.
Before opening a PR:
-
Run the CLI locally
-
Test both interactive + quick modes
-
Ensure no crashes on invalid scenarios
-
Test amend + push flow
-
Run TypeScript compiler
npm run build
If this project helps your workflow, consider starring ⭐ the repo — it really helps!
For issues or suggestions, check the Issues tab.