| Crates.io | turbocommit |
| lib.rs | turbocommit |
| version | 1.5.4 |
| created_at | 2023-03-05 22:40:05.557825+00 |
| updated_at | 2025-04-16 09:02:25.593207+00 |
| description | A CLI tool to create commit messages with OpenAI GPT models |
| homepage | https://github.com/dikkadev/turboCommit |
| repository | https://github.com/dikkadev/turboCommit |
| max_upload_size | |
| id | 801817 |
| size | 147,222 |
A powerful CLI tool that leverages OpenAI's GPT models to generate high-quality, conventional commit messages from your staged changes.
cargo install turbocommit
Pro tip: Add an alias to your shell configuration for quicker access:
# Add to your .bashrc, .zshrc, etc.
alias tc='turbocommit'
git add . # or stage specific files
turbocommit # or 'tc' if you set up the alias
After generating commit messages, you can:
-n <number> - Number of commit message suggestions to generate-t <temperature> - Temperature for GPT model (0.0 to 2.0) (no effect in reasoning mode)-f <frequency_penalty> - Frequency penalty (-2.0 to 2.0)-m <model> - Specify the GPT model to use-r, --enable-reasoning - Enable support for models with reasoning capabilities (like o-series)--reasoning-effort <level> - Set reasoning effort for supported models (low/medium/high, default: medium)-d, --debug - Show basic debug info in console--debug-file <path> - Write detailed debug logs to file (use '-' for stdout)--auto-commit - Automatically commit with the generated message--amend - Amend the last commit with the generated message (useful with Git hooks)--api-key <key> - Provide API key directly--api-endpoint <url> - Custom API endpoint URL-p, --print-once - Disable streaming outputWhen using models that support reasoning capabilities (like OpenAI's o-series), this mode enables their built-in reasoning features. These models are specifically designed to analyze code changes and generate commit messages with their own reasoning process.
Example usage:
turbocommit -r -m o3-mini -n 1 # Enable reasoning mode with default effort
turbocommit -r --reasoning-effort high -m o3-mini -n 1 # Specify reasoning effort
Debug output helps troubleshoot API interactions:
turbocommit -d # Basic info to console
turbocommit --debug-file debug.log # Detailed logs to file
turbocommit --debug-file - # Detailed logs to stdout
The debug logs include:
Different models have different capabilities and limitations:
-n)For more options, run:
turbocommit --help
turboCommit creates a config file at ~/.turbocommit.yaml on first run. You can customize:
Example configuration:
model: "gpt-4"
default_temperature: 1.0
default_frequency_penalty: 0.0
default_number_of_choices: 3
enable_reasoning: true
reasoning_effort: "medium"
disable_print_as_stream: false
disable_auto_update_check: false
You can maintain multiple configuration files for different use cases (e.g., different providers or environments) and specify which one to use with the -c or --config option:
# Use a local config file
turbocommit -c ./local-config.yaml
# Use a different provider's config
turbocommit -c ~/.turbocommit-azure.yaml
# Use the default config
turbocommit # uses ~/.turbocommit.yaml
Each config file follows the same format as shown above. This allows you to easily switch between different configurations without modifying the default config file.
Contributions are welcome! Feel free to open issues and pull requests.
Licensed under MIT - see the LICENSE file for details.
The --amend option allows you to change the commit message of your last commit. This is useful when:
Usage:
# First, make sure you have no staged changes
git status # Should show no staged changes
# Then use --amend to improve the last commit's message
turbocommit --amend # This will analyze the last commit's changes and suggest a new message
Important Notes:
--amend, you must not have any staged changesgit commit --amend manually to include themYou can also combine this with auto-commit for a quick message update:
turbocommit --amend --auto-commit # Automatically amend with the first generated message
If your project uses Git hooks (e.g., linters, formatters), here's how to use turboCommit effectively:
git add .
turbocommit
If hooks fail:
git add .)If you want to improve the commit message after all hooks pass:
# Make sure you have no staged changes
git status
# Then improve the message
turbocommit --amend # This will analyze the commit and suggest a better message
This workflow ensures that: