Skip to content
gitcomm.

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.

01 / What it does

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
02 / A run, start to finish

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

bash
npx gitcomm -t feat -s auth
npx gitcomm
◆  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
○ Cancel
03 / Install

Per command, no install.

npx gitcomm

Or install once and call gitcomm from anywhere.

npm install -g gitcomm

Node.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.

bash
npm install --save-dev gitcomm
04 / Read next

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.