Skip to content

AI-powered tool to automatically generate commit messages based on code changes.

License

Notifications You must be signed in to change notification settings

JulioC090/commit-generator

Folders and files

NameName
Last commit message
Last commit date
Feb 17, 2025
Feb 15, 2025
Feb 17, 2025
Feb 27, 2025
Feb 27, 2025
Dec 28, 2024
Feb 2, 2025
Feb 15, 2025
Feb 17, 2025
Feb 27, 2025
Feb 27, 2025
Feb 2, 2025
Feb 15, 2025
Dec 28, 2024

Repository files navigation

Commit Generator

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.

πŸ“Œ Table of Contents

πŸ”Ή What is Commit Generator?

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.

πŸš€ Getting started

Currently, the primary way to interact with Commit Generator is through the CLI.

πŸ“‹ Requirements

Before installing, ensure you have the following dependencies:

  • Node.js (Required for running the CLI)
  • Git (Used for repository management)

πŸ”§ Installation

Follow these steps to install and set up Commit Generator:

  1. Install the package
npm install --global @commit-generator/cli
  1. Initialize AI configuration
commitgen config init

🎯 Usage

Once installed, follow these steps to generate commit messages using AI.

  1. Stage your modified files
git add .
  1. 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.

βš™οΈ Features

βœ… 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.

πŸ“‚ Project Structure

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:

πŸ“œ License

Commit Generator is open-source and released under the MIT License. Feel free to use, modify, and contribute!

About

AI-powered tool to automatically generate commit messages based on code changes.

Topics

Resources

License

Stars

Watchers

Forks