Comparing version
@@ -6,4 +6,2 @@ #!/usr/bin/env zx | ||
// TODO: Figure out how to fail gracefully instead of exit 1 | ||
let conventionalCommit = false; | ||
@@ -10,0 +8,0 @@ |
{ | ||
"name": "aicommits", | ||
"version": "0.0.3", | ||
"description": "generates ai commit", | ||
"main": "aicommit.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "./aicommit.js" | ||
}, | ||
"version": "0.0.4", | ||
"description": "Writes your git commit messages for you with AI", | ||
"main": "cli.js", | ||
"bin": { | ||
"gpt-commit": "./aicommit.js" | ||
"gpt-commit": "./cli.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Nutlope/ai-commit.git" | ||
}, | ||
"author": "hassan", | ||
"license": "ISC", | ||
"homepage": "https://github.com/Nutlope/ai-commit#readme" | ||
"repository": "https://github.com/Nutlope/aicommits", | ||
"author": "Hassan El Mghari (@nutlope)", | ||
"license": "MIT", | ||
"dependencies": { | ||
"inquirer": "^9.1.4" | ||
} | ||
} |
@@ -1,19 +0,21 @@ | ||
# 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. | ||
[](https://twitter.com/nutlope/status/1624646872890589184) | ||
[](https://twitter.com/nutlope/status/1624646872890589184) | ||
## How to install | ||
## Installation and usage | ||
`npm install -g autocommit` | ||
1. `npm install -g autocommit` to install the CLI | ||
2. `export OPENAI_KEY=sk-xxxxxxxxxxxxxxxx` to specify your OpenAI API Key | ||
3. `autocommit` after you run `git add .` to generate your commit | ||
**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`. | ||
## 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 | ||
@@ -23,13 +25,10 @@ | ||
- [ ] Rewrite this in node to publish as an npm package | ||
- [ ] Figure out how to fail gracefully instead of exit 1 | ||
- [ ] Try openai curie And/OR codex | ||
- Rewrite this in node to publish as an npm package | ||
After: | ||
Future tasks: | ||
- [ ] Rewrite in TypeScript | ||
- [ ] Look into better conventional commit support, look at other CLIs | ||
- [ ] Try supporting more than 200 lines by grabbing the diff per file | ||
- [ ] Build landing page | ||
# How to run new version | ||
- Experiment with openai curie and/or codex | ||
- Add conventional commit support | ||
- Try supporting more than 200 lines by grabbing the diff per file | ||
- Rewrite in TypeScript | ||
- Build landing page for the 2.0 launch |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
991749
0.23%7
40%150
127.27%2
-33.33%1
Infinity%34
-2.86%2
Infinity%3
200%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added