{"id":14260991,"url":"https://github.com/chhoumann/bunnai","last_synced_at":"2025-04-12T11:34:06.508Z","repository":{"id":220537608,"uuid":"751749493","full_name":"chhoumann/bunnai","owner":"chhoumann","description":"cli to inject ai-generated commit messages into lazygit","archived":false,"fork":false,"pushed_at":"2024-04-14T15:14:59.000Z","size":107,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-01T16:35:17.953Z","etag":null,"topics":["ai","bun","cli","lazygit"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chhoumann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-02T08:43:48.000Z","updated_at":"2024-08-22T13:12:54.863Z","dependencies_parsed_at":"2024-04-14T16:34:05.855Z","dependency_job_id":"d92ac602-71a9-4077-a698-aaadc7440165","html_url":"https://github.com/chhoumann/bunnai","commit_stats":null,"previous_names":["chhoumann/bunnai"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chhoumann%2Fbunnai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chhoumann%2Fbunnai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chhoumann%2Fbunnai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chhoumann%2Fbunnai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chhoumann","download_url":"https://codeload.github.com/chhoumann/bunnai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248560496,"owners_count":21124663,"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","bun","cli","lazygit"],"created_at":"2024-08-22T13:00:41.207Z","updated_at":"2025-04-12T11:34:06.476Z","avatar_url":"https://github.com/chhoumann.png","language":"TypeScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# bunnai\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/chhoumann/bunnai/assets/29108628/1ec69e68-7d5e-4a4d-b4d6-56e202e1c54c\"\u003e\n\u003c/p\u003e\n\nhave ai write commit messages for you in [lazygit](https://github.com/jesseduffield/lazygit).\n\nuses openai to generate commit message suggestions based on the diff between the current branch and master.\nthen you can select a commit message from the list and use it to commit your changes.\n\n## installation\n\n```sh\nbun install -g @chhoumann/bunnai\n```\n\nset up with your openai api key \u0026 preferred model:\n\n```sh\nbunnai config\n```\n\n## usage\n\nyou can specify custom templates. use `bunnai config` to edit the templates.\nwhen you invoke `bunnai`, you can specify a template name to use with `--template`.\n\n### as a menu\n\nthis creates a menu of commit messages based on the diff between the current branch and master.\n\ninsert the following custom command into your [lazygit](https://github.com/jesseduffield/lazygit) config file:\n\n```yaml\ncustomCommands:\n    - key: \"\u003cc-a\u003e\" # ctrl + a\n        description: \"pick AI commit\"\n        command: 'git commit -m \"{{.Form.Msg}}\"'\n        context: \"files\"\n        prompts:\n            - type: \"menuFromCommand\"\n            title: \"ai Commits\"\n            key: \"Msg\"\n            command: \"bunx bunnai\"\n            filter: '^(?P\u003cnumber\u003e\\d+)\\.\\s(?P\u003cmessage\u003e.+)$'\n            valueFormat: \"{{ .message }}\"\n            labelFormat: \"{{ .number }}: {{ .message | green }}\"\n```\n\n### with vim\n\nthis allows you to edit the commit message in vim after you've selected it from the menu.\n\nabort comitting by deleting the commit message in vim.\n\n```yaml\ncustomCommands:\n    - key: \"\u003cc-a\u003e\" # ctrl + a\n      description: \"Pick AI commit\"\n      command: 'echo \"{{.Form.Msg}}\" \u003e .git/COMMIT_EDITMSG \u0026\u0026 vim .git/COMMIT_EDITMSG \u0026\u0026 [ -s .git/COMMIT_EDITMSG ] \u0026\u0026 git commit -F .git/COMMIT_EDITMSG || echo \"Commit message is empty, commit aborted.\"'\n      context: \"files\"\n      subprocess: true\n      prompts:\n          - type: \"menuFromCommand\"\n            title: \"AI Commits\"\n            key: \"Msg\"\n            command: \"bunx bunnai\"\n            filter: '^(?P\u003cnumber\u003e\\d+)\\.\\s(?P\u003cmessage\u003e.+)$'\n            valueFormat: \"{{ .message }}\"\n            labelFormat: \"{{ .number }}: {{ .message | green }}\"\n```\n\n## acknowledgements\n\ncheck out these other projects that inspired this one:\n\n-   https://github.com/BuilderIO/ai-shell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchhoumann%2Fbunnai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchhoumann%2Fbunnai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchhoumann%2Fbunnai/lists"}