Generate commits with AI
English | PortuguΓͺs
Commit Generator is a tool that leverages AI to automatically generate commit messages based on changes in your code.
- πΉ What is Commit Generator?
- π Getting Started
- βοΈ Features
- π Project Structure
- π License
Writing meaningful commit messages can be tedious, and inconsistent messages make version history difficult to navigate.
Commit Generator eliminates this hassle by analyzing your code changes and generating clear, structured, and relevant commit messages automatically.
Currently, the primary way to interact with Commit Generator is through the CLI.
Before installing, ensure you have the following dependencies:
Follow these steps to install and set up Commit Generator:
- Install the package
npm install --global @commit-generator/cli
- Initialize AI configuration
commitgen config init
Once installed, follow these steps to generate commit messages using AI.
- Stage your modified files
git add .
- Generate a commit message
commitgen
π Done! Commit Generator will analyze your staged changes and suggest a meaningful commit message.
For more details, check out the CLI documentation.
β AI-powered commit message generation β Uses AI to analyze code changes and generate meaningful commit messages.
β Seamless Git integration β Analyzes Git diffs and staged files for precise commit suggestions.
β
Standardized commit types β Supports feat
, fix
, chore
, docs
, refactor
, test
, style
, build
, ci
, perf
, and revert
.
β Context-aware commits β Add extra context (e.g., issue numbers, scope, or additional details) for more clarity.
β
Automated commits β Use --force
to commit changes instantly without manual confirmation.
β
Commit editing & history management β Modify, amend, and validate commit messages easily with commands like commitgen edit
, commitgen amend
, and commitgen validate
.
β Commit message validation β Ensures messages follow best practices and provides recommendations.
β
Configurable AI provider β Customize AI settings via commitgen config
, with options to set, unset, and list configurations.
commit-generator/
βββ docs/ # Documentation files
βββ packages/
β βββ git/ # Git integration
β βββ ai-models/ # Handles AI model interactions
β βββ prompt-parser/ # Parses text templates into structured prompts
β βββ commit-history/ # Tracks previously generated commit messages
β βββ config/ # Configuration manager
β βββ eslint-config/ # Pre-configured ESLint settings
β βββ typescript-config/ # TypeScript configurations
βββ projects
β βββ core/ # The core logic for commit generation
β βββ cli/ # CLI interface for commit generator
βββ .gitignore
βββ package.json
βββ README.md
Each package is documented separately. See:
Commit Generator is open-source and released under the MIT License. Feel free to use, modify, and contribute!