Compare commits

..

12 Commits

Author SHA1 Message Date
di-sukharev
1347962a93 1.0.10 2023-03-10 22:42:33 +08:00
di-sukharev
3ca9b9752f * fix(api.ts): add process.exit(1) to terminate the process if apiKey is not provided 2023-03-10 22:41:53 +08:00
di-sukharev
50e2f67a9b 1.0.9 2023-03-10 17:56:21 +08:00
di-sukharev
c1a4c3daf2 * chore: update package description and keywords
* chore: update README with new package description and title
2023-03-10 17:55:51 +08:00
di-sukharev
e4de6d8186 * feat(README.md): add OpenCommit example image to README
* chore(README.md): update OPENAI_API_KEY config key to use 'your_api_key' instead of 'your token'
* chore(README.md): update description of where the api key is stored
2023-03-10 15:59:57 +08:00
di-sukharev
5abe5d715d * refactor(commit.ts): remove unnecessary blank lines
* feat(commit.ts): add spinner to show progress of `git push` command
* feat(commit.ts): show success message after successful `git push` command execution
2023-03-10 15:24:49 +08:00
di-sukharev
32c34abd22 1.0.8 2023-03-09 21:32:24 +08:00
di-sukharev
1050cad95d * refactor(commit.ts): extract stdout from git push command into a variable 2023-03-09 21:32:07 +08:00
di-sukharev
7bbc97980e * refactor(commit.ts): remove unused stdout variable and simplify pushSpinner.stop() call 2023-03-09 21:31:31 +08:00
di-sukharev
2a9a3d5818 * chore(README.md): add emoji to the project description 2023-03-09 21:30:44 +08:00
di-sukharev
22935f38ba 1.0.7 2023-03-09 21:29:52 +08:00
di-sukharev
4ae6361ad8 * chore(package.json): update description with emojis. 2023-03-09 21:29:28 +08:00
6 changed files with 19 additions and 9 deletions

BIN
.github/opencommit-example.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

View File

@@ -5,13 +5,16 @@
<h4 align="center">Author <a href="https://github.com/di-sukharev">@di-sukharev</a> <a href="https://twitter.com/io_Y_oi"><img src="https://img.shields.io/twitter/follow/io_Y_oi?style=flat&label=io_Y_oi&logo=twitter&color=0bf&logoColor=fff" align="center"></a>
</h4>
</div>
<p>AI generates conventional commits with mind-blowing accuracy</p>
<h2>GPT CLI to auto-generate impressive commits in 1 second</h2>
<p>Killing lame commits with AI 🤯🔫</p>
<a href="https://www.npmjs.com/package/opencommit"><img src="https://img.shields.io/npm/v/opencommit" alt="Current version"></a>
</div>
---
## Examples
<div align="center">
<img src=".github/opencommit-example.png" alt="OpenCommit example"/>
</div>
All the commits in this repo are done with OpenCommit — look into [the commits](https://github.com/di-sukharev/opencommit/commit/eae7618d575ee8d2e9fff5de56da79d40c4bc5fc) to see how OpenCommit works. Emoji and long commit description text is configurable.
@@ -30,10 +33,10 @@ All the commits in this repo are done with OpenCommit — look into [the commits
3. Set the key to opencommit config:
```sh
opencommit config set OPENAI_API_KEY=<your token>
opencommit config set OPENAI_API_KEY=<your_api_key>
```
Your token isn't sent to anyone, it's saved in `~/.opencommit` config file.
Your api key is stored locally in `~/.opencommit` config file.
## Usage

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "open-commit",
"version": "1.0.6",
"version": "1.0.10",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "open-commit",
"version": "1.0.6",
"version": "1.0.10",
"license": "ISC",
"dependencies": {
"@clack/prompts": "^0.6.1",

View File

@@ -1,13 +1,17 @@
{
"name": "opencommit",
"version": "1.0.6",
"description": "AI generates conventional commits with mind-blowing accuracy.",
"version": "1.0.10",
"description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
"keywords": [
"git",
"chatgpt",
"gpt",
"ai",
"openai",
"opencommit",
"aicommit",
"aicommits",
"gptcommit",
"commit"
],
"main": "cli.js",

View File

@@ -20,6 +20,7 @@ if (!apiKey) {
outro(
'For help Look into README https://github.com/di-sukharev/opencommit#setup'
);
process.exit(1);
}
// if (!apiKey) {

View File

@@ -53,10 +53,12 @@ ${chalk.grey('——————————————————')}`
if (isPushConfirmedByUser && !isCancel(isPushConfirmedByUser)) {
const pushSpinner = spinner();
pushSpinner.start('Running `git push`');
const { stdout } = await execa('git', ['push']);
pushSpinner.stop(`${chalk.green('✔')} successfully pushed all commits`);
outro(stdout);
if (stdout) outro(stdout);
}
} else outro(`${chalk.gray('✖')} process cancelled`);
};