
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600Ć Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Ć faster than humans.
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 |
--threads | Number of concurrent threads for requests | 3 |
--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 |
--models | Display all available models and exit | - |
We've extensively tested various G4F models to find the optimal balance between response quality and speed. Based on our testing, we recommend using one of the following models:
gpt-4-mini
(default, reliable and fast)gpt-3.5-turbo
(good alternative)MetaAI
(good for general purpose commit messages)default
(balanced between quality and speed)The chart above shows average response times for different models. As you can see, some models (like ARTA) have significantly longer response times, while others are much faster.
C4F implements a threading approach that sends multiple concurrent requests to the model and uses the first successful response. This significantly improves reliability and reduces wait times when dealing with potentially unstable free API endpoints.
To adjust the number of concurrent threads:
c4f --threads 5 # Maximum concurrency (faster but more resource intensive)
or
c4f --threads 1 # Disable concurrency (slower but uses less resources)
To see all available models and get recommendations:
c4f --models
This will display a formatted table of all supported models with recommended ones highlighted.
ā ļø Warning: If you experience frequent timeouts during commit message generation, try one of the following:
- Increase the timeout value:
c4f --timeout 30
- Switch to a faster model:
c4f --model MetaAI
- Reduce the number of changes in a single commit
Different models have varying response times and reliability. If one model consistently times out, try another from the recommended list.
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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Ć faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.