
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
A sophisticated Git commit message generator that uses AI to create meaningful, conventional commit messages based on your code changes.
A sophisticated Git commit message generator that uses AI to create meaningful, conventional commit messages based on your code changes.
Note: While the GitHub repository is named
c4f
, the package is published on PyPI ascommit-for-free
since the namec4f
was already taken. All installation commands should usecommit-for-free
as the package name.
_____ _ _ _____ / ____| || | | ___| | | | || |_ | |_ | | |__ _| | _| | |____ | | | | \_____| |_| |_|Commit For Free - AI-Powered Git Commit Message Generator
See C4F in action:
Note: It's normal to occasionally see model response timeouts as shown in the demo. This is due to limitations of the free GPT models provided by
g4f
. After all configured attempts, the package automatically creates a fallback commit message to ensure you can always complete your workflow.
⚠️ Important: C4F requires Python 3.11 or higher to run.
pip install commit-for-free
For a clean, isolated installation that doesn't interfere with your system Python:
# Install pipx if you don't have it
python -m pip install --user pipx
python -m pipx ensurepath
# Install c4f
pipx install commit-for-free
For more accurate system resource monitoring (CPU, memory, process tree):
pip install commit-for-free[monitoring]
git clone https://github.com/alaamer12/c4f.git
cd c4f
poetry install
Or with pip:
pip install -e .
Simply run the command in your Git repository:
c4f
The tool will:
usage: c4f [-r PATH] [-m MODEL] [-a NUM] [-t SEC] [-f] [-i] [-A]
Intelligent Git Commit Message Generator
options:
-r PATH, --root PATH Set the root directory for git operations [default: current project root]
-m MODEL, --model MODEL
Set the AI model to use for commit message generation [default: gpt-4-mini]
Choices: gpt-4-mini, gpt-4, gpt-3.5-turbo
Generation Options:
Configure the commit message generation process
-a NUM, --attempts NUM
Set the number of generation attempts before falling back [default: 3]
Range: 1-10
-t SEC, --timeout SEC
Set the fallback timeout in seconds for model response [default: 10]
Range: 1-60
Formatting Options:
Configure the commit message format
-f, --force-brackets Force conventional commit type with brackets (e.g., feat(scope): message)
-i, --icon Add emoji icons to commit messages (e.g., ✨ feat: new feature)
-A, --ascii-only Use ASCII alternatives instead of Unicode emojis for better terminal compatibility
Generate commit messages with the default settings:
c4f
Use a specific AI model:
c4f --model gpt-4
Set custom generation parameters:
c4f --attempts 5 --timeout 20
Force brackets in conventional commit format:
c4f --force-brackets
Enable emoji icons in commit messages:
c4f --icon
Use ASCII alternatives instead of Unicode emojis:
c4f --icon --ascii-only
Specify a different root directory:
c4f --root /path/to/your/repo
Key configuration options available through command-line arguments:
Option | Description | Default |
---|---|---|
--model | AI model to use | gpt-4-mini |
--attempts | Number of message generation attempts | 3 |
--timeout | Timeout in seconds for AI response | 10 |
--force-brackets | Force brackets in conventional format | False |
--icon | Add emoji icons to commit messages | False |
--ascii-only | Use ASCII alternatives instead of Unicode | False |
g4f
- Provides free access to AI models for generating commit messagesrich
- Powers the beautiful terminal interface and formatted outputContributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git push origin feature/amazing-feature
)# Clone the repository
git clone https://github.com/alaamer12/c4f.git
cd c4f
# Install development dependencies
poetry install --with dev
# Run tests
pytest
# Run Coverage
coverage -m pytest
While c4f has been primarily tested with gpt-4-mini
, gpt-4
, and gpt-3.5-turbo
, the underlying g4f library supports many additional models. However, please note:
⚠️ Warning: Although most g4f-supported models may technically work with c4f, they have not been extensively tested and are not officially recommended. Using untested models may result in:
Always use the latest version of g4f to ensure compatibility and access to the most recent models and improvements. You can update g4f with:
pip install -U g4f
For the best experience, we recommend using one of the officially supported models specified in the command-line options.
This project is licensed under the MIT License - see the LICENSE file for details.
See the CHANGELOG.md file for details about version history and updates.
Please review our SECURITY.md file for information about:
FAQs
A sophisticated Git commit message generator that uses AI to create meaningful, conventional commit messages based on your code changes.
We found that commit-for-free demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.