diff --git a/.example.env b/.example.env new file mode 100644 index 0000000..2a3401c --- /dev/null +++ b/.example.env @@ -0,0 +1 @@ +{OPENAI_API_KEY: 'sk-xxxxxxxxxxxxxxxxxxxxxxxxxxx'} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b7869dd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..9e79cda --- /dev/null +++ b/README.md @@ -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. diff --git a/aicommit.mjs b/aicommit.mjs index e69de29..9b99551 100644 --- a/aicommit.mjs +++ b/aicommit.mjs @@ -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);