Add necessary files to enable AI commit feature - .example.env, .gitignore, README.md, aicommit.mjs.
This commit is contained in:
1
.example.env
Normal file
1
.example.env
Normal file
@@ -0,0 +1 @@
|
||||
{OPENAI_API_KEY: 'sk-xxxxxxxxxxxxxxxxxxxxxxxxxxx'}
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.env.json
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# AI Commit
|
||||
|
||||
Have AI write your git commit messages for you so you never have to waste time writing commits again.
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env zx
|
||||
|
||||
let { OPENAI_API_KEY } = await fs.readJson("./.env.json");
|
||||
|
||||
let diff = await $`git diff --cached`;
|
||||
|
||||
// echo("Current branch is", branch);
|
||||
// console.log(branch);
|
||||
echo(diff);
|
||||
|
||||
Reference in New Issue
Block a user