Skip to content

Commit bc0e7c3

Browse files
authored
Merge pull request #74 from Muneer320/main
2 parents 90459f3 + 9bcb696 commit bc0e7c3

File tree

18 files changed

+577
-110
lines changed

18 files changed

+577
-110
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# Test binary, built with `go test -c`
1212
*.test
1313

14+
# Test Files
15+
test_*
16+
1417
# Output of the go coverage tool, specifically when used with LiteIDE
1518
*.out
1619

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Looking to contribute? Check out:
3131
🔄 **Multiple LLM Support** - Choose between Google Gemini, Grok, Claude, ChatGPT, or Ollama (local)
3232
📝 **Context-Aware** - Analyzes staged and unstaged changes
3333
📋 **Auto-Copy to Clipboard** - Generated messages are automatically copied for instant use
34+
🎛️ **Interactive Review Flow** - Accept, regenerate with new styles, or open the message in your editor before committing
3435
📊 **File Statistics Display** - Visual preview of changed files and line counts
3536
🚀 **Easy to Use** - Simple CLI interface with beautiful terminal UI
3637
**Fast** - Quick generation of commit messages
@@ -62,7 +63,6 @@ You can use **Google Gemini**, **Grok**, **Claude**, **ChatGPT**, or **Ollama**
6263
echo 'export PATH=$PATH:/path/to/commit-msg' >> ~/.bashrc # or ~/.zshrc
6364
```
6465

65-
6666
### Option 2: Build from Source
6767

6868
Requirements: Go 1.23.4 or higher
@@ -105,6 +105,7 @@ go run cmd/commit-msg/main.go .
105105
```bash
106106
commit llm setup
107107
```
108+
108109
<img width="551" height="184" alt="Screenshot 2025-10-05 172731" src="https://github.com/user-attachments/assets/d71c38ad-4737-4ca8-bde3-fbff1066e62b" />
109110
<img width="536" height="235" alt="Screenshot 2025-10-05 172748" src="https://github.com/user-attachments/assets/b6c5c0f0-bf6b-4ae7-966a-4cc16419c294" />
110111

@@ -113,12 +114,12 @@ go run cmd/commit-msg/main.go .
113114
```bash
114115
commit llm update
115116
```
117+
116118
<img width="477" height="179" alt="Screenshot 2025-10-05 172814" src="https://github.com/user-attachments/assets/a8b7686f-106b-4408-8c73-254cdd7dc0b5" />
117119
<img width="551" height="176" alt="Screenshot 2025-10-05 172823" src="https://github.com/user-attachments/assets/b559c20c-4e18-4e46-97b3-0d26c278d9e0" />
118120

119121
### Example Workflow
120122

121-
122123
```bash
123124
# Make changes to your code
124125
echo "console.log('Hello World')" > app.js
@@ -137,6 +138,17 @@ commit .
137138
# You can now paste it with Ctrl+V (or Cmd+V on macOS)
138139
```
139140

141+
### Interactive Commit Workflow
142+
143+
Once the commit message is generated, the CLI now offers a quick review loop:
144+
145+
- **Accept & copy** – use the message as-is (it still lands on your clipboard automatically)
146+
- **Regenerate** – pick from presets like detailed summaries, casual tone, bug-fix emphasis, or provide custom instructions for the LLM
147+
- **Edit in your editor** – open the message in `$GIT_EDITOR`, `$VISUAL`, `$EDITOR`, or a sensible fallback (`notepad` on Windows, `nano` elsewhere)
148+
- **Exit** – leave without copying anything if the message isn't ready yet
149+
150+
This makes it easy to tweak the tone, iterate on suggestions, or fine-tune the final wording before you commit.
151+
140152
### Use Cases
141153

142154
- 📝 Generate commit messages for staged changes
@@ -162,20 +174,24 @@ commit .
162174
commit llm update
163175
```
164176

165-
**Set LLM as default**
177+
### Set LLM as default
178+
166179
```bash
167180
Select: Set Default
168181
```
169182

170-
**Change API Key**
183+
### Change API Key
184+
171185
```bash
172186
Select: Change API Key
173187
```
174188

175-
**Delete LLM**
189+
### Delete LLM
190+
176191
```bash
177192
Select: Delete
178193
```
194+
179195
---
180196

181197
## Getting API Keys
@@ -185,40 +201,35 @@ Select: Delete
185201
1. Visit [Google AI Studio](https://makersuite.google.com/app/apikey)
186202
2. Create a new API key
187203

188-
189204
**Grok (X.AI):**
190205

191206
1. Visit [X.AI Console](https://console.x.ai/)
192207
2. Generate an API key
193208

194-
195209
**Groq:**
196210

197211
1. Sign up at [Groq Cloud](https://console.groq.com/)
198212
2. Create an API key
199213

200-
201214
**Claude (Anthropic):**
202215

203216
1. Visit the [Anthropic Console](https://console.anthropic.com/)
204217
2. Create a new API key
205218

206-
207219
**OpenAI (ChatGPT):**
208220

209221
1. Visit [OpenAI Platform](https://platform.openai.com/api-keys)
210222
2. Create a new API key
211223

212-
213224
**Ollama (Local LLM):**
214225

215226
1. Install Ollama: Visit [Ollama.ai](https://ollama.ai/) and follow installation instructions
216227
2. Start Ollama: `ollama serve`
217-
3. Pull a model: `ollama pull llama3`
228+
3. Pull a model: `ollama pull llama3.1`
218229
4. Set environment variables:
219230
```bash
220231
export COMMIT_LLM=ollama
221-
export OLLAMA_MODEL=llama3 # llama3 by default
232+
export OLLAMA_MODEL=llama3.1 # llama3.1 by default
222233
```
223234

224235
---

0 commit comments

Comments
 (0)