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

my-commit

v0.1.2

Published

๐Ÿค– AI-powered Git commit message generator with interactive selection

Readme

๐Ÿค– my-commit

AI-powered Git commit message generator with interactive selection

npm version License: MIT

Transform your Git workflow with AI-generated commit messages that follow conventional commit standards. Choose from multiple AI backends and enjoy a beautiful interactive interface powered by fzf.

โœจ Features

  • ๐Ÿค– Multiple AI Backends: OpenCode, Ollama
  • ๐ŸŽฏ Interactive Selection: Beautiful fzf interface with keyboard shortcuts
  • ๐Ÿ“ Multiple Commit Modes: Quick, detailed, or manual editing
  • ๐ŸŒ Cross-Platform: Works on macOS, Linux, and Windows (Git Bash/WSL)
  • โšก Fast & Efficient: Generates 5 contextual commit message options
  • ๐ŸŽจ Rich Preview: See diff stats and changes before committing
  • ๐Ÿ“‹ Conventional Commits: Follows industry-standard commit message format

๐Ÿš€ Quick Start

# Install globally
npm install -g my-commit

# Stage your changes
git add .

# Generate and select commit message
my-commit

๐Ÿ“ฆ Installation

Global Installation (Recommended)

npm install -g my-commit

Prerequisites

my-commit requires the following dependencies:

  • Git - Version control system
  • fzf - Interactive fuzzy finder
  • AI Backend - At least one of:

Platform-Specific Setup

# Install dependencies with Homebrew
brew install git fzf

# Install OpenCode (recommended)
# Visit https://opencode.dev for installation

# OR install Ollama for local AI
brew install ollama
ollama serve  # Run in background
ollama pull llama3.1:8b

# Install my-commit
npm install -g my-commit
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install git fzf curl

# RHEL/CentOS/Fedora
sudo dnf install git fzf curl

# Arch Linux
sudo pacman -S git fzf curl

# Install Ollama (optional)
curl -fsSL https://ollama.ai/install.sh | sh
ollama serve &
ollama pull llama3.1:8b

# Install my-commit
npm install -g my-commit
# Using Chocolatey
choco install git fzf

# Using Scoop
scoop install git fzf

# Using winget
winget install Git.Git junegunn.fzf

# Install my-commit in Git Bash or PowerShell
npm install -g my-commit

๐ŸŽฎ Usage

Basic Usage

# Stage your changes
git add .

# Run my-commit
my-commit

Interactive Interface

When you run my-commit, you'll see an interactive menu with:

  • ๐Ÿš€ Enter: Quick commit (fastest)
  • ๐Ÿ“ Tab: Generate detailed commit body with AI
  • โœ๏ธ Ctrl-E: Edit message in your default editor
  • โŒ Esc: Cancel operation

Command Line Options

my-commit [options]

Options:
  -b, --backend <name>    AI backend (opencode, ollama)
  -d, --dry-run          Show generated messages without committing
  -v, --verbose          Enable verbose output
  -t, --template <path>  Use custom commit message template
  -c, --config <path>    Use custom configuration file
  -h, --help             Display help information
  --version              Show version number

Commands:
  backends               List available AI backends

Examples

# Use specific AI backend
my-commit --backend ollama

# Dry run to see generated messages
my-commit --dry-run

# Verbose output for debugging
my-commit --verbose

# List available backends
my-commit backends

๐Ÿง  AI Backends

my-commit supports multiple AI backends with automatic fallback:

1. OpenCode (Recommended)

# Install from https://opencode.dev
# No additional configuration required

2. Ollama (Local AI)

# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh  # Linux/macOS
# or visit https://ollama.ai for Windows

# Start Ollama service
ollama serve

# Pull a model
ollama pull llama3.1:8b

๐Ÿ“‹ Commit Message Format

my-commit generates messages following the Conventional Commits specification:

<type>: <description>

[optional body]

[optional footer(s)]

Common Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

Example Generated Messages

feat: Add user authentication with JWT tokens
fix: Resolve memory leak in image processing pipeline
docs: Update API documentation for v2.0 endpoints
refactor: Extract database utilities into separate module
style: Apply ESLint formatting rules to components

๐Ÿ› ๏ธ Configuration

Environment Variables

# Editor preference (for edit mode)
export EDITOR="code"  # VS Code
export EDITOR="vim"   # Vim
export EDITOR="nano"  # Nano

Custom Templates (Future Feature)

# Use custom commit template
my-commit --template ~/.config/my-commit/template.txt

๐Ÿ”ง Troubleshooting

Common Issues

"No AI backend available"

  • Install OpenCode from https://opencode.dev
  • OR set up Ollama: ollama serve && ollama pull llama3.1:8b

"fzf not found"

  • macOS: brew install fzf
  • Linux: sudo apt-get install fzf
  • Windows: choco install fzf

"Not a git repository"

  • Run git init to initialize a repository
  • Ensure you're in the correct directory

"No staged changes"

  • Run git add . to stage all changes
  • Or git add <specific-files> for selective staging

Debug Mode

# Enable verbose output
my-commit --verbose

# Check backend availability
my-commit backends

# Test without committing
my-commit --dry-run

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and test thoroughly
  4. Run the linter: npm run lint
  5. Submit a pull request

Development Setup

# Clone the repository
git clone https://github.com/username/my-commit.git
cd my-commit

# Install dependencies
npm install

# Build TypeScript
npm run build

# Test locally
npm link
my-commit --help

Adding New AI Backends

To add a new AI backend:

  1. Implement the AIBackend interface in src/ai-backends.ts
  2. Add your backend to the BackendRegistry
  3. Update documentation and tests

๐Ÿ“Š Roadmap

  • [ ] Custom Templates: User-defined commit message templates
  • [ ] Team Configurations: Shared commit styles across teams
  • [ ] Git Hooks Integration: Automatic commit message validation
  • [ ] Commit Analytics: Track commit patterns and suggestions
  • [ ] Plugin System: Extensible architecture for custom backends
  • [ ] Configuration File: .my-commit.json for project-specific settings

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support


Made with โค๏ธ for developers who care about clean Git history