https://github.com/bikz/goodcommit
A lightning-fast utility for Git that stages, commits with AI-generated messages, and pushes—all with one simple command: g.
https://github.com/bikz/goodcommit
ai cli commit commit-message conventional-commits developer-tools git gpt-5 ollama openai opencommit rust
Last synced: about 1 month ago
JSON representation
A lightning-fast utility for Git that stages, commits with AI-generated messages, and pushes—all with one simple command: g.
- Host: GitHub
- URL: https://github.com/bikz/goodcommit
- Owner: Bikz
- License: mit
- Created: 2025-04-10T15:54:30.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-01-12T09:07:56.000Z (about 1 month ago)
- Last Synced: 2026-01-12T13:57:02.907Z (about 1 month ago)
- Topics: ai, cli, commit, commit-message, conventional-commits, developer-tools, git, gpt-5, ollama, openai, opencommit, rust
- Language: Rust
- Homepage:
- Size: 207 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Good Commit (goodcommit, g, g.)
Good Commit is a fast Rust CLI that writes git commit messages with AI. It stages changes (optional), generates a message, shows a preview, commits, and can push. Use OpenAI (including GPT-5) or local Ollama, with safe handling for large diffs.
Keywords: git ai commit, commit message generator, OpenCommit alternative, conventional commits.
## Why Good Commit
- One command: `g` or `g.` to stage, generate, commit, and push (optional).
- Fast and lightweight: Rust, single binary, no runtime.
- GPT-5 + Ollama support: cloud or local.
- Large diff safe: summarization fallback prevents token blowups.
- Conventional commits by default, with quick overrides.
## Install
### Homebrew
```bash
brew tap Bikz/tap
brew install goodcommit
```
### npm
```bash
npm install -g goodcommit
```
### curl installer
```bash
curl -s https://raw.githubusercontent.com/Bikz/goodcommit/main/install.sh | sh
```
## Quick Start
```bash
goodcommit setup
g
```
Setup asks for your provider, default push behavior, and (if OpenAI) your API key. You can also set `OPENAI_API_KEY` or `GOODCOMMIT_OPENAI_API_KEY` instead of storing it in config. Create a key at:
https://platform.openai.com/api-keys
## Usage
```bash
# AI commit (uses defaults)
g
# Use your own message
g "fix: resolve auth session leak"
# Skip push
g --no-push
# Show message without committing
g --dry-run
# Interactive staging
g --interactive
# Local commit only (no push)
g -l
# Guided split into multiple commits
goodcommit split
```
## Configuration
Config precedence: CLI flags > repo config > global config > env > defaults.
Config files:
- Global: `~/.config/goodcommit/config.toml`
- Repo: `.goodcommit.toml`
Example:
```toml
provider = "openai"
model = "gpt-5-nano-2025-08-07"
push = true
conventional = true
one_line = true
```
Ignore files (for AI prompt only):
- Global: `~/.config/goodcommit/ignore`
- Repo: `.goodcommit-ignore`
## Providers
### OpenAI
Set your key:
```bash
export OPENAI_API_KEY="..."
```
### Ollama
```bash
ollama pull qwen2.5-coder:1.5b
```
## Hooks
```bash
goodcommit hook install
goodcommit hook uninstall
```
## Contributing
Issues and PRs are welcome. Please open an issue for bugs or feature requests, and open a PR for fixes or docs. For larger changes, start with an issue so we can align.
## License
MIT