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 🙏

© 2025 – Pkg Stats / Ryan Hefner

commit-g

v1.0.1

Published

Generate concise, meaningful Git commit messages with AI assistance powered by Gemini.

Readme

Commit-G 🤖✨

License: MIT npm version

📘 See Docs | 📦 NPM Package

AI-powered Git commit messages using Google’s Gemini – Never write a boring commit message again!

Watch the video


Features 🌟

  • Smart Commit Messages – Generates meaningful messages with Gemini AI
  • 🚀 Conventional Commits – Follows widely accepted commit message conventions
  • 🔍 Context-Aware – Analyzes actual code changes to craft relevant messages
  • 💡 Interactive UI – Choose, edit, or regenerate commit messages seamlessly
  • Fast & Efficient – Commit in seconds with minimal effort
  • 🔧 Highly Configurable – Adaptable to your project’s workflow
  • 🏷️ Prefix Support – Automatically prepend JIRA IDs or custom tags
  • 🎉 Emoji Support – Add expressive emojis to your commit messages

Installation 📦

Install globally:

npm install -g commit-g

Or as a development dependency:

npm install --save-dev commit-g

Usage 🛠️

  1. Stage your changes:
git add .
  1. Run Commit-G:
commitg
  1. Follow the interactive prompts to:
  • ✅ Accept the suggested message
  • ✏️ Edit the message
  • 🔄 Regenerate a new suggestion
  • ❌ Cancel the commit

Configuration ⚙️

Commit-G supports flexible configuration methods:

1. Environment Variables

export GEMINI_API_KEY="your_api_key_here"
export GEMINI_MODEL="gemini-1.5-flash"

2. Configuration File

Create a .commitgrc.json in your project root:

{
  "apiKey": "your_api_key_here",
  "model": "gemini-1.5-flash",
  "maxDiffLength": 10000,
  "emoji": true
}

3. Command-Line Arguments

commitg --api-key your_key --model gemini-1.5-flash --emoji --prefix JIRA-123

Advanced Options 🔧

| Option | Description | Default | | ------------------- | --------------------------------- | ------------------ | | --api-key | Gemini API key | From env/config | | --model | Gemini model to use | gemini-1.5-flash | | --emoji | Enable or disable emojis | false | | --prefix | Add a prefix (e.g., JIRA-123) | false | | --max-diff-length | Max length of git diff to analyze | 10000 |


FAQ ❓

Q: How do I obtain a Gemini API key?

A: You can generate a key from Google AI Studio.

Q: Is my code sent to Google?

A: Yes, the staged code diff is securely sent to the Gemini API to generate commit messages. Make sure this complies with your organization’s privacy policies.

Q: Can I use Commit-G in CI/CD pipelines?

A: Absolutely! You can set the GEMINI_API_KEY as an environment variable in your CI/CD pipeline configuration. Optionally, configure other parameters using environment variables or CLI flags.

Q: How do I add a JIRA ID or custom prefix to the commit message?

A: Use the --prefix option in the CLI, or configure it in .commitgrc.json.

Example CLI usage (recommended):

commitg --prefix JIRA-123

Example in .commitgrc.json:

{
  "prefix": "JIRA-123"
}

Q: How do I enable or disable emoji in commit messages?

A: Use the --emoji flag to enable, or omit it to disable. Example CLI usage:

commitg --emoji

Or in .commitgrc.json:

{
  "emoji": true
}

Q: Does it work with monorepos or large diffs?

A: Yes. To manage performance, use the --max-diff-length option or configure it in .commitgrc.json.

Q: What if I want to use a different Gemini model?

A: You can specify the desired model via the --model flag or in your config file.


Contributing 🤝

Pull requests are welcome! If you have ideas, feature requests, or improvements, feel free to open an issue or submit a Pull Request.


License 📄

MIT License © Shiv Baran Singh


🚀 Stop wasting time on commit messages. Let Commit-G do the heavy lifting for you!