edited README

This commit is contained in:
Hassan El Mghari
2023-02-13 14:59:34 -05:00
parent 5456bab0b7
commit fe2ec89bc9
2 changed files with 22 additions and 22 deletions

View File

@@ -1,34 +1,34 @@
# AI Commit # AI Commits - work in progress
Have AI Commit write your git commit messages for you so you never have to write a commit message again. AI Commits is a tool that writes your git commit messages for you. Never write a commit message again.
[![AI Commit Screenshot](./screenshot.png)](https://twitter.com/nutlope/status/1624646872890589184) [![AI Commit Screenshot](https://github.com/Nutlope/aicommits/blob/main/screenshot.png)](https://twitter.com/nutlope/status/1624646872890589184)
## How to install ## How to install
`npm install -g autocommit` 1. `npm install -g autocommit`
2. `export OPENAIKEY=sk-xxxxxxxxxxxxxxxx`
**Note:** The process to install this will get vastly simplified when I rewrite this CLI and publish it as an npm package to be run with `npx`. 3. `autocommit` after you run `git add .`
## How it works ## How it works
This project uses a command line interface tool called zx that's developed by google. In the script, it 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. Video coming soon where I rebuild it from scratch to show you how to easily build your own CLI tools powered by AI. Fully privacy friendly as commands only run on your local machine using your OpenAI account. 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. Video coming soon where I rebuild it from scratch to show you how to easily build your own CLI tools powered by AI.
This CLI also supports conventional commits. If you want conventional commits, simply set the `conventionalCommit` variable at the top of the script to `true`. ## Limitations
It currently can only support git diffs of up to 200 lines of code. I'm working on version 2.0 which will be TypeScript-first, support conventional commits, and support long diffs.
## Remaining tasks ## Remaining tasks
Now: Now:
- [ ] Rewrite this in node to publish as an npm package - Rewrite this in node to publish as an npm package
- [ ] Figure out how to fail gracefully instead of exit 1 - Figure out how to fail gracefully instead of exit 1
- [ ] Try openai curie And/OR codex
After: Future tasks:
- [ ] Rewrite in TypeScript - Experiment with openai curie and/or codex
- [ ] Look into better conventional commit support, look at other CLIs - Add conventional commit support
- [ ] Try supporting more than 200 lines by grabbing the diff per file - Try supporting more than 200 lines by grabbing the diff per file
- [ ] Build landing page - Rewrite in TypeScript
- Build landing page for the 2.0 launch
# How to run new version

View File

@@ -1,5 +1,5 @@
{ {
"name": "autocommit", "name": "aicommits",
"version": "0.0.3", "version": "0.0.3",
"description": "generates ai commit", "description": "generates ai commit",
"main": "aicommit.js", "main": "aicommit.js",
@@ -12,9 +12,9 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/Nutlope/ai-commit.git" "url": "git+https://github.com/Nutlope/aicommits.git"
}, },
"author": "hassan", "author": "Hassan El Mghari (@nutlope)",
"license": "ISC", "license": "ISC",
"homepage": "https://github.com/Nutlope/ai-commit#readme" "homepage": "https://github.com/Nutlope/aicommits#readme"
} }