(optional: add a banner image)
commit-pr-generator is a powerful CLI tool that automates the creation of professional commit messages and pull request descriptions. It intelligently formats content based on your git diff output following Conventional Commits standards, and seamlessly integrates with AI platforms to help you craft perfect documentation.
- Smart Change Analysis - Automatically captures and formats your
git diffoutput - AI-Powered Assistance - Generates commit messages and PR descriptions with AI support
- Customizable Exclusions - Ignores unnecessary files (configurable via
.prignore) - Multi-Platform Support - Works with ChatGPT, DeepSeek, and Gemini
- Seamless Workflow - Copies prompts to clipboard and opens your preferred AI platform
- Conventional Commits - Follows industry-standard commit message formatting
| Terminal Output | AI Platform Integration |
|---|---|
![]() |
![]() |
- Node.js v16+
- Git
- npm or yarn
npm install -g commit-pr-generator
# or
yarn global add commit-pr-generatornpm install commit-pr-generator --save-dev
# or
yarn add commit-pr-generator --devcommit-pr-generator [PATH_TO_REPO] [AI_PLATFORM]| Parameter | Description | Default |
|---|---|---|
PATH_TO_REPO |
Path to git repository (use . for current directory) |
Current directory |
AI_PLATFORM |
AI platform to use (chatgpt, deepseek, or gemini) |
chatgpt |
# Current directory with DeepSeek
commit-pr-generator . deepseek
# Specific path with ChatGPT
commit-pr-generator ~/projects/my-awesome-project
# With default settings (current dir + ChatGPT)
commit-pr-generatorCreate a .prignore file in your project root to specify patterns to exclude from git diff:
# .prignore example
*.log
*.tmp
dist/
coverage/
.DS_StoreIf no .prignore is found, the tool uses these default exclusions:
package-lock.jsonnode_modules/.envcoverage/dist/yarn.lock
| Platform | URL | Default Prompt |
|---|---|---|
| ChatGPT | https://chat.openai.com | ✅ |
| DeepSeek Chat | https://chat.deepseek.com | ✅ |
| Google Gemini | https://gemini.google.com | ✅ |
- Analyzes Changes: Captures your
git diffoutput while respecting exclusions - Formats Prompt: Creates an optimized prompt for AI platforms
- Copies to Clipboard: Automatically copies the prompt for easy pasting
- Opens AI Platform: Launches your preferred AI tool in browser (optional)
- Generate Content: Use the AI's output for your commits/PRs
# [FEATURE] Add user authentication system 🔐
## Changes Made
- Implemented JWT-based authentication
- Added user model and migration
- Created auth middleware
- Set up protected routes
## Technical Details
- Uses bcrypt for password hashing
- Implements 60-minute JWT expiry
- Includes refresh token mechanism
## Demo
MIT © Alexis Ayala
Contributions are welcome! Please open an issue or submit a PR for any improvements.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
💡 Pro Tip: Add an alias to your shell config for even faster access:
echo "alias prg='commit-pr-generator'" >> ~/.zshrc # or ~/.bashrc
source ~/.zshrc