https://github.com/Nutlope/aicommits Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Education + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} Nutlope / aicommits Public * Notifications * Fork 23 * Star 596 A CLI that writes your git commit messages for you with AI www.npmjs.com/package/aicommits License MIT license 596 stars 23 forks Star Notifications * Code * Issues 9 * Pull requests 6 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights Nutlope/aicommits This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 1 tag Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/N] Use Git or checkout with SVN using the web URL. [gh repo clone Nutlop] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @Nutlope Nutlope v1.0.5 ... 1acef4f Feb 14, 2023 v1.0.5 1acef4f Git stats * 66 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .gitignore completed migration to typescript February 13, 2023 17:32 LICENSE chore: add LICENSE February 14, 2023 18:06 README.md v1.0.5 February 14, 2023 12:28 aicommits.ts Merge pull request #15 from iamshabell/update/rename-env_var February 14, 2023 12:12 index.ts completed migration to typescript February 13, 2023 17:32 package.json v1.0.5 February 14, 2023 12:28 screenshot.png minor changes February 13, 2023 19:11 tsconfig.json chore: package.json refactors February 14, 2023 13:57 View code AI Commits Installation and Usage How it works Limitations Future tasks README.md AI Commits AI Commits A CLI that writes your git commit messages for you with AI. Never write a commit message again. Current version Hassan Twitter follower count --------------------------------------------------------------------- Installation and Usage Install the CLI then grab your OpenAI key and add it as an env variable with the two commands below. 1. npm install -g aicommits 2. export OPENAI_KEY=sk-xxxxxxxxxxxxxxxx It's recommended to add the line in #2 to your .zshrc or .bashrc so it persists instead of having to define it in each terminal session. After doing the two steps above, generate your commit by running aicommits. Note: If you get a EACCESS error on mac/linux when running the first command, try running it with sudo npm install -g aicommits. How it works This CLI tool runs a git diff command to grab all the latest changes, sends this to OpenAI's GPT-3, then returns the AI generated commit message. I also want to note that it does cost money since GPT-3 generations aren't free. However, OpenAI gives folks $18 of free credits and commit message generations are cheap so it should be free for a long time. Video coming soon where I rebuild it from scratch to show you how to easily build your own CLI tools powered by AI. Limitations * Only supports git diffs of up to 200 lines of code for now * Does not support conventional commits The next version of the CLI, version 2, will address both of these limitations as well as the tasks below! Future tasks * Add a debugging flag to troubleshoot OpenAI responses * Add support for conventional commits as a flag that users can enable * Add support for diffs greater than 200 lines by grabbing the diff per file * Add support for a flag that can auto-accept * Add ability to specify a commit message from inside aicommit * Use gpt-3-tokenizer * Add automated github releases * Add opt-in emoji flag * Add opt-in languages flag * Build landing page for the 2.0 launch About A CLI that writes your git commit messages for you with AI www.npmjs.com/package/aicommits Resources Readme License MIT license Stars 596 stars Watchers 3 watching Forks 23 forks Releases 1 AICommits v1.0.5 Latest Feb 14, 2023 Packages 0 No packages published Contributors 6 * @Nutlope * @yusefren * @privatenumber * @dasovm * @iamshabell * @m1yon Languages * JavaScript 100.0% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.