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

@vakharia_heet/aicommit

v0.0.2

Published

AI-powered git commit message generator

Readme

🤖 AICommit

AICommit is a powerful CLI tool that uses either Google's Gemini or OpenAI's GPT models to generate meaningful and descriptive commit messages based on your code changes. It supports conventional commits, emojis, and various customization options.

✨ Features

  • 🤖 Supports both Google Gemini and OpenAI GPT models
  • 🧠 Multiple model options for each provider
    • Gemini: gemini-2.0-flash, gemini-2.0-flash-vision or any other model supported by Google Gemini
    • OpenAI: gpt-4, gpt-4-turbo-preview, gpt-4.1-nano, gpt-4.1-nano-16k or any other model supported by OpenAI
  • 📝 Generates conventional commit messages with appropriate types
  • 🎯 Supports commit scopes and breaking changes
  • 🔄 Amend existing commits
  • 🎨 Emoji support
  • 🎯 File selection for staged changes
  • ⚡ Fast and efficient
  • 🔧 Highly configurable
  • 📊 Verbose mode with timing information
  • 🎯 Interactive commit confirmation
  • 🔄 Custom prompts support

📦 Installation

# Using npm
npm install -g @vakhariaheet/aicommit

# Using yarn
yarn global add @vakhariaheet/aicommit

# Using bun
bun install -g @vakhariaheet/aicommit

🔑 Setup

On first run, AICommit will guide you through the setup process:

  1. Choose your preferred AI provider (Gemini or OpenAI)
  2. Enter your preferred model name (defaults provided)
  3. Enter your API key
  4. Configure default settings

You can also set up manually:

# For Gemini
aicommit config --key YOUR_GEMINI_API_KEY --provider gemini
aicommit config --model gemini-2.0-flash

# For OpenAI
aicommit config --key YOUR_OPENAI_API_KEY --provider openai
aicommit config --model gpt-4.1-nano

📚 Usage

Basic Usage

# Generate commit message for all staged changes
aicommit

# Generate commit message for specific files
aicommit -f "file1.ts file2.ts"

# Generate commit message with emoji
aicommit --emoji

# Generate commit message with scope
aicommit --scope api

# Generate commit message with breaking change
aicommit --breaking

# Generate multiline commit message
aicommit --multiline

# Amend previous commit with new message
aicommit --amend

# Use custom prompt
aicommit --custom-prompt "Your custom prompt here"

# Show timing information
aicommit --verbose

# Push changes after commit
aicommit --push

# Use a specific model for this commit
aicommit --model gemini-2.0-flash

Command Options

Basic Options

-p, --push              # Push changes after commit
-m, --multiline        # Generate detailed commit message
-d, --dry-run         # Show what would be done without changes
-v, --verbose         # Show detailed progress information
-a, --amend           # Amend the last commit

Commit Content

-f, --files <files>    # Space-separated list of files to commit
-t, --use-type        # Include commit type (feat, fix, etc.)
-s, --scope <scope>   # Commit scope (e.g., auth, ui)
-b, --breaking        # Mark as breaking change
-r, --ref <reference> # Add issue/PR reference

Message Style

-e, --emoji           # Include emoji
--custom-prompt      # Custom prompt for AI

Configuration

If you want to change the default values for any option, either you can use the following command or you can directly update the configuration file.

Configuration Commands

Set default values for any option:

# Set defaults
aicommit config --set push true
aicommit config --set emoji true
aicommit config --set multiline true
aicommit config --set scope api

# Change AI model
aicommit config --model gpt-4  # For OpenAI
aicommit config --model gemini-2.0-flash  # For Gemini

# List current defaults
aicommit config --list

# Remove a default
aicommit config --remove push
aicommit config --remove emoji

Commit Types

Supported conventional commit types:

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • style: Code style changes
  • refactor: Code refactoring
  • perf: Performance improvements
  • test: Adding/updating tests
  • build: Build system changes
  • ci: CI configuration changes
  • chore: General maintenance
  • revert: Revert changes

🔧 Configuration File

Configuration is stored in ~/.aicommit as a JSON file with the following structure:

{
  "AI_PROVIDER": "gemini",
  "GEMINI_API_KEY": "your-api-key",
  "OPENAI_API_KEY": "your-openai-key",
  "IS_FREE_ACCOUNT": true,
  "MODEL": "gemini-2.0-flash",
  "defaults": {
    "push": false,
    "multiline": false,
    "verbose": false,
    "emoji": true,
    "scope": null,
    "breaking": false,
    "customPrompt": null,
    "useType": true
  }
}

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch:
    git checkout -b feature/amazing-feature
  3. Install dependencies:
    npm install
  4. Make your changes and test them:
    npm run build
  5. Commit your changes using aicommit:
    npm run dev
  6. Push to your branch:
    git push origin feature/amazing-feature
  7. Open a Pull Request

Development Setup

  1. Clone the repository:

    git clone https://github.com/vakhariaheet/aicommit.git
    cd aicommit
  2. Install dependencies:

    npm install
  3. Create a link for local development:

    npm link
  4. Build and watch for changes:

    npm run build -- --watch

📄 License

MIT License - feel free to use this in your projects!