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

@vedanshsharma/commit-gen

v1.0.6

Published

CLI to generate Conventional Commits using local LLMs or Gemini

Readme

🚀 Commit Message Generator (commitgen)

A lightning-fast, offline-first CLI tool that reads your staged git diffs and automatically generates professional Conventional Commits using locally running LLMs (via Ollama).

(Replace this text with a Demo GIF once recorded)

✨ Why this tool?

  • 100% Offline & Private: Uses local LLMs. Your source code never leaves your machine.
  • Zero API Costs: No OpenAI/Anthropic API keys needed.
  • Professional History: Strictly adheres to the Conventional Commits specification.
  • Gitmoji Support: Optional built-in support for prepending emojis (✨, 🐛, ♻️) to your commits.
  • Smart Issue Linking: Automatically appends Closes #ISSUE to your commits based on your current branch name.
  • Lightning Fast: Generates and commits in seconds without disrupting your terminal flow.

🛠 Prerequisites

  1. Node.js (v18+ recommended for native fetch).
  2. Ollama - You must have Ollama installed and running locally.
  3. LLM Model - Download your preferred model (default is mistral):
    ollama pull mistral

📦 Installation

To install this tool globally on your machine so you can use it in any repository:

npm install -g @vedanshsharma/commit-gen

🚀 Usage

Whenever you have changes ready to commit:

  1. Stage your files as usual:

    git add <files>
  2. Run the CLI:

    commitgen
  3. The AI-generated commit message will be presented in a styled box. You can then:

    • Accept and Commit instantly
    • Regenerate if you want a different variation
    • Edit Manually to tweak the generated message inline
    • Cancel to abort without committing

Command Options

  • Change Model: Specify a different Ollama model (defaults to mistral).

    commitgen --model llama3.2
  • Dry Run: Generate and preview the message without actually running git commit.

    commitgen --dry-run
  • Gemini Fallback: Use the Gemini API instead of local Ollama (requires the GEMINI_API_KEY environment variable).

    commitgen --gemini
  • Configure Defaults: Interactively set your default model so you don't have to pass the --model flag every time. This saves your preference to ~/.commitgen/config.json.

    commitgen config
  • Git Hook Integration: Automatically run the AI whenever you type git commit in your terminal! Run this command inside any git repository to install the prepare-commit-msg hook:

    commitgen install-hook

🏗 Tech Stack

  • JavaScript / Node.js ES Modules
  • Commander.js - CLI command orchestration
  • Inquirer.js (Classic) - Interactive prompts
  • Chalk - Premium terminal styling
  • Native Node Fetch & Child_Process - Zero bloat system integration