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

penmit

v2.0.1

Published

AI-powered git commit message generator using Ollama, Anthropic, or OpenAI

Readme

penmit

License: MIT npm version Node.js >= 22 CI

penmit = pen + commit - a portmanteau for writing commit messages.

AI-powered git commit message generator that writes conventional commit messages from your staged diff. Supports Ollama (local and cloud), Anthropic, and OpenAI.

$ git add .
$ penmit

Provider: Local (Ollama) - Model: llama3.2
⠸ Generating commit message

  feat: add user authentication with JWT support

  Accept (a/Enter), Regenerate (r), Edit (e), Esc/Ctrl+C to cancel:  > _

Features

  • Local-first - any Ollama model, fully offline, no data leaves your machine
  • Cloud support - Ollama Cloud, Anthropic (Claude), or OpenAI; keys go directly to the provider, never to any penmit server
  • No vendor lock-in - switch providers anytime with a single flag
  • Staged diff only - only reads what you've staged; never touches your full repo
  • Zero workflow changes - just replace git commit with penmit
  • Interactive prompt - accept, regenerate, or edit the message before committing
  • Conventional commits - output follows the type: description format
  • Setup wizard - remembers your provider and model preference
  • Zero runtime dependencies - a single binary with no node_modules at runtime
  • Open source - MIT licensed and fully auditable on GitHub

Note: The quality of the generated commit message depends entirely on the model you choose. Smaller or less capable models may produce vague, overly long, or incorrectly formatted messages. If the output looks off, try regenerating or switch to a more capable model.

Requirements

Installation

npm install -g penmit

Quick Start

Local mode (Ollama)

  1. Install and start Ollama - follow the official Ollama installation guide.

  2. Pull a model (browse the Ollama library for all available models):

    ollama pull llama3.2
  3. Stage your changes and run:

    git add .
    penmit

    On first run, a setup wizard walks you through picking a provider and model. Your choice is saved and reused next time.

Ollama Cloud mode

Set your Ollama Cloud API key and run:

export OLLAMA_API_KEY=your_key_here
git add .
penmit

Or pass it inline for a one-off:

OLLAMA_API_KEY=your_key penmit

Anthropic (Claude)

Set your Anthropic API key and run:

export ANTHROPIC_API_KEY=your_key_here
git add .
penmit

Or pass it inline:

ANTHROPIC_API_KEY=your_key penmit

OpenAI (Codex / GPT)

Set your OpenAI API key and run:

export OPENAI_API_KEY=your_key_here
git add .
penmit

Or pass it inline:

OPENAI_API_KEY=your_key penmit

Usage

penmit [options]

Options:
  -m, --model <name>   Model to use (overrides saved default for this run)
  --local              Use local Ollama for this run
  --cloud              Use Ollama Cloud for this run
  --anthropic          Use Anthropic (Claude) for this run
  --openai             Use OpenAI for this run
  --setup              Re-run the setup wizard to change saved defaults
  --reset              Delete saved settings and return to defaults
  -y, --yes            Skip confirmation prompt (use with --reset)
  -v, --version        Print version
  -h, --help           Show this help

Examples

# Use your saved defaults
penmit

# Override the model for this run only
penmit --model mistral

# Force Ollama Cloud with a specific model
penmit --cloud --model devstral-2

# Use Anthropic for this run
penmit --anthropic

# Use OpenAI with a specific model
penmit --openai --model gpt-4o

# Re-run setup to switch provider or model
penmit --setup

# Delete saved settings entirely
penmit --reset

# Delete saved settings without confirmation
penmit --reset --yes

Environment Variables

| Variable | Description | |---------------------|----------------------------------------------------------------------| | ANTHROPIC_API_KEY | Enables Anthropic (Claude). Overrides saved provider to anthropic. | | OPENAI_API_KEY | Enables OpenAI. Overrides saved provider to openai. | | OLLAMA_API_KEY | Enables Ollama Cloud. Overrides saved provider to cloud. | | OLLAMA_HOST | Custom local Ollama address (default: localhost:11434). | | DEBUG=1 | Print raw request/response payloads for troubleshooting. |

Configuration

Provider and model preferences are saved to a config file after the first interactive run:

| Platform | Path | |----------------|--------------------------------------| | macOS / Linux | ~/.config/penmit/config.json | | Windows | %APPDATA%\penmit\config.json |

To change your saved defaults, re-run the setup wizard:

penmit --setup

To delete your saved settings entirely and start fresh:

penmit --reset

Interactive Prompt

After a commit message is generated, you are given three options:

| Key | Action | |----------------------|--------------------------------------| | a / A / Enter | Accept and run git commit -m "..." | | r / R | Regenerate with the same model | | e / E | Edit the message in a prompt | | Esc / Ctrl+C | Cancel and exit |

Contributing

Contributions are welcome. Please open an issue first to discuss significant changes.

git clone https://github.com/iAmmar7/penmit.git
cd penmit
npm install
npm run build
npm test

License

MIT