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

@ai-git/cli

v2.9.0

Published

AI-powered git commit message generator

Readme

AI Git

A CLI tool that leverages AI to automatically generate semantically correct, conventional commits compliant git messages.

Features

  • 🤖 AI-Powered - Analyzes diffs and understands the intent of your changes
  • 📝 Conventional Commits - Strictly adheres to v1.0.0 specification
  • 🎨 Interactive TUI - Beautiful prompts for staging, editing, and confirming
  • 🪙 Token Efficient - Uses TOON to minimize prompt size and cost
  • 🔌 Multiple Providers - Claude Code, Gemini CLI, Codex, OpenRouter, OpenAI, Anthropic, Google AI Studio, Cerebras
  • 🔐 Secure - API keys stored in keychain, never in config files

Installation

npm (Recommended)

npm install -g @ai-git/cli

Also works with bun, pnpm, and yarn.

Homebrew (macOS)

brew tap sadiksaifi/tap/ai-git

Shell Script (macOS/Linux)

curl -fsSL https://ai-git.xyz/install | bash

Build from Source

git clone https://github.com/sadiksaifi/ai-git.git
cd ai-git
bun install
bun run build

Quick Start

Run ai-git in any git repository:

ai-git

On first run, you'll be guided through a quick setup wizard to choose your AI provider.

Settings are saved to ~/.config/ai-git/config.json

Reconfigure: ai-git configure Self-update: ai-git upgrade

Usage

CLI Reference

$ ai-git --help
Usage:
  $ ai-git [command] [options]

AI-powered Conventional Commits

Commands:
  configure                    Set up AI provider and model
  upgrade                      Update ai-git to the latest version

Model:
  --provider <id>              Use a specific AI provider for this run
  --model <id>                 Use a specific model for this run

Workflow:
  -A, --stage-all              Stage all changes before generating
  -C, --commit                 Commit without confirmation
  -P, --push                   Push to remote after committing
  -H, --hint <text>            Guide the AI with additional context
  -X, --exclude <pattern>      Skip files when staging (glob, regex, or path)
  --dangerously-auto-approve   Stage, commit, and push without prompts
  --dry-run                    Preview the prompt without calling the AI

Info:
  -v, --version                Show version
  -h, --help                   Show help

Examples

# Use configured defaults
ai-git

# Override provider for this run
ai-git --provider gemini-cli --model gemini-3-flash-preview

# Use Codex with reasoning effort baked in
ai-git --provider codex --model gpt-5.3-codex-low

# Use OpenRouter
ai-git --provider openrouter --model anthropic/claude-sonnet-4-6

# Exclude files/directories from staging
ai-git -A --exclude "tests/" --exclude "*.test.ts"

# Automated (Be careful!)
ai-git --dangerously-auto-approve --hint "Refactored authentication module"

# Dry run works without installed provider CLI/API key
ai-git --dry-run -A

Supported Providers

| Provider | ID | Type | Requirements | | :--------------- | :----------------- | :--- | :-------------------------------------------------------------------------------------- | | Claude Code | claude-code | CLI | Install CLI | | Gemini CLI | gemini-cli | CLI | Install CLI | | Codex | codex | CLI | Install CLI (npm install -g @openai/codex) | | OpenRouter | openrouter | API | Get API Key | | OpenAI | openai | API | Get API Key | | Google AI Studio | google-ai-studio | API | Get API Key | | Anthropic | anthropic | API | Get API Key | | Cerebras | cerebras | API | Get API Key |

Configure with ai-git configure

Configuration

AI Git uses a three-tier configuration system:

  1. CLI flags (highest priority)
  2. Project config (.ai-git.json)
  3. Global config (~/.config/ai-git/config.json)

Example Configs

{
  "$schema": "https://raw.githubusercontent.com/sadiksaifi/ai-git/main/schema.json",
  "provider": "claude-code",
  "model": "haiku",
  "defaults": {
    "stageAll": false,
    "commit": false,
    "push": false
  }
}
{
  "$schema": "https://raw.githubusercontent.com/sadiksaifi/ai-git/main/schema.json",
  "provider": "openrouter",
  "model": "anthropic/claude-sonnet-4-6"
}

Tip: Add the $schema property for autocomplete and validation in your editor.

Note: API keys are stored securely in keychain, not in config files.

Advanced: Custom Prompts

The default prompt works excellently for most projects. Customize only for project-specific needs like ticket systems, monorepo scopes, or team style preferences.

Customization Options

| Field | Description | Example | | :---------------- | :----------------------------------------- | :-------------------------------------------------- | | prompt.context | Project-specific information | "React Native app. Jira tickets: PROJ-123" | | prompt.style | Style/format preferences | "Always include scope. Keep body under 5 points." | | prompt.examples | Custom commit examples (replaces defaults) | Array of commit message strings |

Example: Monorepo with Scopes

{
  "$schema": "https://raw.githubusercontent.com/sadiksaifi/ai-git/main/schema.json",
  "provider": "claude-code",
  "model": "sonnet",
  "prompt": {
    "context": "Monorepo with packages: web, mobile, shared, api, docs, infra.",
    "style": "Always use a scope from the valid list. Reference PR numbers in footer."
  }
}

Example: Custom Commit Format

{
  "prompt": {
    "examples": [
      "feat(auth): add SSO integration\n\n- implement SAML 2.0 authentication\n- add identity provider configuration\n- support multiple IdP connections\n\nRefs: PROJ-456",
      "fix(api): resolve rate limiting bypass\n\n- add per-user rate limit tracking\n- implement sliding window algorithm\n- add rate limit headers to responses"
    ]
  }
}

Note: Only provide examples if you have very specific formatting requirements.

Development

# Install dependencies
bun install

# Run in development
bun run dev

# Test prompt generation without AI call
bun run dev --dry-run -A

# Disable update-check network calls (useful for tests/CI)
AI_GIT_DISABLE_UPDATE_CHECK=1 bun test

# Type check
bun run typecheck

# Build binary
bun run build

See CONTRIBUTING.md for contribution guidelines.

License

MIT