Skip to main content

Conventional Commits Generator

Python 3.9+ PyPI version License: MIT Tests

Description

Interactive CLI tool for creating standardized commit messages following the conventional commits format. Includes support for commit body, emojis, and advanced commit management features.

Installation

pipx install conventional-commits-generator

Using pip

pip install conventional-commits-generator

Development installation

# Clone the GitHub repository
git clone https://github.com/EgydioBNeto/conventional-commits-generator.git

# Navigate into the project directory
cd conventional-commits-generator

# Grant execute permission to the virtual environment setup script
chmod +x scripts/setup_venv.sh

# Run the script to create and set up the virtual environment
./scripts/setup_venv.sh

# Activate the virtual environment
source .venv/bin/activate

Usage

Basic commands

# Create interactive commit
ccg

# Generate commit message without committing
ccg --commit

# Push only without creating commit
ccg --push

# Edit existing commit
ccg --edit

# Delete existing commit
ccg --delete

# Create and push tag
ccg --tag

# Reset local and pull from remote
ccg --reset

# Analyze commit messages for Conventional Commits compliance
ccg --analyze

# Stage specific files or directories
ccg --path src/ tests/

# Work in a different repository directory
ccg --path /path/to/repo

# Combine --path with other flags
ccg --path /path/to/repo --push

# Enable verbose logging for debugging
ccg --verbose
ccg -v

# Combine verbose with other flags
ccg --verbose --push
ccg -v --edit

# Show version
ccg --version

Interactive usage example

$ ccg

 ________      ________      ________
|\   ____\    |\   ____\    |\   ____\
\ \  \___|    \ \  \___|    \ \  \___|
 \ \  \        \ \  \        \ \  \  ___
  \ \  \____    \ \  \____    \ \  \|\  \
   \ \_______\   \ \_______\   \ \_______\
    \|_______|    \|_______|    \|_______|

 Conventional Commits Generator

Repository: my-project  Branch: main

┌──────────────────────┐
│ Commit Types         │
└──────────────────────┘

1. feat     - A new feature
2. fix      - A bug fix
3. chore    - Maintenance tasks
4. refactor - Code refactoring
5. style    - Style changes
6. docs     - Documentation
...

Choose the commit type: 1

┌──────────────────────┐
│ Scope                │
└──────────────────────┘
Enter the scope (optional): auth

┌──────────────────────┐
│ Breaking Change      │
└──────────────────────┘
Is this a BREAKING CHANGE? (y/N): n

┌──────────────────────┐
│ Emoji                │
└──────────────────────┘
Include emoji in commit message? (Y/n): n

┌──────────────────────┐
│ Commit Message       │
└──────────────────────┘
Enter the commit message: implement OAuth login

┌──────────────────────┐
│ Commit Body          │
└──────────────────────┘
Commit body (optional): Added Google OAuth 2.0 support
Integration with existing user system

┌──────────────────────┐
│ Review               │
└──────────────────────┘
Commit: feat(auth): implement OAuth login

Body:
Added Google OAuth 2.0 support
Integration with existing user system

Confirm this commit message? (Y/n): y
✓ Commit message confirmed!

┌──────────────────────┐
│ Push Changes         │
└──────────────────────┘
Do you want to push these changes? (Y/n): y
✓ Changes pushed successfully!

Analyze commits example

$ ccg --analyze

┌──────────────────────┐
│ Analyze Commits      │
└──────────────────────┘

How many commits to analyze? (Enter for all, or a number): 5

Analyzing last 5 commits...

┌──────────────────────┐
│ Analysis Results     │
└──────────────────────┘

1. ✓ [a3c6dbc] feat(ux): improvements in usability and responsiveness
2. ✓ [97c2e52] chore: removing unnecessary comments
3. ✗ [2812ed3] update bump version workflow
4. ✓ [fa6a6df] feat: adding improvements
5. ✓ [a5309a3] chore: add CODE_IMPROVEMENTS.md
┌──────────────────────┐
│ Summary              │
└──────────────────────┘

Total commits analyzed: 5
Valid commits: 4 (80%)
Invalid commits: 1 (20%)
How to fix invalid commits:
  • Use 'ccg --edit' to edit a specific commit message
  • You can select commits by number or hash prefix
  • Example: 'ccg --edit' then select the commit to fix
⚠ Tip: Run 'ccg --edit' now to fix invalid commits

Commit Types

Type Description
feat A new feature
fix A bug fix
chore Maintenance tasks
refactor Code refactoring
style Style/formatting changes
docs Documentation changes
test Adding or modifying tests
build Build system changes
revert Reverts a previous commit
ci CI/CD changes
perf Performance improvements

Requirements

  • Python 3.9+
  • Git

Contributing

See CONTRIBUTING.md for details on how to contribute.

Code of Conduct

Please read our Code of Conduct for details on our community standards.

Security

To report security vulnerabilities, see SECURITY.md.

License

This project is licensed under the MIT License.

Author

EgydioBNeto

Metadata

Release files for conventional-commits-generator 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conventional-commits-generator 2.3.0
File Size Uploaded Provenance Actions
conventional_commits_generator-2.3.0.tar.gz 170.9 kB Without provenance Details for conventional_commits_generator-2.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for conventional-commits-generator 2.3.0
File Interpreter ABI Platform Actions
conventional_commits_generator-2.3.0-py3-none-any.whl Python 3 none any Details for conventional_commits_generator-2.3.0-py3-none-any.whl

Total release size: 228.5 kB

Release files / conventional_commits_generator-2.3.0.tar.gz

Download URL conventional_commits_generator-2.3.0.tar.gz
Size 170.9 kB
Tags Source
SHA-256 checksum
How to use checksums
31f1e2428d8df8d420a66c5cfae1c8845612cff67a36867caaff181169b98316
BLAKE2b-256 checksum
How to use checksums
b7a3a54e19030cf6ce707aa92f90bd9f646e1323a04742729fa426df9c582f14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / conventional_commits_generator-2.3.0-py3-none-any.whl

Download URL conventional_commits_generator-2.3.0-py3-none-any.whl
Size 57.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d268402c0ff2116b1d4abd6d36328944652b627fee1d298c90967709c65be704
BLAKE2b-256 checksum
How to use checksums
9e94d5876f7206ffa909cdedc0da4d69df55018c8fe6d309e5d1d6ea095c71b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for conventional-commits-generator 2.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page