{"id":21101313,"url":"https://github.com/rtuin/prepare-commit-msg-gen","last_synced_at":"2026-02-04T01:36:16.358Z","repository":{"id":263687523,"uuid":"891165349","full_name":"rtuin/prepare-commit-msg-gen","owner":"rtuin","description":"A git commit message generator to enhance your workflow","archived":false,"fork":false,"pushed_at":"2024-11-25T19:35:14.000Z","size":125,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T20:28:41.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rtuin.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":"2024-11-19T21:00:25.000Z","updated_at":"2024-11-26T12:34:00.000Z","dependencies_parsed_at":"2025-05-05T20:28:07.801Z","dependency_job_id":"11c3821b-2930-4be1-a38b-90ecc6f4cadc","html_url":"https://github.com/rtuin/prepare-commit-msg-gen","commit_stats":null,"previous_names":["rtuin/prepare-commit-msg-gen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rtuin/prepare-commit-msg-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuin%2Fprepare-commit-msg-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuin%2Fprepare-commit-msg-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuin%2Fprepare-commit-msg-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuin%2Fprepare-commit-msg-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtuin","download_url":"https://codeload.github.com/rtuin/prepare-commit-msg-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuin%2Fprepare-commit-msg-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29063948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T00:26:14.114Z","status":"ssl_error","status_checked_at":"2026-02-04T00:23:06.435Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-19T23:44:46.537Z","updated_at":"2026-02-04T01:36:16.339Z","avatar_url":"https://github.com/rtuin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Commit Message Generator\n\nA tool that helps generate meaningful commit messages for your Git repositories using LLMs.\n\n## Installation\n\n### From Homebrew (for users)\nYou can install this package using Homebrew:\n\n```bash\nbrew install rtuin/tools/prepare-commit-msg-gen\n```\n\n## Setting up the Git Hook\n\nAfter installing the package, you need to set up the prepare-commit-msg hook in your Git repository:\n\n1. Navigate to your Git repository:\n   ```bash\n   cd your-repository\n   ```\n\n2. Create a new prepare-commit-msg hook:\n   ```bash\n   mkdir -p .git/hooks\n   echo '#!/bin/sh\n   prepare-commit-msg-gen \"$1\"' \u003e .git/hooks/prepare-commit-msg\n   chmod +x .git/hooks/prepare-commit-msg\n   ```\n\n## Usage\n\nOnce installed and set up, the hook will automatically run every time you create a new commit. It will analyze your changes and suggest a meaningful commit message.\n\n## Configuration\n\nThe tool can be configured using environment variables:\n\n### LLM Provider Configuration\n- `PREPARE_COMMIT_MSG_GEN_LLM_PROVIDER`: Choose the LLM provider to use (default: \"anthropic\")\n  - Supported values: \"anthropic\", \"ollama\", \"openai\"\n- `PREPARE_COMMIT_MSG_GEN_LLM_MODEL`: Specify the model to use\n  - For Ollama: defaults to \"qwen2.5-coder:7b\"\n  - For OpenAI: defaults to \"gpt-4o\"\n  - For Anthropic: defaults to \"claude-3-5-sonnet-latest\"\n\n### Ollama-specific Configuration\n- `PREPARE_COMMIT_MSG_GEN_OLLAMA_BASE_URL`: Set the base URL for your Ollama instance (default: \"http://localhost:11434\")\n\n### OpenAI-specific Configuration\n- `OPENAI_API_KEY`: Your OpenAI API key (required when using OpenAI provider)\n\n### Anthropic-specific Configuration\n- `ANTHROPIC_API_KEY`: Your Anthropic API key (required when using Anthropic provider)\n\n## Troubleshooting\n\n### Hook Not Running\n\nIf the hook is not running when you make commits, ensure that:\n\n1. The hook is installed in the correct hooks directory. Git uses the directory specified by `core.hooksPath` configuration. By default, this is `.git/hooks/` in your repository. You can check your hooks path with:\n   ```bash\n   git config core.hooksPath\n   ```\n\n2. If you've configured a custom hooks path, make sure to install the hook in that directory instead of `.git/hooks/`.\n\n3. The hook file has executable permissions:\n   ```bash\n   chmod +x \u003chooks-path\u003e/prepare-commit-msg\n   ```\n\n## Development\n\n### Local Development Installation (for development)\nTo install the package locally for development:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/rtuin/prepare-commit-msg-gen.git\n   cd prepare-commit-msg-gen\n   ```\n\n2. Install Poetry if you haven't already: https://python-poetry.org/docs/#installation\n\n3. Install the package in editable mode:\n   ```bash\n   poetry install\n   poetry build\n   pip install -e .\n   ```\n\n4. Test the package:\n   ```bash\n   touch test-message.txt\n   prepare-commit-msg-gen test-message.txt\n   ```\n\n\n### Running Tests\n\nTo run tests, use:\n   ```bash\n   poetry run pytest\n   ```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtuin%2Fprepare-commit-msg-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtuin%2Fprepare-commit-msg-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtuin%2Fprepare-commit-msg-gen/lists"}