npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

commit-name-generator

v1.0.2

Published

Generate Conventional Commit messages from Git changes

Readme

Commit Message Generator

A TypeScript command-line tool that analyzes Git changes and suggests a Conventional Commit message.

It can inspect staged and unstaged changes and open the generated message in VS Code's Git commit editor.

Features

Detects changes in the current Git repository

Suggests Conventional Commit messages

Recognizes feature, fix, test, documentation, and dependency changes

Supports staged and unstaged changes

Opens the suggested message in VS Code for editing

Works through npx or a global npm installation

Requirements

Node.js 18 or newer

Git

VS Code when using the --edit option

Installation

Install the package globally:

npm install --global @tahakoko/commit-name-generator

Run the package without installing it:

npx @tahakoko/commit-name-generator

If the package is published without an npm scope, use commit-name-generator instead of @tahakoko/commit-name-generator.

Usage

Stage the files you want to commit:

git add .

Generate a commit message:

commit-name-generator

Example output:

Changes detected. Suggested commit: feat: add new functionality

Open the message in VS Code

Use the --edit option:

commit-name-generator --edit

Edit the message if needed, save the file, and close the editor. Git completes the commit after the editor closes.

Analyze unstaged changes

Use --all to analyze changes that have not been staged:

commit-name-generator --all

Combine --all and --edit to stage all detected changes and open the generated message in VS Code:

commit-name-generator --all --edit

CLI Options

Option

Short option

Description

--all

-a

Analyze unstaged changes

--edit

-e

Open the generated message in VS Code's Git editor

--help

-h

Display command help

--version

-V

Display the installed version

Examples

Generate a message from staged changes:

git add src/index.ts commit-name-generator

Open the generated message in VS Code:

git add . commit-name-generator --edit

Analyze all current changes and commit them through VS Code:

commit-name-generator --all --edit

Possible suggestions include:

feat: add new functionality fix: resolve application issue test: update test coverage docs: update documentation chore: update project dependencies chore: update project files

Local Development

Clone the repository:

git clone https://github.com/tahakourani-t/commit-message-generator.git cd commit-message-generator

Install the dependencies:

npm install

Run the CLI directly from TypeScript:

npm run dev

Build the package:

npm run build

Run the tests:

npm test -- --run

Link the package globally for local testing:

npm link commit-name-generator --help

Preview the files that will be included in the npm package:

npm pack --dry-run

Publishing

Log in and confirm your npm account:

npm login npm whoami

Build and test the package:

npm run build npm test -- --run

Publish the package:

npm publish --access public

For a future patch release:

npm version patch npm publish --access public

Use npm version minor for new backward-compatible features and npm version major for breaking changes.

Conventional Commit Format

Generated messages follow this structure:

type(scope): description

Common types:

feat: a new feature

fix: a bug fix

docs: documentation changes

test: test changes

refactor: code restructuring without a feature or bug fix

chore: maintenance, tooling, or dependency changes

Troubleshooting

Error: Not a Git Repository

Run the command inside a Git repository:

git init

No Staged Changes Found

Stage your changes and try again:

git add . commit-name-generator

Alternatively, analyze unstaged changes:

commit-name-generator --all

VS Code Does Not Open

Make sure the code command is available:

code --version

On macOS, open the VS Code Command Palette and choose Shell Command: Install 'code' command in PATH.

On Windows, rerun the VS Code installer and enable the option to add VS Code to PATH.

Repository

https://github.com/tahakourani-t/commit-message-generator

Author

Taha Kourani

License

MIT