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

commit-pr-generator

v1.0.1

Published

CLI tool that automates commit messages and pull request descriptions using AI. Follows Conventional Commits format and supports multiple AI platforms.

Readme

Commit & PR Generator 🤖📝

npm version License: MIT Node.js Version

commit-pr-generator is a powerful CLI tool that automates the creation of professional commit messages and pull request descriptions. It intelligently analyzes your code using git diff following Conventional Commits standards and integrates seamlessly with AI platforms to help you create perfect documentation.

🌟 Key Features

  • Intelligent Change Analysis - Automatically captures and formats your git diff output
  • AI-Powered Assistance - Generates commit messages and PR descriptions with AI support
  • Multi-Language Support - Responses in English (default) or Spanish
  • Customizable Exclusions - Ignore unnecessary files (configurable via .prignore)
  • Multi-Platform Support - Works with ChatGPT, DeepSeek, and Gemini
  • Simplified Workflow - Saves results in markdown files as history
  • Conventional Commits - Follows industry-standard format for commit messages
  • Enhanced Interactive Mode - Clear interface for selecting processes
  • Smart Fallback System - Uses clipboard and browser when API keys are not available
  • Dynamic Menu - Adapts options based on available API keys

🔑 API Configuration

The tool supports three AI platforms. You can configure API keys for real AI responses or use clipboard fallback when API keys are not available.

Supported Platforms

| Platform | API Key Required | Fallback | |----------|------------------|----------| | 🤖 ChatGPT | OPENAI_API_KEY | ✅ Clipboard + Browser | | 🧠 DeepSeek | DEEPSEEK_API_KEY | ✅ Clipboard + Browser | | 💎 Gemini | GEMINI_API_KEY | ✅ Clipboard + Browser |

Getting API Keys

  1. OpenAI (ChatGPT):

    • Visit OpenAI API
    • Create account and generate API key
    • Add to .env: OPENAI_API_KEY=sk-your-key-here
  2. DeepSeek:

    • Visit DeepSeek API
    • Create account and generate API key
    • Add to .env: DEEPSEEK_API_KEY=sk-your-key-here
  3. Google Gemini:

    • Visit Google AI Studio
    • Create account and generate API key
    • Add to .env: GEMINI_API_KEY=your-key-here

Environment Setup

# Copy example file
cp env.example .env

# Edit with your API keys
nano .env

Example .env file:

# Only configure the APIs you plan to use
OPENAI_API_KEY=sk-your-openai-api-key-here
DEEPSEEK_API_KEY=sk-your-deepseek-api-key-here
GEMINI_API_KEY=your-gemini-api-key-here

⚠️ Important: Never commit your .env file to version control. It's already included in .gitignore.

🚀 Installation

Prerequisites

  • Node.js v18+ (required for all dependencies)
  • Git installed and configured
  • npm or yarn as package manager

Quick Installation

1. Clone the repository

git clone https://github.com/AlexisAyalaS/commit-pr-generator.git
cd commit-pr-generator

2. Automatic setup

npm run setup

3. Install dependencies

npm install

4. Configure API Keys (Optional)

# Copy the example environment file
cp env.example .env

# Edit .env and add your API keys
# You only need to configure the APIs you plan to use

5. Ready to use!

git-ai

📖 Installation problems? Check the detailed Installation Guide for step-by-step instructions and troubleshooting. 🔑 API Keys: If you don't configure API keys, the system will copy prompts to clipboard and open the AI chat in your browser.

Manual Installation

If you prefer to configure manually:

1. Install dependencies

npm install

2. Create directory for generated files

mkdir generated-files

3. Configure configuration file

cp commit-pr-config.example.json commit-pr-config.json

4. Run

git-ai

Install as global tool (recommended for frequent use)

npm install -g commit-pr-generator
# or
yarn global add commit-pr-generator

Install as project dependency

npm install commit-pr-generator --save-dev
# or
yarn add commit-pr-generator --dev

💻 Usage

Basic Usage (Interactive Mode)

git-ai

Usage with Options

git-ai [OPTIONS]

Available Options

Options:
  -V, --version     Show version number
  -v, --verbose     Show detailed debugging information
  -h, --help        Show help

🎯 Available Processes

The enhanced interactive mode allows you to choose between these processes:

  1. 📝 Generate Pull Request message - Creates complete PR descriptions with demo section
  2. 💬 Suggest commit message - Generates commit messages following Conventional Commits
  3. 🌿 Suggest branch name - Proposes the best name for new branches (direct format)
  4. 🔄 Perform multiple processes - Runs several processes in a single session (only available with API keys)
  5. 🗑️ Delete generated files history - Cleans the history folder

Smart Menu System

The menu dynamically adapts based on your API key configuration:

  • With API Keys: Shows all options including "Perform multiple processes"
  • Without API Keys: Shows only individual processes with clipboard fallback

🌍 Multi-Language Support

The generator supports responses in multiple languages:

  • 🇺🇸 English - Default language
  • 🇪🇸 Spanish - Complete Spanish support

Language Configuration

Interactive Mode

The interactive mode allows you to select the language at the beginning of the process.

Configuration File

You can configure the default language in commit-pr-config.json:

{
  "language": "es"
}

🤖 Supported AI Platforms

  • 🤖 ChatGPT - OpenAI
  • 🧠 DeepSeek Chat - DeepSeek
  • 💎 Google Gemini - Google

📁 History System

All results are automatically saved in the generated-files/ folder with date format:

generated-files/
├── pr-2025-01-22.md          # Pull Request message
├── pr-2025-01-22-2.md        # Second PR of the same day
├── commit-2025-01-22.md      # Commit message
├── branch-name-2025-01-22.md # Branch name suggestions
└── multiple-2025-01-22.md    # Multiple processes combined

🔢 Automatic Numbering System

  • No overwriting: If you generate multiple files of the same type on the same day, they are automatically numbered
  • Format: type-YYYY-MM-DD-N.md where N is the sequential number
  • Example: pr-2025-01-22.md, pr-2025-01-22-2.md, pr-2025-01-22-3.md

🔄 Multiple Processes

When you select "Perform multiple processes", all results are combined in a single file:

  • File: multiple-YYYY-MM-DD.md
  • Separation: Each process is separated with --------
  • Content: Branch, Commit and PR in a single organized file
  • Order: Always displayed in order: Branch → Commit → PR

Each file includes:

  • AI-generated content
  • Clean and direct format
  • Automatic opening: The file opens automatically after generation

🎯 Ultra Simplified Format

For maximum efficiency, some content types are generated in ultra simplified format:

  • Branch names: Only the recommended name (e.g., feat/interactive-mode-implementation)
  • Commit messages: Only the message (e.g., feat: implement improved interactive mode)
  • Pull Requests: Complete content with detailed structure and demo section

🔧 Fallback System

When API keys are not available, the system provides a smart fallback:

Individual Process Fallback

  • Copies prompt to clipboard - Complete prompt with git diff
  • Opens AI chat - Direct link to the corresponding AI platform
  • Instructions provided - Clear steps to paste and use the prompt

Multiple Process Fallback

  • Combined prompt - Single prompt requesting all three results
  • One clipboard copy - Prevents multiple overwrites
  • One browser opening - Opens only the selected AI platform
  • Organized format - Clear structure for all three results

⚙️ Advanced Configuration

Configuration File (commit-pr-config.json)

{
  "prompts": {
    "default": "Please draft markdown for a pull request...",
    "commit": "Please generate a commit message...",
    "detailed": "Please create a comprehensive pull request...",
    "branch-name": "Please suggest appropriate branch names..."
  },
  "defaultExclusions": [
    "package-lock.json",
    "node_modules",
    ".env",
    "*.log"
  ],
  "logging": {
    "level": "info",
    "enableColors": true
  },
  "git": {
    "checkStagedChanges": true,
    "checkUnstagedChanges": true,
    "maxDiffSize": 50000
  },
  "language": "en"
}

Exclusion Patterns (.prignore)

Create a .prignore file in your project root to exclude specific files:

node_modules/
*.log
dist/
coverage/
.env*

📝 Examples

Interactive Mode

# Start interactive mode
git-ai

# Select: Multiple processes (if API keys available)
# Select: English
# Select: DeepSeek
# Result: All files generated automatically

Global Installation

# Install globally
npm install -g commit-pr-generator

# Use from anywhere
git-ai

🤝 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/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support

If you have any questions or need help:


Made with ❤️ by Alexis Ayala Solorio