ContributeNode.js, Inquirer

CLI for Describing Conventional Commits

Added breaking-change and scope/context support to an existing CLI utility.

The Problem

Browsing GitHub, I stumbled onto a random repository — and figured it had been a while since I’d contributed to open source.

It turned out to be conventional-commit-cli by Paritosh Pundir (@Paari) — an interactive terminal wizard for writing commits to the Conventional Commits spec, with type selection, gitmoji, and a message preview before committing.

The project was missing two things from the spec itself: a breaking-change marker (! before the colon) and scope/context (feat(auth): ...).

What I Added

Implemented two new wizard steps:

  • a breaking-change question — answering yes prepends ! to the commit prefix;
  • entering a context in parentheses, substituted as type(context): message.
? Are you introducing a breaking change? (y/N)
? Enter the context of this commit (optional):

Both steps are optional — if you don’t need either one, the wizard moves on without them, without breaking the existing flow.

How to Run

npm i c-commit-cli -g

Then, in any directory with staged changes:

commit