Skip to content
/ gitp Public

A CLI tool that uses AI to automatically generate meaningful git commit messages based on your changes

Notifications You must be signed in to change notification settings

osszoi/gitp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

85 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gitp Logo

npm install -g gitp


πŸš€ Gitp - AI-Powered Git Commits

Transform your git workflow with intelligent commit messages powered by AI! ✨

Stop wasting time writing commit messages and let AI do the heavy lifting. Gitp analyzes your changes and generates meaningful, contextual commit messages that actually make sense.

🚨 Important Changes

v1.0.3+ - Description Generation Now Optional

Breaking Change: Commit descriptions are no longer generated by default to improve speed and reduce token usage.

  • Before: Gitp always generated both commit message and description
  • Now: Only commit message is generated by default
  • To get descriptions: Use the --description flag: gitp commit --description

This change makes commits faster while keeping the full functionality available when needed.

πŸ“Έ See It In Action

git ca - Add files + commit

git ca

git cai - Interactive file staging

git cai

git cas - Smart AI analysis (waiting)

git cas waiting

git cas - Smart AI analysis (result)

git cas finished

✨ Features

  • πŸ€– Multi-AI Provider Support - Works with OpenAI and Google
  • 🎯 Smart Context Analysis - Understands your code changes for better messages
  • 🎫 Automatic Ticket Integration - Links commits to Jira/GitHub/GitLab tickets
  • πŸ“ Conventional Commits - Perfect for semantic-release workflows
  • πŸ” Dry-run Mode - Preview before committing
  • ⚑ Git Aliases - Lightning-fast shortcuts

πŸ“¦ Installation

npm install -g gitp

πŸš€ Quick Start

πŸ”§ Initial Setup

πŸ”‘ Set your AI provider and API key:

# Choose your AI provider
gitp set-provider openai     # πŸ€– OpenAI GPT models
gitp set-provider google     # 🧠 Google Gemini

# Add your API key
gitp set-api-key <your-api-key>

# Pick your model
gitp set-model gpt-5         # For OpenAI
gitp set-model gemini-2.5-pro    # For Google

⚑ Git Aliases (Recommended!)

Get lightning-fast commits with simple aliases:

gitp add-alias

πŸŽ‰ You now have these super shortcuts:

  • git c β†’ πŸ’¬ Smart commit
  • git ca β†’ πŸ“ Add files + smart commit
  • git cs β†’ 🧠 Smart commit with AI context
  • git cas β†’ πŸš€ Add files + smart commit with AI context

🎫 Ticket Integration (Optional)

Link your commits automatically to project tickets:

gitp set-default-ticket-for /my-project ABC-123

πŸ“‹ Conventional Commits (Optional)

Perfect for projects using semantic-release:

# Enable conventional commits for a project
gitp set-conventional-commits-for /my-awesome-project

# Remove if needed
gitp remove-conventional-commits-for /my-awesome-project

# See all configured projects
gitp list-conventional-commits

✨ Results in commits like:

  • feat: ABC-123 add user authentication
  • fix: ABC-123 resolve login timeout issue
  • chore: update dependencies

πŸ’» Usage

🎯 Basic Commands

πŸ’¬ Generate and commit:

gitp commit

πŸ” Preview mode (no actual commit):

gitp commit --dry-run

🧠 Smart AI analysis:

gitp commit --smart

πŸ“ Auto-add files:

gitp commit --add

⚑ Power combo:

gitp commit --add --smart --no-verify

πŸŽ›οΈ All Options

Flag Description Example
--add πŸ“ Auto-stage files git ca
--smart 🧠 AI context analysis git cs
--description πŸ“ Include commit description gitp commit --description
--dry-run πŸ” Preview only gitp commit --dry-run
--no-verify ⏭️ Skip git hooks gitp commit --no-verify
-y πŸš€ Skip confirmation gitp commit -y

🎬 Examples in Action

πŸš€ The Magic Happens

Before Gitp:

You: *stares at terminal for 5 minutes thinking of commit message*

With Gitp:

git ca  # Add files + smart commit

git ca example

🎯 Interactive File Staging

Use git cai to selectively stage files with an interactive interface:

git cai example

🧠 Smart Context Analysis

With Smart AI Analysis:

git cas  # Add + Smart AI commit with context analysis

πŸ”„ Processing (AI analyzing your changes):

git cas waiting

✨ Final Result:

git cas finished

🎯 Real-World Scenarios

πŸ”§ Quick fixes:

git c        # Let AI figure out what you fixed

πŸ§ͺ Feature development:

git cas      # Auto-add files + smart context analysis

πŸ” Want to see first:

gitp commit --dry-run --smart

⚑ Ship it fast:

gitp commit --add -y    # No confirmation needed

🎫 With Ticket Integration

# Set once per project
gitp set-default-ticket-for /work/api-service TICKET-123

# Every commit gets prefixed automatically
git c
# β†’ "feat: TICKET-123 add user profile endpoints"

🎯 Why Gitp?

πŸ€” Tired of:

  • Spending minutes thinking of commit messages?
  • Writing generic "fix stuff" commits?
  • Forgetting to mention important changes?
  • Inconsistent commit message formats?

βœ… Get instead:

  • πŸš€ Lightning fast commits with AI
  • πŸ“ Meaningful messages that actually describe your changes
  • 🎯 Consistent formatting across your team
  • 🧠 Smart context understanding of your code
  • πŸ”„ Zero learning curve - works with your existing git workflow

🀝 Contributing

Found a bug or want a feature? We'd love your help!

  1. 🍴 Fork the repo
  2. 🌟 Create your feature branch
  3. πŸ’» Make your changes
  4. πŸš€ Use git cas to commit (dogfooding!)
  5. πŸ“€ Push and create a PR

πŸ“œ License

MIT License - feel free to use in your projects! πŸŽ‰


Made with ❀️ for developers who value their time

Stop writing boring commit messages. Start using Gitp! πŸš€

About

A CLI tool that uses AI to automatically generate meaningful git commit messages based on your changes

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •