nocommit 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/index.js +11 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,8 +35,10 @@ feat: add user authentication with JWT tokens
|
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
# Install (choose one)
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
npm install -g nocommit
|
|
39
|
+
|
|
40
|
+
brew tap asimar007/no-commit https://github.com/asimar007/no-commit
|
|
41
|
+
brew install nocommit
|
|
40
42
|
|
|
41
43
|
# Set your Gemini API key
|
|
42
44
|
nocommit config set GEMINI_API_KEY=your_api_key_here
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import {
|
|
3
|
+
import { outro, spinner, select, text, isCancel } from "@clack/prompts";
|
|
4
4
|
import pc from "picocolors";
|
|
5
5
|
import { setConfig, getConfig } from "./config.js";
|
|
6
6
|
import { assertGitRepo, hasStagedChanges, stageAllChanges, commitChanges, getStagedFiles, buildDiffSnippets, } from "./git.js";
|
|
7
7
|
import { generateCommitMessages } from "./ai.js";
|
|
8
8
|
import { KnownError, handleCliError } from "./error.js";
|
|
9
|
+
const logo = `▐▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▌
|
|
10
|
+
▐███╗ ██╗ ██████╗ ██████╗ ██████╗ ███╗ ███╗███╗ ███╗██╗████████╗▌
|
|
11
|
+
▐████╗ ██║██╔═══██╗ ██╔════╝██╔═══██╗████╗ ████║████╗ ████║██║╚══██╔══╝▌
|
|
12
|
+
▐██╔██╗ ██║██║ ██║ ██║ ██║ ██║██╔████╔██║██╔████╔██║██║ ██║ ▌
|
|
13
|
+
▐██║╚██╗██║██║ ██║ ██║ ██║ ██║██║╚██╔╝██║██║╚██╔╝██║██║ ██║ ▌
|
|
14
|
+
▐██║ ╚████║╚██████╔╝ ╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚═╝ ██║██║ ██║ ▌
|
|
15
|
+
▐╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ▌
|
|
16
|
+
▐▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▌`;
|
|
9
17
|
const program = new Command();
|
|
10
18
|
program
|
|
11
19
|
.name("nocommit")
|
|
12
|
-
.version("0.0.
|
|
20
|
+
.version("0.0.8")
|
|
13
21
|
.description("AI-powered git commit message generator")
|
|
14
22
|
.option("-a, --all", "Stage all tracked changes before committing")
|
|
15
23
|
.option("-y, --yes", "Skip confirmation and commit with first suggestion");
|
|
16
24
|
// Main command execution logic for generating and committing messages
|
|
17
25
|
program.action(async (options) => {
|
|
18
|
-
|
|
26
|
+
console.log(pc.yellow(logo));
|
|
19
27
|
try {
|
|
20
28
|
await assertGitRepo();
|
|
21
29
|
if (options.all) {
|
package/package.json
CHANGED