nocommit 0.0.2 → 0.0.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Asim Sk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,15 +1,198 @@
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 (choose one)
38
+ brew tap asimar007/no-commit https://github.com/asimar007/no-commit && brew install nocommit # Homebrew
39
+ npm install -g nocommit # npm
40
+
41
+ # Set your Gemini API key
42
+ nocommit config set GEMINI_API_KEY=your_api_key_here
43
+
44
+ # Stage changes and generate commit
45
+ git add .
46
+ nocommit
47
+ ```
48
+
49
+ Get your API key from [Google AI Studio](https://aistudio.google.com/apikey).
50
+
51
+ ## Requirements
52
+
53
+ - Node.js v18 or higher
54
+ - A Google Gemini API key
55
+
56
+ ## Installation
57
+
58
+ ### Using Homebrew (macOS/Linux)
59
+
60
+ ```bash
61
+ brew tap asimar007/no-commit https://github.com/asimar007/no-commit
62
+ brew install nocommit
63
+ ```
64
+
65
+ ### Using npm
66
+
67
+ ```bash
68
+ npm install -g nocommit
69
+ ```
70
+
71
+ Verify installation:
72
+
73
+ ```bash
74
+ nocommit --version
75
+ ```
76
+
77
+ ### Upgrading
78
+
79
+ ```bash
80
+ # Homebrew
81
+ brew upgrade nocommit
82
+
83
+ # npm
84
+ npm update -g nocommit
85
+ ```
86
+
87
+ ## Usage
88
+
89
+ ### Basic Usage
90
+
91
+ Stage your changes, then run nocommit:
92
+
93
+ ```bash
94
+ git add <files...>
95
+ nocommit
96
+ ```
97
+
98
+ ### Command Options
99
+
100
+ | Flag | Description |
101
+ | ------------ | ------------------------------------------- |
102
+ | `-a, --all` | Stage all tracked changes before generating |
103
+ | `-y, --yes` | Skip confirmation and commit immediately |
104
+ | `-h, --help` | Show help |
105
+ | `--version` | Show version number |
106
+
107
+ ### Examples
108
+
109
+ ```bash
110
+ # Generate message for staged changes
111
+ nocommit
112
+
113
+ # Stage all changes and generate message
114
+ nocommit -a
115
+
116
+ # Stage all and commit without confirmation
117
+ nocommit --yes
118
+ ```
119
+
120
+ ### Interactive Menu
121
+
122
+ After generating a message, you'll see these options:
123
+
124
+ - **Commit** — Use the message and commit
125
+ - **Edit** — Modify the message before committing
126
+ - **Regenerate** — Get a new suggestion
127
+ - **Cancel** — Exit without committing
128
+
129
+ ## Configuration
130
+
131
+ Manage settings with `nocommit config`:
4
132
 
5
133
  ```bash
6
- bun install
134
+ # View all settings
135
+ nocommit config get
136
+
137
+ # Get a specific value
138
+ nocommit config get model
139
+
140
+ # Set a value
141
+ nocommit config set model=gemini-2.0-flash
7
142
  ```
8
143
 
9
- To run:
144
+ ### Available Options
145
+
146
+ | Option | Default | Description |
147
+ | ---------------- | ------------------ | --------------------------------------- |
148
+ | `GEMINI_API_KEY` | — | Your Google Gemini API key (required) |
149
+ | `model` | `gemini-2.5-flash` | Gemini model to use |
150
+ | `maxLength` | `72` | Max commit message length (20–500) |
151
+ | `timeout` | `30000` | API timeout in ms (5000–120000) |
152
+ | `generate` | `3` | Number of suggestions to generate (1–5) |
153
+
154
+ ### Example Configuration
10
155
 
11
156
  ```bash
12
- bun run index.ts
157
+ # Use a different model
158
+ nocommit config set model=gemini-2.0-flash
159
+
160
+ # Allow longer commit messages
161
+ nocommit config set maxLength=100
162
+
163
+ # Generate only one suggestion
164
+ nocommit config set generate=1
165
+
166
+ # Increase timeout for slow connections
167
+ nocommit config set timeout=60000
13
168
  ```
14
169
 
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.
170
+ ## How It Works
171
+
172
+ 1. **Diff** — nocommit runs `git diff --staged` to capture your changes
173
+ 2. **Analyze** — Changes are sent to Google's Gemini AI
174
+ 3. **Generate** — Gemini returns commit message suggestions following conventional commit format
175
+ 4. **Commit** — You review, optionally edit, and commit
176
+
177
+ ## Troubleshooting
178
+
179
+ **"No staged changes found"**
180
+ Stage files first with `git add <files>` or use `nocommit -a`.
181
+
182
+ **"API key not configured"**
183
+ Set your key with `nocommit config set GEMINI_API_KEY=your_key`.
184
+
185
+ **Request timeout**
186
+ Increase timeout: `nocommit config set timeout=60000`
187
+
188
+ ## Contributing
189
+
190
+ Contributions are welcome! Check out the [GitHub repository](https://github.com/asimar007/no-commit) to report issues or submit pull requests.
191
+
192
+ ## Maintainers
193
+
194
+ - **Asim Sk** — [@asimar007](https://github.com/asimar007)
195
+
196
+ ## License
197
+
198
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
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.4")
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,7 +1,7 @@
1
1
  {
2
2
  "name": "nocommit",
3
- "version": "0.0.2",
4
- "description": "Writes your git commit messages for you with AI using Gemini",
3
+ "version": "0.0.4",
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": {
@@ -11,16 +11,33 @@
11
11
  "build": "tsc",
12
12
  "dev": "tsc --watch",
13
13
  "start": "node dist/index.js",
14
- "prepublishOnly": "npm run build"
14
+ "prepublishOnly": "npm run build",
15
+ "type-check": "tsc --noEmit"
15
16
  },
16
17
  "keywords": [
17
18
  "git",
18
19
  "commit",
19
20
  "ai",
20
21
  "gemini",
21
- "cli"
22
+ "cli",
23
+ "automation",
24
+ "developer-tools",
25
+ "commit-message",
26
+ "ai-tools"
22
27
  ],
23
- "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
+ },
40
+ "license": "MIT",
24
41
  "files": [
25
42
  "dist"
26
43
  ],
@@ -28,9 +45,7 @@
28
45
  "node": ">=18.0.0"
29
46
  },
30
47
  "devDependencies": {
31
- "@types/node": "^25.0.10"
32
- },
33
- "peerDependencies": {
48
+ "@types/node": "^25.0.10",
34
49
  "typescript": "^5.9.3"
35
50
  },
36
51
  "dependencies": {