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

@julianabot/ai-commit

v1.1.7

Published

Free AI-powered conventional commit message generator using Gemini Flash as default

Downloads

988

Readme

ai-commit 🤖

An AI-powered conventional commit message generator. Stage your changes, run ai-commit generate, and get an instant commit message that follows the Conventional Commits spec. Confirm, edit, or cancel — you're always in control.


ai-commit demo


Features

  • Instant commit messages — analyzes your staged diff and generates a meaningful message
  • 📋 Conventional Commits — always follows type: description format
  • 🔄 Swappable AI providers — Gemini (free), OpenAI, or Claude
  • 🎛️ Configurable — customize commit types, scope rules, and message length
  • ✏️ Always editable — confirm, edit, or cancel before anything is committed
  • 🏠 Per-project overridesai-commit init --local generates .commitrc.json for team-specific conventions
  • 🎫 Ticket number support — auto-extracts Jira, GitHub, or custom ticket numbers from your branch name

Quick Start

npm install -g @julianabot/ai-commit
ai-commit init
ai-commit generate

Getting Started

1. Install

npm install -g @julianabot/ai-commit

2. Get a free Gemini API key

  1. Go to https://aistudio.google.com/app/apikey
  2. Sign in with a Google account
  3. Click Create API Key
  4. Copy the key (starts with AIza...)

Free tier: 15 requests/min, 1 million tokens/day

3. Run global setup

ai-commit init

This walks you through:

✔ Which AI provider? › Gemini Flash (free tier available) — recommended
✔ Enter your gemini API key › AIza...
✔ Commit types (comma separated) › feat, fix, docs, style, refactor, test, chore
✔ Require a scope in commit messages? › No
✔ Maximum commit message length › 72
✅ Config saved to ~/.ai-commit/config.json

4. (Optional) Set up per-project config

cd your-project
ai-commit init --local

This generates a .commitrc.json in the current directory. Commit it to share conventions with your team.

✔ Commit types (comma separated) › feat, fix, docs, style, refactor, test, chore
✔ Require a scope? › No
✔ Max message length › 72
✔ Does this project use ticket numbers? › Yes
✔ What ticket format? › Jira style (e.g. PROJ-12345)
✔ Enter your ticket prefix › PROJ
✅ Local config saved to .commitrc.json

5. Generate your first commit

git add .
ai-commit generate
✔ Commit message generated!

Generated commit message:
feat: add OAuth2 login with Google provider

✔ What would you like to do? › ✅ Confirm — commit as is
[main a03e3f3] feat: add OAuth2 login with Google provider
✅ Committed successfully!

Ticket Number Support

If your project uses ticket numbers (Jira, GitHub issues, or custom), ai-commit automatically extracts them from your branch name.

How it works

Name your branch after your ticket:

git checkout -b PROJ-12345-add-login-page

Then run ai-commit generate — it finds PROJ-12345 automatically:

✔ Ticket number found: PROJ-12345 — use it? ✅ Yes, use PROJ-12345

Generated commit message:
PROJ-12345 feat: add OAuth2 login with Google provider

If the ticket isn't in your branch name, it asks you to type it manually — or skip it entirely.

Supported formats

| Format | Example | Config | | ------------- | ------------ | ------------------------------------------------------- | | Jira style | PROJ-12345 | ticketFormat: "jira", ticketPrefix: "PROJ" | | GitHub issues | #123 | ticketFormat: "github" | | Custom regex | anything | ticketFormat: "custom", ticketRegex: "your-pattern" |

Set up ticket support with:

ai-commit init --local

Commands

| Command | Description | | ------------------------ | ------------------------------------------------- | | ai-commit init | Global setup wizard (API key, provider, defaults) | | ai-commit init --local | Per-project setup (generates .commitrc.json) | | ai-commit generate | Generate a commit message from staged changes |


Configuration

Global config (~/.ai-commit/config.json)

Set up once with ai-commit init. Works across all your projects.

{
  "provider": "gemini",
  "apiKey": "your_api_key",
  "commitTypes": ["feat", "fix", "docs", "style", "refactor", "test", "chore"],
  "requireScope": false,
  "maxLength": 72
}

Per-project config (.commitrc.json)

Generated by ai-commit init --local. Local config wins over global.

{
  "commitTypes": ["feat", "fix", "docs", "infra", "db"],
  "requireScope": true,
  "maxLength": 100,
  "ticketFormat": "jira",
  "ticketPrefix": "PROJ"
}

Commit this file to share conventions with your team.


Swapping AI Providers

Run ai-commit init again and select a different provider. Or edit ~/.ai-commit/config.json directly:

{
  "provider": "openai",
  "apiKey": "sk-..."
}

| Provider | Model | Notes | | -------- | ------------------------ | --------------------------------- | | gemini | gemini-2.5-flash | Free tier available — recommended | | openai | gpt-4o | Requires paid API access | | claude | claude-sonnet-4-20250514 | Requires paid API access |


How It Works

git add .
    ↓
ai-commit generate
    ↓
git diff --staged        ← reads your staged changes
    ↓
Diff Processor           ← filters lock files, binaries; truncates large diffs
    ↓
Ticket Extractor         ← finds ticket number from branch name (if configured)
    ↓
AI Provider              ← sends clean diff + your config to the AI
    ↓
Conventional commit      ← you confirm, edit, or cancel
    ↓
git commit -m "..."      ← committed!

Why process the diff before sending to AI? Lock files, binaries, and generated files are noise. A package-lock.json change adds thousands of lines that tell the AI nothing useful. The diff processor filters them out and truncates large files so you never hit token limits.


Contributing

PRs welcome. To add a new AI provider:

  1. Create src/services/providers/myProvider.ts implementing AIProvider
  2. Add a case in src/services/aiService.ts
  3. Add it as a choice in src/commands/init.ts

Troubleshooting

Permission denied on install (Mac/Linux)

If you get an EACCES error when installing globally, either use sudo:

sudo npm install -g @julianabot/ai-commit

Or fix npm permissions permanently so you never need sudo for global installs:

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

Then install normally:

npm install -g @julianabot/ai-commit

Node version warning

If you see a warning about mute-stream requiring a newer Node version, update Node to v20.17.0 or higher:

# using nvm
nvm install 20.17.0
nvm use 20.17.0

License

MIT © julianabot