{"id":28262912,"url":"https://github.com/woongheelee/git-commit-message-generator","last_synced_at":"2026-05-16T08:04:06.994Z","repository":{"id":286251655,"uuid":"960822008","full_name":"WoongheeLee/git-commit-message-generator","owner":"WoongheeLee","description":"Command-line tool to generate conventional Git commit messages from staged changes using GPT. Built with Python and OpenAI API.","archived":false,"fork":false,"pushed_at":"2025-07-08T04:39:58.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T06:29:50.112Z","etag":null,"topics":["ai-assistant","commit-messages-generator","git"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WoongheeLee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-05T06:15:12.000Z","updated_at":"2025-07-08T04:39:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa20ca2a-a3e4-4ac5-a4a1-5c7b855b5c59","html_url":"https://github.com/WoongheeLee/git-commit-message-generator","commit_stats":null,"previous_names":["woongheelee/commit-message-generator"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/WoongheeLee/git-commit-message-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoongheeLee%2Fgit-commit-message-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoongheeLee%2Fgit-commit-message-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoongheeLee%2Fgit-commit-message-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoongheeLee%2Fgit-commit-message-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WoongheeLee","download_url":"https://codeload.github.com/WoongheeLee/git-commit-message-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoongheeLee%2Fgit-commit-message-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274744062,"owners_count":25341136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assistant","commit-messages-generator","git"],"created_at":"2025-05-20T07:13:14.046Z","updated_at":"2026-05-16T08:04:06.988Z","avatar_url":"https://github.com/WoongheeLee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Commit Message Generator\n\n[README (English)](./README.md) | [README (한국어)](./README_KOR.md)\n\nGenerate concise, conventional commit messages using GPT, directly from your staged `git diff`.\n\n\u003e Powered by OpenAI API and built with Python 3.13. Supports any language supported by GPT (e.g., English, Korean, French, etc.)\n\n---\n\n## Features\n\n- Auto-generate commit messages using LLM (default model: `gpt-5.4`)\n- Supports [Conventional Commit](https://www.conventionalcommits.org/) format\n- Multilingual support (language is GPT-dependent, use `--language \u003clang\u003e`)\n- Token usage and estimated USD cost reporting per call\n- Auto-confirm mode (`--yes`) for non-interactive workflows\n- PyInstaller-compatible for single-file binary distribution, with build-time configurable defaults\n\n## Supported Models\n\nProvider is auto-detected from the model name prefix (`gpt-*` → OpenAI, `claude-*` → Anthropic).\n\n| Model | Provider | Input ($/1M) | Output ($/1M) | Context |\n| ----- | -------- | ------------ | ------------- | ------- |\n| `gpt-5.4` (default) | OpenAI | $2.50 | $15.00 | 1.05M |\n| `gpt-5.4-mini` | OpenAI | $0.75 | $4.50 | 400K |\n| `claude-opus-4-7` | Anthropic | $5.00 | $25.00 | 1M |\n| `claude-sonnet-4-6` | Anthropic | $3.00 | $15.00 | 1M |\n| `claude-haiku-4-5` | Anthropic | $1.00 | $5.00 | 200K |\n\n---\n\n## Requirements\n\nThis project uses [uv](https://docs.astral.sh/uv/) for environment and dependency management. Install uv first, then sync dependencies:\n\n```bash\nuv sync\n```\n\nPython 3.13+ is required (uv will install it automatically based on `.python-version`).\n\nIf you need a `requirements.txt` for compatibility, generate it with:\n\n```bash\nuv export --no-hashes -o requirements.txt\n```\n\n---\n\n## Usage (from source)\n\n```bash\n# Generate and apply commit message\nuv run python main.py\n\n# Specify language\nuv run python main.py --language english\n\n# Specify model\nuv run python main.py --model gpt-5.4-mini\n\n# Auto-confirm (skip the [Y/n] prompt)\nuv run python main.py --yes\n\n# Force confirm even when --yes is the baked-in default\nuv run python main.py --confirm\n```\n\n### CLI Options\n\n| Flag | Description |\n| ---- | ----------- |\n| `-l, --language LANG` | Output language (default: `korean`, or build-baked default) |\n| `-m, --model MODEL` | LLM model (default: `gpt-5.4`, or build-baked default) |\n| `-y, --yes` | Skip the commit confirmation prompt |\n| `--confirm` | Force confirmation prompt (overrides build-baked auto-yes) |\n\n---\n\n## Setup API Key\n\nAPI keys are loaded lazily — only the provider matching your selected model is required.\n\nFor OpenAI models (`gpt-*`):\n\n```\n~/.api_keys/openai.json\n```\n\n```json\n{\n  \"api_key\": \"sk-...\"\n}\n```\n\nFor Anthropic models (`claude-*`):\n\n```\n~/.api_keys/anthropic.json\n```\n\n```json\n{\n  \"api_key\": \"sk-ant-...\"\n}\n```\n\n---\n\n## Prompt Template\n\nYou can customize the commit format via:\n\n```\nprompt_template.yml\n```\n\nIt defines the Conventional Commit format and supported types (e.g., `feat`, `fix`, `docs`...).\n\n---\n\n## Build Standalone Executable (Optional)\n\nUse the helper script — it bakes default behavior (model, language, auto-yes) into the binary via a bundled `build_defaults.json`:\n\n```bash\n# Default: model=gpt-5.4, language=korean, auto_yes=true\n./build.sh\n\n# Choose a different default model\n./build.sh --model gpt-5.4-mini\n\n# Build a binary that always asks for confirmation\n./build.sh --no-yes\n\n# Build for English commit messages by default\n./build.sh --language english\n\n# All build options\n./build.sh --help\n```\n\nOr invoke PyInstaller directly (Windows uses `;` as `--add-data` separator, Linux/macOS uses `:`):\n\n```bash\nuv run --group dev pyinstaller --onefile --add-data \"prompt_template.yml:.\" main.py\n```\n\n- Executable is saved as `git-commit-gen` (or `git-commit-gen.exe` on Windows)\n- Build-baked defaults can always be overridden at runtime via CLI flags\n- Tested on Windows (Git Bash / WSL) and Linux\n\n---\n\n## Example Output\n\n```text\n🤖 GPT로 korean 커밋 메시지 생성 중 (모델명: gpt-5.4)...\n\n\n📊 토큰 사용량:\n   - 프롬프트 토큰     : 412\n   - 생성 토큰         : 38\n   - 총 토큰           : 450\n💰 예상 비용           : $0.00160 USD\n\n\n✅ 생성된 커밋 메시지:\n\nfeat: add CLI option to specify commit message language\n\n이 메시지로 커밋하시겠습니까? [Y/n]:\n```\n\n---\n\n## License\n\n[MIT License](./LICENSE)\n\n--- \n\n## Contributing\n\nGladly welcoming contributors!  \nFeel free to fork, improve, and send a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoongheelee%2Fgit-commit-message-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoongheelee%2Fgit-commit-message-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoongheelee%2Fgit-commit-message-generator/lists"}