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

@mitesh_1803/commit-gen

v1.0.12

Published

<div align="center"> <h1>✨ Commit-Gen</h1> <p><b>AI-powered git commit message generator using Gemini API</b></p>

Readme

Tired of writing boring commit messages? Commit-Gen analyzes your staged git changes using a local Ollama LLM (with Gemini as fallback) and generates clean, conventional commit messages. Pick your favorite with arrow keys!


🚀 Features

  • 🤖 Local LLM First: Uses your own Ollama instance on EC2 for privacy and speed
  • ☁️ Gemini Fallback: Automatically falls back to Gemini if Ollama is unavailable
  • 🧠 Smart Analysis: Understands context of your staged git diffs
  • 🎯 Multiple Options: Generates 3 high-quality commit messages to choose from
  • 🕹️ Interactive CLI: Spinners and arrow key prompts via nanospinner and inquirer
  • Quick & Easy: Commit without ever leaving your terminal
  • 🔑 Secure Config: Saves your Gemini API key locally for future use.

📦 Installation

You don't even need to install it! You can run it directly using npx:

npx @mitesh_1803/commit-gen

Alternatively, you can install it globally to use the commit-gen command anywhere:

npm install -g @mitesh_1803/commit-gen

🛠️ Setup & Usage

Option A — Using Ollama (Primary, Recommended)

Run your own local LLM on any server using Ollama(I have used AWS EC2 Instance).

  1. Install Ollama on your server:
curl -fsSL https://ollama.ai/install.sh | sh
  1. Pull the model:
ollama pull qwen2.5-coder:1.5b
  1. Start Ollama on all interfaces:
OLLAMA_HOST=0.0.0.0 ollama serve
  1. Set your Ollama URL in .env:

Option B — Using Gemini (Fallback)

If Ollama is unavailable, the tool automatically falls back to Gemini.

  1. Get your free API key from Google AI Studio
  2. On first run the tool will ask for your key and save it to ~/.commit-gen-config

Running the tool

Stage your changes:

git add .

Run:

commit-gen
# or
npx @mitesh_1803/commit-gen

What happens:

  • Spinner shows while connecting to Ollama
  • If Ollama fails → automatically switches to Gemini
  • Pick from 3 commit messages with arrow keys
  • Press Enter → committed automatically 🎉

4. Follow the Prompts

  • It will read your staged changes and generate a list of commit options.
  • Use your arrow keys to select the perfect commit message.
  • Press Enter, and the tool will automatically commit your changes! 🎉
  • If ollama fail,the CLI will ask for your Gemini API key and securely save it in ~/.commit-gen-config.

📖 CLI Options

Usage: commit-gen [options]

Options:
  --version   Show version number
  --help      Show the help message

⚙️ How it works

  1. Reads your staged changes with git diff --staged
  2. Tries your Ollama instance first (fast, private, local LLM)
  3. If Ollama unavailable → falls back to Gemini API automatically
  4. Returns 3 conventional commit message suggestions
  5. You pick one with arrow keys
  6. Tool runs git commit automatically

🛠️ Built with

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check out the issues page

📄 License

This project is licensed under the ISC License.