{"id":18581876,"url":"https://github.com/coder/aicommit","last_synced_at":"2025-04-04T14:02:58.535Z","repository":{"id":255289675,"uuid":"848587941","full_name":"coder/aicommit","owner":"coder","description":"become the world's laziest committer","archived":false,"fork":false,"pushed_at":"2024-12-18T10:19:52.000Z","size":168,"stargazers_count":159,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T22:35:28.478Z","etag":null,"topics":["ai","git"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coder.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}},"created_at":"2024-08-28T03:18:51.000Z","updated_at":"2025-03-31T05:33:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"23817657-443e-48b2-ad40-c1c81351efb0","html_url":"https://github.com/coder/aicommit","commit_stats":{"total_commits":72,"total_committers":2,"mean_commits":36.0,"dds":0.01388888888888884,"last_synced_commit":"fe29fc0507ed8f2e17fe9131817b1c0a9e4c589a"},"previous_names":["coder/aicommit"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faicommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faicommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faicommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Faicommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder","download_url":"https://codeload.github.com/coder/aicommit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905820,"owners_count":20852818,"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","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","git"],"created_at":"2024-11-07T00:07:53.943Z","updated_at":"2025-04-04T14:02:58.510Z","avatar_url":"https://github.com/coder.png","language":"Go","readme":"# aicommit\n\n`aicommit` is a small command line tool for generating commit messages. There\nare many of these already out there, some even with the same name. But none\n(to my knowledge) follow the repository's existing style, making\nthem useless when working in an established codebase.\n\nA good commit message is more than a summary of the code changes. It contains\nthe intention, context, and external references that help others understand the\nchange. Thus, `aicommit` has a `-c`/`--context` flag for quickly adding\nthis detail.\n\n`aicommit` is inspired by our good friend [@sreya](https://github.com/sreya):\n\n![sreya-log](./img/sreya-log.png)\n\n\n## Install\n\nVia Homebrew:\n```\nbrew install aicommit\n```\n\nOr, using Go:\n\n```\ngo install github.com/coder/aicommit/cmd/aicommit@main\n```\n\nOr, download a binary from [the latest release](https://github.com/coder/aicommit/releases).\n\n## Usage\n\nYou can run `aicommit` with no arguments to generate a commit message for the\nstaged changes.\n\n```bash\nexport OPENAI_API_KEY=\"...\"\naicommit\n```\n\nYou can \"retry\" a commit message by using the `-a`/`--amend` flag.\n\n```bash\naicommit -a\n```\n\nYou can dry-run with `-d`/`--dry` to see the ideal message without committing.\n\n```bash\naicommit -d\n```\n\nOr, you can point to a specific ref:\n\n```bash\naicommit HEAD~3\n```\n\nYou can also provide context to the AI to help it generate a better commit message:\n\n```bash\naicommit -c \"closes #123\"\n\naicommit -c \"improved HTTP performance by 50%\"\n\naicommit -c \"bad code but need for urgent customer fix\"\n```\n\nWhen tired of setting environment variables, you can save your key to disk:\n\n```bash\nexport OPENAI_API_KEY=\"...\"\naicommit --save-key\n# The environment variable will override the saved key.\n```\n\n## Style Guide\n\n`aicommit` will read the `COMMITS.md` file in the root of the repository to\ndetermine the style guide. It is optional, but if it exists, it will be followed\neven if the rules there diverge from the norm.\n\nIf there is no repo style guide, `aicommit` will look for a user style guide\nin `~/COMMITS.md`.\n\n## Other Providers\n\nYou may set `OPENAI_BASE_URL` to use other OpenAI compatible APIs with `aicommit`.\nSo far, I've tested it with [LiteLLM](https://github.com/BerriAI/litellm) across\nlocal models (via ollama) and Anthropic. I have yet to find a local model\nthat is well-steered by the prompt design here, but the Anthropic Claude 3.5\ncommit messages are on par with 4o. My theory for why local models don't work well\nis they (incl. \"Instruct\" models) have much worse instruction fine-tuning\nthan flagship commercial models.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Faicommit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder%2Faicommit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Faicommit/lists"}