npm package · node ≥ 20.12
gitcomm.
gitcomm reads your staged diff and your commit history, then suggests messages that sound like they came from you. You pick one, and it commits for you.
npx gitcomm- 01
Reads your history
Conventional Commits, plain sentences, English or Indonesian, emoji or none. Suggestions match.
- 02
Redacts before sending
Lockfiles and generated files skipped, diffs truncated, secret patterns stripped.
- 03
Works with no network
The same rule-based engine answers when the service is down or rate limited.
Commit messages usually go wrong in one of two ways: too vague to read six months later, or too detailed to scan.
gitcomm sends a small, redacted slice of your staged diff together with a style summary pulled from your recent commits. It classifies each staged file by role first, so it knows a controller from a migration, and it can propose a scope without being told one.
You get a short list. Take the first one, take another, or write your own. The commit runs through your own Git, so hooks, config, and signing behave exactly as they normally would.
Detected style
- Conventional Commits or plain sentences
- English, Indonesian, or mixed
- Subject length and capitalisation
- Emoji prefixes, if you use them
- Scopes inferred from directory names
Stage what belongs in the commit, then run gitcomm. It prints what it read before it asks anything, so a misread is visible before you commit to an answer.
Hints come from the diff: a new controller and model in an app/ tree reads as feat with a scope. Force either when detection guesses wrong.
Force it yourself
npx gitcomm -t feat -s auth◆ gitcomm
┌─ repository status ────────────────────────────────┐
│ branch: main │
│ 4 staged file(s) │
│ A app/Http/Controllers/TaskController.php ctrl │
│ A app/Models/Task.php model │
│ M routes/web.php route │
│ M composer.lock deps │
│ hints: type=feat, scope=task │
│ style: conventional commits, en, subject <= 72 chars│
└─────────────────────────────────────────────────────┘
◆ Choose a commit message:
● feat(task): add task controller and model
○ feat(task): implement task CRUD with controller, model, and routing
○ feat(task): scaffold task module with controller and eloquent model
○ Write my own message
○ CancelPer command, no install.
npx gitcommOr install once and call gitcomm from anywhere.
npm install -g gitcommNode.js 20.12 or newer. No native modules, no config file.
For a team, pin it as a dev dependency so everyone commits the same way.
npm install --save-dev gitcomm- 01Getting StartedWhat gitcomm does, what it needs from you, and how a single command turns a staged diff into a committed change.
- 02Commit AnatomyThe parts of a commit message, what belongs in each one, and the rules that make a subject readable six months later.
- 03InstallationInstall gitcomm for a single run, globally, or as a project dependency. Node 20.12 or newer is required.
- 04UsageThe commit flow end to end: choosing what to stage, reviewing suggestions, adding a body, and pushing.
- 05CommandsEvery flag gitcomm accepts, grouped by staging, committing, suggestions, language, debugging, and general options.
- 06Commit TypesThe ten Conventional Commit types gitcomm can emit, when each one applies, and an example of each.
- 07Safety & PrivacyWhat gitcomm sends to the suggestion service, what it strips first, and how to keep everything local.
Ready to try it? Start with getting started, or read how your code leaves the machine on the safety and privacy page first. Prefer reading source? It is on GitHub.
Write commit easily with gitcomm.
A commit message is the only documentation that is guaranteed to be read by the person who needs it, usually urgently.