{"id":25949741,"url":"https://github.com/hamzabow/co","last_synced_at":"2026-05-13T02:13:12.376Z","repository":{"id":278073671,"uuid":"934433107","full_name":"hamzabow/co","owner":"hamzabow","description":"A CLI that generates git commit messages inside git repos using OpenAI API","archived":false,"fork":false,"pushed_at":"2025-03-14T07:27:32.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-06T01:26:04.160Z","etag":null,"topics":["ai","cli","git","go","golang","productivity"],"latest_commit_sha":null,"homepage":"","language":"Go","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/hamzabow.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-17T20:31:32.000Z","updated_at":"2025-03-14T07:26:18.000Z","dependencies_parsed_at":"2025-02-17T21:32:27.736Z","dependency_job_id":"802cd09a-3046-487d-b98e-9d5550b530fa","html_url":"https://github.com/hamzabow/co","commit_stats":null,"previous_names":["hamzabow/co"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hamzabow/co","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamzabow%2Fco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamzabow%2Fco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamzabow%2Fco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamzabow%2Fco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamzabow","download_url":"https://codeload.github.com/hamzabow/co/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamzabow%2Fco/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32964484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"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","cli","git","go","golang","productivity"],"created_at":"2025-03-04T12:28:54.680Z","updated_at":"2026-05-13T02:13:12.372Z","avatar_url":"https://github.com/hamzabow.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# co - AI-Powered Git Commit Message Generator\n\n[![Build and Test](https://github.com/hamzabow/co/actions/workflows/build.yml/badge.svg)](https://github.com/hamzabow/co/actions/workflows/build.yml)\n[![Release](https://github.com/hamzabow/co/actions/workflows/release.yml/badge.svg)](https://github.com/hamzabow/co/actions/workflows/release.yml)\n\n`co` is a command-line tool that uses OpenAI's GPT-4o to generate meaningful, well-formatted git commit messages based on your staged changes.\n\n## Features\n\n- 🤖 Generates contextual commit messages based on your staged git changes\n- 🔑 Securely manages your OpenAI API key\n- ✏️ Interactive editor to review and modify suggested commit messages\n- 📋 Supports multiple commit message formats:\n  - Conventional Commits\n  - Gitmoji (Unicode or shortcode format)\n  - Simple format\n\n## Prerequisites\n\n- Git installed and configured\n- An OpenAI API key (with access to GPT-4o)\n\n## Installation\n\nYou'll need Go (Golang) installed so that you can run the following command to install `co`:\n\n```bash\ngo install github.com/hamzabow/co@latest\n```\n\nOnce installed, you can use `co` in any git repository. See the Usage section below for instructions.\n\n## Setup\n\nYou can provide your OpenAI API key in one of two ways:\n\n1. Set the `OPENAI_API_KEY` environment variable:\n   ```bash\n   export OPENAI_API_KEY=\"your-api-key-here\"\n   ```\n\n2. Enter it when prompted on first use. The tool will ask for your API key if not found in environment variables.\n\n## Usage\n\n1. Stage your changes with git:\n   ```bash\n   git add .\n   ```\n\n2. Run the commit message generator:\n   ```bash\n   co\n   ```\n\n3. Review the generated message, edit if needed, and:\n   - Press `Ctrl+Enter` to commit with the message\n   - Press `Ctrl+C` to cancel\n\n## How It Works\n\n1. The tool retrieves the diff of your staged changes using `git diff --staged`\n2. It sends this diff to OpenAI's API with a carefully crafted prompt\n3. The AI generates a commit message following the specified format\n4. You get to review and edit the message before committing\n5. After confirmation, the tool executes `git commit -m \"your message\"`\n\n## Configuration\n\nThe tool currently uses the Conventional Commits format by default. You can modify the format by editing the `internal/genmessage/genmessage.go` file to use one of the other prompt templates defined in `internal/prompts/prompts.go`.\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests for new features, improvements, or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\nThis project uses components and utilities from [Bubble Tea](https://github.com/charmbracelet/bubbletea) for its terminal user interface.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamzabow%2Fco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamzabow%2Fco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamzabow%2Fco/lists"}