Conventional Commits Generator - A CLI to create standardized commit messages
Project description
Conventional Commits Generator
Description
A simple yet powerful interactive CLI tool for creating well-structured and standardized commit messages following the conventional commit format.
Overview
$ ccg
┌────────────────────────────────────────────────────────────────────────────────┐
│ Commit Types │
└────────────────────────────────────────────────────────────────────────────────┘
1. ★ feat - A new feature for the user or a particular enhancement
2. ♥ fix - A bug fix for the user or a particular issue
3. • chore - Routine tasks, maintenance, or minor updates
...
┌──────────────────────┐
│ Scope │
└──────────────────────┘
ℹ The scope provides context for the commit (e.g., module or file name)
ℹ Examples: auth, ui, api, database
Enter the scope (optional, press Enter to skip): authentication
✓ Scope set to: authentication
┌──────────────────────┐
│ Breaking Change │
└──────────────────────┘
ℹ A breaking change means this commit includes incompatible changes
ℹ Examples: changing function signatures, removing features, etc.
Is this a BREAKING CHANGE? (y/n): n
ℹ Not a breaking change
┌──────────────────────┐
│ Commit Message │
└──────────────────────┘
ℹ Provide a clear, concise description of the change
ℹ Examples: 'implement OAuth login', 'fix navigation bug', 'update documentation'
Enter the commit message: implement OAuth login
✓ Message: implement OAuth login
┌──────────────────────┐
│ Review │
└──────────────────────┘
┌────────────────────────────────────────────────┐
│ │
│ feat(authentication): implement OAuth login │
│ │
└────────────────────────────────────────────────┘
Confirm this commit message? (y/n): y
✓ Commit message confirmed!
┌──────────────────────┐
│ Commit │
└──────────────────────┘
→ Committing changes...
✓ New commit successfully created!
┌──────────────────────┐
│ Push Changes │
└──────────────────────┘
ℹ This will execute 'git push' command
Do you want to push these changes? (y/n): y
┌──────────────────────┐
│ Remote Push │
└──────────────────────┘
→ Pushing changes to remote repository...
✓ Changes pushed successfully!
Features
- Interactive CLI with colored output and user-friendly prompts
- Complete conventional commit format support:
- Type selection with detailed descriptions
- Optional scope field
- Breaking change indicator
- Descriptive commit message
- Git integration:
- Automatic
git addto stage changes - Commit with formatted message
- Optional push to remote
- Automatic
- Advanced features:
- Pre-commit hooks integration
- Push-only mode
- Dry-run mode for testing
- Command history for easier input
Installation
Using pipx (recommended)
pipx is the recommended way to install command-line tools written in Python:
# Install pipx if you don't have it
pip install --user pipx
pipx ensurepath
# Install ccg
pipx install ccg
Using pip
pip install ccg
Development Installation
Clone the repository:
git clone https://github.com/EgydioBNeto/conventional-commits-generator.git
cd conventional-commits-generator
Using a Virtual Environment (Recommended)
On Linux/macOS:
# Run the setup script
chmod +x scripts/setup_venv.sh
./scripts/setup_venv.sh
# Activate the virtual environment
source .venv/bin/activate
On Windows:
# Run the setup script
scripts\setup_venv.bat
# Activate the virtual environment
.venv\Scripts\activate
Manual Installation
# Create a virtual environment
python -m venv .venv
# Activate it (Linux/macOS)
source .venv/bin/activate
# Or on Windows
# .venv\Scripts\activate
# Install in development mode with dev dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
Usage
Basic Usage
# Generate a commit interactively
ccg
# Just push without creating a new commit
ccg --push
# Generate a commit message without actually committing (dry run)
ccg --dry-run
# Show version
ccg --version
Requirements
- Python 3.7+
- Git
Contributing
See CONTRIBUTING.md for details on how to contribute to this project.
Code of Conduct
Please read the Code of Conduct for details on our code of conduct.
Security
For details about reporting security vulnerabilities, see SECURITY.md.
License
This project is licensed under the MIT License.
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file conventional_commits_generator-2.0.0.tar.gz.
File metadata
- Download URL: conventional_commits_generator-2.0.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07c2b6ac9e2c096d142b72d8b45f552488da77d1eefdae0c1608953845f68574
|
|
| MD5 |
75a6589f734408e2ccbaac0f23db0f16
|
|
| BLAKE2b-256 |
b16eb29d85a0fa055ff59feffdd0d02cedd0bacab5ca5fa36c426dfd5651e669
|
File details
Details for the file conventional_commits_generator-2.0.0-py3-none-any.whl.
File metadata
- Download URL: conventional_commits_generator-2.0.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44eefe101df4d926c2b889dac3efe01c4703479768101b5daf2497cd6cd05f64
|
|
| MD5 |
802b5e04c01c687632e3177be6b25d6e
|
|
| BLAKE2b-256 |
0736d32b00a917e811c853e8d72ede65bb353336691a2955c512ed9f7abbd1a0
|