nocommit 0.0.1 → 0.0.3

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.
Files changed (3) hide show
  1. package/README.md +170 -5
  2. package/dist/index.js +1 -1
  3. package/package.json +23 -10
package/README.md CHANGED
@@ -1,15 +1,180 @@
1
+ <div align="center">
2
+
1
3
  # nocommit
2
4
 
3
- To install dependencies:
5
+ **AI-powered git commit messages using Google Gemini**
6
+
7
+ Never write a commit message again.
8
+
9
+ [![npm version](https://img.shields.io/npm/v/nocommit)](https://www.npmjs.com/package/nocommit)
10
+ [![License](https://img.shields.io/npm/l/nocommit)](https://github.com/asimar007/no-commit/blob/main/LICENSE)
11
+
12
+ </div>
13
+
14
+ ---
15
+
16
+ ## Why nocommit?
17
+
18
+ Writing good commit messages takes time. **nocommit** analyzes your staged changes and generates meaningful, conventional commit messages in seconds using Google's Gemini AI.
19
+
20
+ ```bash
21
+ $ git add .
22
+ $ nocommit
23
+
24
+ ✨ Generated commit message:
25
+ feat: add user authentication with JWT tokens
26
+
27
+ ? What would you like to do?
28
+ ❯ Commit
29
+ Edit
30
+ Regenerate
31
+ Cancel
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ```bash
37
+ # Install globally
38
+ npm install -g nocommit
39
+
40
+ # Set your Gemini API key
41
+ nocommit config set GEMINI_API_KEY=your_api_key_here
42
+
43
+ # Stage changes and generate commit
44
+ git add .
45
+ nocommit
46
+ ```
47
+
48
+ Get your API key from [Google AI Studio](https://aistudio.google.com/apikey).
49
+
50
+ ## Requirements
51
+
52
+ - Node.js v18 or higher
53
+ - A Google Gemini API key
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ npm install -g nocommit
59
+ ```
60
+
61
+ Verify installation:
62
+
63
+ ```bash
64
+ nocommit --version
65
+ ```
66
+
67
+ ### Upgrading
68
+
69
+ ```bash
70
+ npm update -g nocommit
71
+ ```
72
+
73
+ ## Usage
74
+
75
+ ### Basic Usage
76
+
77
+ Stage your changes, then run nocommit:
78
+
79
+ ```bash
80
+ git add <files...>
81
+ nocommit
82
+ ```
83
+
84
+ ### Command Options
85
+
86
+ | Flag | Description |
87
+ | ------------ | ------------------------------------------- |
88
+ | `-a, --all` | Stage all tracked changes before generating |
89
+ | `-y, --yes` | Skip confirmation and commit immediately |
90
+ | `-h, --help` | Show help |
91
+ | `--version` | Show version number |
92
+
93
+ ### Examples
94
+
95
+ ```bash
96
+ # Generate message for staged changes
97
+ nocommit
98
+
99
+ # Stage all changes and generate message
100
+ nocommit -a
101
+
102
+ # Stage all and commit without confirmation
103
+ nocommit -ay
104
+ ```
105
+
106
+ ### Interactive Menu
107
+
108
+ After generating a message, you'll see these options:
109
+
110
+ - **Commit** — Use the message and commit
111
+ - **Edit** — Modify the message before committing
112
+ - **Regenerate** — Get a new suggestion
113
+ - **Cancel** — Exit without committing
114
+
115
+ ## Configuration
116
+
117
+ Manage settings with `nocommit config`:
4
118
 
5
119
  ```bash
6
- bun install
120
+ # View all settings
121
+ nocommit config get
122
+
123
+ # Get a specific value
124
+ nocommit config get model
125
+
126
+ # Set a value
127
+ nocommit config set model=gemini-2.0-flash
7
128
  ```
8
129
 
9
- To run:
130
+ ### Available Options
131
+
132
+ | Option | Default | Description |
133
+ | ---------------- | ------------------ | --------------------------------------- |
134
+ | `GEMINI_API_KEY` | — | Your Google Gemini API key (required) |
135
+ | `model` | `gemini-2.5-flash` | Gemini model to use |
136
+ | `maxLength` | `72` | Max commit message length (20–500) |
137
+ | `timeout` | `30000` | API timeout in ms (5000–120000) |
138
+ | `generate` | `3` | Number of suggestions to generate (1–5) |
139
+
140
+ ### Example Configuration
10
141
 
11
142
  ```bash
12
- bun run index.ts
143
+ # Use a different model
144
+ nocommit config set model=gemini-2.0-flash
145
+
146
+ # Allow longer commit messages
147
+ nocommit config set maxLength=100
148
+
149
+ # Generate only one suggestion
150
+ nocommit config set generate=1
151
+
152
+ # Increase timeout for slow connections
153
+ nocommit config set timeout=60000
13
154
  ```
14
155
 
15
- This project was created using `bun init` in bun v1.3.0. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
156
+ ## How It Works
157
+
158
+ 1. **Diff** — nocommit runs `git diff --staged` to capture your changes
159
+ 2. **Analyze** — Changes are sent to Google's Gemini AI
160
+ 3. **Generate** — Gemini returns commit message suggestions following conventional commit format
161
+ 4. **Commit** — You review, optionally edit, and commit
162
+
163
+ ## Troubleshooting
164
+
165
+ **"No staged changes found"**
166
+ Stage files first with `git add <files>` or use `nocommit -a`.
167
+
168
+ **"API key not configured"**
169
+ Set your key with `nocommit config set GEMINI_API_KEY=your_key`.
170
+
171
+ **Request timeout**
172
+ Increase timeout: `nocommit config set timeout=60000`
173
+
174
+ ## Contributing
175
+
176
+ Contributions are welcome! Check out the [GitHub repository](https://github.com/asimar007/no-commit) to report issues or submit pull requests.
177
+
178
+ ## Maintainers
179
+
180
+ - **Asim Sk** — [@asimar007](https://github.com/asimar007)
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { KnownError, handleCliError } from "./error.js";
9
9
  const program = new Command();
10
10
  program
11
11
  .name("nocommit")
12
- .version("0.0.0")
12
+ .version("0.0.3")
13
13
  .description("AI-powered git commit message generator")
14
14
  .option("-a, --all", "Stage all tracked changes before committing")
15
15
  .option("-y, --yes", "Skip confirmation and commit with first suggestion");
package/package.json CHANGED
@@ -1,27 +1,42 @@
1
1
  {
2
2
  "name": "nocommit",
3
- "version": "0.0.1",
4
- "description": "Writes your git commit messages for you with AI using Gemini",
3
+ "version": "0.0.3",
4
+ "description": "AI-powered CLI that writes your git commit messages using Google Gemini. Never write a commit message again.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
- "nocommit": "dist/index.js",
9
- "nc": "dist/index.js"
8
+ "nocommit": "dist/index.js"
10
9
  },
11
10
  "scripts": {
12
11
  "build": "tsc",
13
12
  "dev": "tsc --watch",
14
13
  "start": "node dist/index.js",
15
- "prepublishOnly": "npm run build"
14
+ "prepublishOnly": "npm run build",
15
+ "type-check": "tsc --noEmit"
16
16
  },
17
17
  "keywords": [
18
18
  "git",
19
19
  "commit",
20
20
  "ai",
21
21
  "gemini",
22
- "cli"
22
+ "cli",
23
+ "automation",
24
+ "developer-tools",
25
+ "commit-message",
26
+ "ai-tools"
23
27
  ],
24
- "author": "Asim Sk",
28
+ "author": {
29
+ "name": "Asim Sk",
30
+ "url": "https://github.com/asimar007"
31
+ },
32
+ "homepage": "https://github.com/asimar007/no-commit#readme",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/asimar007/no-commit.git"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/asimar007/no-commit/issues"
39
+ },
25
40
  "files": [
26
41
  "dist"
27
42
  ],
@@ -29,9 +44,7 @@
29
44
  "node": ">=18.0.0"
30
45
  },
31
46
  "devDependencies": {
32
- "@types/node": "^25.0.10"
33
- },
34
- "peerDependencies": {
47
+ "@types/node": "^25.0.10",
35
48
  "typescript": "^5.9.3"
36
49
  },
37
50
  "dependencies": {