https://github.com/hasansino/commit
Commit helper tool
https://github.com/hasansino/commit
ai-commit commit generate-commit-message git i-am-to-lazy-to-type-git-commands llm-commit
Last synced: about 2 months ago
JSON representation
Commit helper tool
- Host: GitHub
- URL: https://github.com/hasansino/commit
- Owner: hasansino
- License: other
- Created: 2025-08-28T18:20:31.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2026-03-21T07:09:05.000Z (about 2 months ago)
- Last Synced: 2026-03-21T23:20:12.444Z (about 2 months ago)
- Topics: ai-commit, commit, generate-commit-message, git, i-am-to-lazy-to-type-git-commands, llm-commit
- Language: Go
- Homepage:
- Size: 1.61 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# commit
Commit helper tool.
## Installation
### Homebrew
```bash
brew tap hasansino/commit
brew install commit
```
### Go
```bash
go install github.com/hasansino/commit@latest
```
### Download Binary
Download the latest binary from the [releases page](https://github.com/hasansino/commit/releases).
## Features
- Dry-run mode
- Generates messages according to conventional commits specification
- Generates commit messages using multiple providers (claude, openai, gemini)
- Supports multi-line commit messages
- Exclude/include specific file patterns and use global gitignore
- Customizable commit message prompt templates
- Option to use first or fastest response from providers
- Configurable maximum diff size to include in prompts
- Supports semantic versioning tag (major, minor, patch) incrementation and push
- Option to push changes after committing to relevant remote branch
- GPG signing according to user git configuration, supporting password input
- Detects JIRA issue keys in branch name and adds them to commit message
## Demo

## Usage
```terminaloutput
Commit helper tool
Usage:
commit [flags]
commit [command]
Available Commands:
help Help about any command
version Version information
Flags:
--auto Auto-commit with first and fastest response from provider.
--dry-run Show what would be committed without committing.
--exclude strings Exclude patterns, when staging changes.
--first Use first received message and discard others.
-h, --help help for commit
--include-only strings Only include specific patterns, when staging changes.
--jira-task-position string Jira task position in commit message: prefix, infix, suffix, or none. (default "none")
--jira-task-style string Jira task style: brackets, parens , plain-colon, or plain. (default "plain")
--log-level string Logging level (debug, info, warn, error) (default "info")
--max-diff-size-bytes int Maximum diff size in bytes to include in prompts. (default 65536)
--multi-line Use multi-line commit messages.
--prompt string Custom prompt template.
--providers strings Providers to use, leave empty for all (claude|openai|gemini).
--push Push after committing.
--tag string Create and increment semver tag part (major|minor|patch).
--timeout duration API timeout. (default 10s)
--use-global-gitignore Use global gitignore. (default true)
Use "commit [command] --help" for more information about a command.
```
All flags can also be set via environment variables, e.g. `COMMIT_AUTO=true`.
## Configuration
At least one *_API_KEY variable is required to use this tool.
- ANTHROPIC_API_KEY
- ANTHROPIC_MODEL (optional, defaults to "claude-3-5-haiku-latest")
- OPENAI_API_KEY
- OPENAI_MODEL (optional, defaults to "gpt-4-turbo")
- GEMINI_API_KEY
- GEMINI_MODEL (optional, defaults to "gemini-1.5-flash")
## Custom Prompt Variables
- {diff}: git diff of the changes to be committed
- {files}: list of changed files
- {branch}: current git branch name