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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@beiyuz/one-commit

v1.2.5

Published

AI-powered automatic commit message generator

Downloads

25

Readme

One-Commit

🚀 AI-powered automatic commit message generator that uses OpenAI to create meaningful commit messages from your git diff.

中文文档 | English

Features

  • 🤖 AI-Generated Commit Messages - Uses OpenAI to analyze your changes and generate descriptive commit messages
  • 📁 Selective File Staging - Choose specific files to stage and commit
  • 🎯 Conventional Commits - Follows conventional commit format (feat:, fix:, docs:, etc.)
  • ⚙️ Configurable - Support for custom OpenAI API keys and base URLs
  • 🔄 Interactive - Review, edit, or regenerate commit messages before committing
  • 📦 Easy to Use - Simple npx command, no installation required

Quick Start

# Run directly with npx (no installation needed)
npx one-commit

# Or install globally
npm install -g one-commit
one-commit

First Time Setup

When you first run one-commit, you'll be prompted to configure your OpenAI settings:

npx one-commit --config

You'll need to provide:

  • OpenAI API Key (required)
  • Base URL (optional, defaults to https://api.openai.com/v1)
  • Model (optional, defaults to gpt-4o-mini)

Usage

Basic Usage

Navigate to your git repository and run:

npx one-commit

The tool will:

  1. Check if you have staged changes
  2. If no staged changes, ask if you want to stage all changes
  3. Generate a commit message using AI
  4. Show you the generated message for review
  5. Allow you to commit, edit, regenerate, or cancel

Configuration

# Configure OpenAI settings
npx one-commit --config

# Show help
npx one-commit --help

Environment Variables

You can also set configuration via environment variables:

export OPENAI_API_KEY="your-api-key"
export OPENAI_BASE_URL="https://api.openai.com/v1"  # optional

Examples

Generated Commit Messages

The AI generates commit messages following conventional commit format:

  • feat: add user authentication system
  • fix: resolve memory leak in data processor
  • docs: update API documentation
  • refactor: simplify error handling logic
  • style: format code with prettier

Interactive Flow

🚀 One-Commit

✨ Generated commit message:
┌─────────────────────────────────────────────────┐
│ feat: add user authentication with JWT tokens  │
└─────────────────────────────────────────────────┘

Files: src/auth.ts, src/middleware.ts (+127 -23)

What would you like to do?
✅ Commit with this message
✏️  Edit message
🔄 Regenerate message
❌ Cancel

Requirements

  • Node.js 18+
  • Git repository
  • OpenAI API key

Configuration Storage

Configuration is stored locally using the conf package:

  • macOS: ~/Library/Preferences/one-commit/config.json
  • Linux: ~/.config/one-commit/config.json
  • Windows: %APPDATA%\one-commit\config.json

Development

# Clone the repository
git clone <repository-url>
cd one-commit

# Install dependencies
npm install

# Build
npm run build

# Run in development mode
npm run dev

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Made with ❤️ for developers who want better commit messages without the hassle.