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

@hamzarafique964/git-commit-gen

v3.0.0

Published

CLI tool to generate Git commit messages

Downloads

39

Readme

git-commit-gen 📝✨

A CLI tool to generate standardized Git commit messages with ease.

npm version License: MIT

Features

  • 🚀 Interactive prompt for commit messages
  • 🔍 Commitlint integration for validation
  • 🛡️ Husky hooks for automatic commit message validation
  • 📋 Smart staging area management
  • 🎨 Colorful terminal output with chalk
  • ⚡ Fast and lightweight
  • 🔧 Works with any Git repository
  • Conventional Commits standard compliance

Installation

npm install -g @hamzarafique964/git-commit-gen

For project-specific setup (recommended):

 # Install as dev dependency
npm install --save-dev @hamzarafique964/git-commit-gen

# Set up commitlint and husky (optional)
npx commitlint --install
npm install -g @hamzarafique964/git-commit-gen

Usage

Basic Usage

git-commit-gen

Advanced Usage with Staging

The tool automatically detects unstaged changes and lets you:

  • Stage all changes at once
  • Select specific files to stage
  • Skip staging if needed
  • Stage your changes:

Full Workflow Example

# Make some changes to your files
echo "console.log('new feature');" >> feature.js

# Run the commit wizard
git-commit-gen

# Follow the interactive prompts:
? Select commit type: (Use arrow keys)
❯ feat: A new feature
  fix: A bug fix 
  docs: Documentation changes
  chore: Maintenance tasks
  style: Code style changes
  refactor: Code refactoring
  test: Adding tests

? Enter commit message: add new authentication system

🔍 Validating commit message...
✓ Commit message validated!

📝 Generated: "feat: add new authentication system"
? Proceed with commit? Yes
✔ Committed successfully!

Commit Types Supported

  • feat - A new feature
  • fix - A bug fix
  • docs - Documentation changes
  • chore - Maintenance tasks
  • style - Code style changes (formatting, etc.)
  • refactor - Code refactoring
  • test - Adding or updating tests

Integration with Commitlint & Husky

The package includes built-in support for commit message validation:

Manual Validation

# Test a commit message
echo "feat: add new feature" | npx commitlint

Automatic Validation with Husky

When installed in a project, it sets up Husky hooks to automatically validate commit messages.

Configuration

Create a commitlint.config.js file in your project root:

module.exports = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [2, 'always', [
      'feat', 'fix', 'docs', 'chore', 'style', 'refactor', 'test'
    ]]
  }
};

Example Commit Messages

✅ Valid:

  • feat: add user authentication
  • fix: resolve login timeout issue
  • docs: update API documentation

❌ Invalid:

  • added new stuff (missing type)
  • fix: (missing description)
  • FEAT: add feature (uppercase type)

Troubleshooting

If you get Husky pre-commit errors:

# Add a test script to package.json
npm pkg set scripts.test="echo 'No tests'"

# Or skip hooks temporarily
git commit --no-verify

If commitlint is not installed:

npm install --save-dev @commitlint/cli @commitlint/config-conventional

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT © Hamza Rafique