Skip to content

About

A CLI tool for authoring Git commits that follow the Conventional Commits specification.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

Commit Conventional

npm version Conventional Commits License

A professional, interactive CLI that helps teams create clean, consistent Conventional Commits directly from the terminal.


Project Overview

Commit Conventional streamlines commit creation by guiding developers through a structured prompt flow and validating each part of the message before committing.

It is designed for reliability, clarity, and day-to-day developer productivity in real Git workflows.

Key Highlights

  • Interactive terminal-first commit workflow
  • Enforces Conventional Commit structure and standards
  • Built-in validation for type, scope, subject, body, and breaking changes
  • Safe by design: never stages files automatically
  • Supports preview mode before creating a commit

Why This Project Matters

Consistent commit history improves:

  • Team collaboration and code review quality
  • Changelog generation and release automation
  • Long-term repository maintainability

This tool reduces ambiguity and helps teams adopt a disciplined commit culture with minimal friction.

Requirements

  • Node.js 18+
  • Git
  • Interactive terminal session

Installation

Use directly without global install:

npx commit-conventional

Or install locally / globally:

npm install --save-dev commit-conventional
npm install --global commit-conventional

Usage

  1. Stage your changes:
git add .
  1. Run the CLI:
npx commit-conventional
  1. Review and confirm the generated message.

Tip: run git diff --cached before confirming to verify exactly what is staged.

CLI Options

-h, --help       Show help.
-v, --version    Show the installed version.
    --dry-run    Print the generated message without creating a commit.
-n, --no-verify  Bypass Git hooks for this commit.
  • --dry-run previews the commit message without creating a commit.
  • Git hooks run by default.
  • Use --no-verify only when intentionally bypassing hooks.

Commit Format

<type>(<optional scope>)<optional !>: <subject>

<optional body>

<optional BREAKING CHANGE footer>

Supported commit types:

build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test

Programmatic API

const { buildCommitMessage } = require("commit-conventional");

const message = buildCommitMessage({
  type: "fix",
  scope: "api",
  subject: "handle expired sessions",
});

Development

npm ci
npm test
npm pack --dry-run

npm test runs a strict TypeScript build and the Node.js test suite.

License

ISC

About

A CLI tool for authoring Git commits that follow the Conventional Commits specification.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages