gims 0.6.7 โ 0.8.2
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/CHANGELOG.md +80 -0
- package/README.md +280 -40
- package/bin/gims.js +834 -103
- package/bin/lib/ai/providers.js +58 -51
- package/bin/lib/git/analyzer.js +118 -47
- package/bin/lib/utils/colors.js +15 -0
- package/bin/lib/utils/intelligence.js +421 -0
- package/bin/lib/utils/progress.js +70 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.1] - 2025-12-19
|
|
4
|
+
|
|
5
|
+
### ๐ Smart Sync Fix
|
|
6
|
+
New `g fix` command to handle branch sync issues (diverged/ahead/behind):
|
|
7
|
+
|
|
8
|
+
| Option | What it does |
|
|
9
|
+
|--------|--------------|
|
|
10
|
+
| `g fix` | Show status and available options |
|
|
11
|
+
| `g fix --ai` | Get AI recommendation for best approach |
|
|
12
|
+
| `g fix --merge` | Merge remote into local |
|
|
13
|
+
| `g fix --rebase` | Rebase local onto remote |
|
|
14
|
+
| `g fix --local --yes` | Force push local to remote |
|
|
15
|
+
| `g fix --remote --yes` | Reset to remote, discard local |
|
|
16
|
+
|
|
17
|
+
### ๐ง Conflict Helper
|
|
18
|
+
New `g conflicts` command shows conflicted files and how to resolve them.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## [0.8.0] - 2025-12-19
|
|
23
|
+
|
|
24
|
+
### ๐ New Workflow Shorthand Commands
|
|
25
|
+
Multi-step git workflows simplified to single commands:
|
|
26
|
+
|
|
27
|
+
| Command | Alias | What it does |
|
|
28
|
+
|---------|-------|--------------|
|
|
29
|
+
| `safe-pull` | `sp` | Stash โ Pull โ Stash pop (safe pull with uncommitted changes) |
|
|
30
|
+
| `main` | - | Switch to main/master and pull latest |
|
|
31
|
+
| `unstage` | `us` | Unstage all staged files |
|
|
32
|
+
| `discard` | `x` | Discard all changes (with --yes confirmation) |
|
|
33
|
+
| `stash-save` | `ss` | Quick stash all changes with auto-generated name |
|
|
34
|
+
| `stash-pop` | `pop` | Pop the latest stash |
|
|
35
|
+
| `delete-branch` | `del` | Delete branch locally and remotely |
|
|
36
|
+
| `cleanup` | `clean` | Remove local branches deleted from remote |
|
|
37
|
+
| `last` | - | Show last commit details and diff |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## [0.7.2] - 2025-12-18
|
|
42
|
+
|
|
43
|
+
### ๐ Bug Fix
|
|
44
|
+
- **Fixed progress spinner garbage output**: Spinner now properly clears the line when stopping, preventing partial text artifacts like ` (1ms)rating AI review โ `
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## [0.7.1] - 2025-12-18
|
|
49
|
+
|
|
50
|
+
### ๐ Bug Fix
|
|
51
|
+
- **Fixed AI suggestions in interactive mode**: Multiple suggestions now correctly display message strings instead of `[object Object]`
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## [0.7.0] - 2025-12-18
|
|
56
|
+
|
|
57
|
+
### ๐ New Intelligent Commands
|
|
58
|
+
- **`g wip`**: Quick work-in-progress commit - stage all and commit instantly
|
|
59
|
+
- **`g today` / `g t`**: Show all commits made today with timestamps
|
|
60
|
+
- **`g stats`**: Personal commit statistics with streak tracking, type breakdown, and style analysis
|
|
61
|
+
- **`g review` / `g r`**: AI code review before committing - shows complexity, detected patterns, and suggested message
|
|
62
|
+
- **`g split`**: Smart suggestions for splitting large changesets into atomic commits
|
|
63
|
+
|
|
64
|
+
### โจ Enhanced Status
|
|
65
|
+
- **File type emojis**: ๐ JS, ๐จ CSS, ๐งช tests, โ๏ธ config, ๐ฆ package.json, etc.
|
|
66
|
+
- **Session awareness**: Shows time since last commit and daily commit count
|
|
67
|
+
- **Branch context**: Detects branch type from naming patterns (feat/, fix/, etc.)
|
|
68
|
+
- **Smarter insights**: Suggests staging, split commits, and more
|
|
69
|
+
|
|
70
|
+
### ๐ง Intelligence Module
|
|
71
|
+
- **Commit pattern analysis**: Learns your style from git history
|
|
72
|
+
- **Semantic change detection**: Identifies breaking changes, new features, bug fixes
|
|
73
|
+
- **Complexity analysis**: Visual indicators for simple/moderate/complex changes
|
|
74
|
+
|
|
75
|
+
### ๐ UX Improvements
|
|
76
|
+
- **Time elapsed display**: Shows how long operations take
|
|
77
|
+
- **Random tips**: Contextual tips to help learn GIMS features
|
|
78
|
+
- **Cached response indicators**: Know when AI cache is used
|
|
79
|
+
- **Better quick-help**: Reorganized command reference with new commands
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
3
83
|
## [0.6.7] - 2025-10-26
|
|
4
84
|
|
|
5
85
|
### ๐ง Fixes
|
package/README.md
CHANGED
|
@@ -1,78 +1,318 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# ๐ GIMS - Git Made Simple
|
|
2
4
|
|
|
3
5
|
[](https://npmjs.org/package/gims)
|
|
6
|
+
[](https://npmjs.org/package/gims)
|
|
4
7
|
[](https://opensource.org/licenses/MIT)
|
|
5
8
|
[](https://github.com/s41r4j/gims)
|
|
9
|
+
[](https://nodejs.org)
|
|
6
10
|
|
|
7
11
|
**AI-powered Git CLI that writes your commit messages for you**
|
|
8
12
|
|
|
9
13
|
*Because life's too short for "fix stuff" commits* ๐ฏ
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
[Installation](#-installation) โข [Quick Start](#-quick-start) โข [Commands](#-commands) โข [AI Setup](#-ai-providers) โข [Configuration](#-configuration)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## โจ Features
|
|
22
|
+
|
|
23
|
+
- ๐ค **AI-Generated Commits** โ Let AI analyze your changes and write meaningful commit messages
|
|
24
|
+
- ๐ **Smart Status** โ Enhanced git status with file type detection and insights
|
|
25
|
+
- ๐ **Workflow Shortcuts** โ Common multi-step operations condensed to single commands
|
|
26
|
+
- ๐ **Commit Analytics** โ Track your commit streak, patterns, and statistics
|
|
27
|
+
- ๐ **Code Review** โ Get AI-powered code review before committing
|
|
28
|
+
- ๐ก๏ธ **Safe Operations** โ Built-in safeguards for destructive commands
|
|
29
|
+
- โก **Lightning Fast** โ Optimized for speed with intelligent caching
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## ๐ฆ Installation
|
|
12
34
|
|
|
13
35
|
```bash
|
|
14
|
-
# Install
|
|
15
36
|
npm install -g gims
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Requirements:** Node.js >= 18.18.0
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## โก Quick Start
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# 1. Setup AI provider (choose one)
|
|
47
|
+
g setup --api-key gemini # ๐ Free & fast (recommended)
|
|
48
|
+
g setup --api-key openai # ๐ฏ High quality
|
|
49
|
+
g setup --api-key groq # โก Ultra fast
|
|
50
|
+
|
|
51
|
+
# 2. Start using it!
|
|
52
|
+
g s # Check status with AI insights
|
|
53
|
+
g o # AI commit + push (one command!)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Your New Workflow
|
|
16
57
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
58
|
+
```bash
|
|
59
|
+
# Before (traditional git)
|
|
60
|
+
git add .
|
|
61
|
+
git commit -m "trying to think of message..."
|
|
62
|
+
git push
|
|
21
63
|
|
|
22
|
-
#
|
|
23
|
-
g
|
|
24
|
-
g o # AI commit + push
|
|
64
|
+
# After (with GIMS)
|
|
65
|
+
g o # That's it. AI handles the rest.
|
|
25
66
|
```
|
|
26
67
|
|
|
27
|
-
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## ๐ Commands
|
|
71
|
+
|
|
72
|
+
### ๐ง Core Commands
|
|
73
|
+
|
|
74
|
+
| Command | Alias | Description |
|
|
75
|
+
|---------|-------|-------------|
|
|
76
|
+
| `g status` | `g s` | Enhanced status with AI insights & file type emojis |
|
|
77
|
+
| `g oneshot` | `g o` | Stage all โ AI commit โ Push (full workflow) |
|
|
78
|
+
| `g local` | `g l` | Stage all โ AI commit (no push) |
|
|
79
|
+
| `g suggest` | `g sg` | Get AI commit message suggestions |
|
|
80
|
+
| `g wip` | โ | Quick work-in-progress commit |
|
|
81
|
+
|
|
82
|
+
### ๐ Analytics & Review
|
|
83
|
+
|
|
84
|
+
| Command | Alias | Description |
|
|
85
|
+
|---------|-------|-------------|
|
|
86
|
+
| `g review` | `g r` | AI code review with complexity analysis |
|
|
87
|
+
| `g today` | `g t` | Show all commits made today |
|
|
88
|
+
| `g stats` | โ | Personal statistics: streak, patterns, style |
|
|
89
|
+
| `g split` | โ | AI suggestions for splitting large changesets |
|
|
90
|
+
|
|
91
|
+
### โก Workflow Shortcuts
|
|
92
|
+
|
|
93
|
+
| Command | Alias | What it does |
|
|
94
|
+
|---------|-------|--------------|
|
|
95
|
+
| `g safe-pull` | `g sp` | Stash โ Pull โ Pop (safe pull with uncommitted changes) |
|
|
96
|
+
| `g fix` | โ | Smart fix for diverged/ahead/behind branches |
|
|
97
|
+
| `g main` | โ | Switch to main/master + pull latest |
|
|
98
|
+
| `g stash-save` | `g ss` | Quick stash with auto-generated name |
|
|
99
|
+
| `g stash-pop` | `g pop` | Pop the latest stash |
|
|
100
|
+
| `g unstage` | `g us` | Unstage all staged files |
|
|
101
|
+
| `g discard` | `g x` | Discard all changes (requires `--yes`) |
|
|
102
|
+
|
|
103
|
+
### ๐ ๏ธ Git Helpers
|
|
104
|
+
|
|
105
|
+
| Command | Alias | Description |
|
|
106
|
+
|---------|-------|-------------|
|
|
107
|
+
| `g last` | โ | Show last commit details with diff |
|
|
108
|
+
| `g conflicts` | โ | Conflict resolution helper |
|
|
109
|
+
| `g cleanup` | `g clean` | Remove local branches deleted from remote |
|
|
110
|
+
| `g list` | `g ls` | Compact commit history |
|
|
111
|
+
| `g amend` | `g a` | Amend the previous commit |
|
|
112
|
+
| `g undo` | `g u` | Undo last commit (keep changes) |
|
|
113
|
+
| `g delete-branch` | `g del` | Delete branch locally and remotely |
|
|
114
|
+
|
|
115
|
+
### ๐ง Setup & Config
|
|
28
116
|
|
|
29
117
|
| Command | Description |
|
|
30
118
|
|---------|-------------|
|
|
31
|
-
| `g
|
|
32
|
-
| `g
|
|
33
|
-
| `g
|
|
34
|
-
| `g
|
|
35
|
-
| `g
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
| `g h` | Commit history (alias for ls) |
|
|
39
|
-
| `g a` | Amend previous commit (keeps message) |
|
|
119
|
+
| `g setup` | Interactive setup wizard |
|
|
120
|
+
| `g setup --api-key <provider>` | Quick API key setup |
|
|
121
|
+
| `g config --list` | View all settings |
|
|
122
|
+
| `g config --set key=value` | Update configuration |
|
|
123
|
+
| `g quick-help` / `g q` | Quick command reference |
|
|
124
|
+
|
|
125
|
+
---
|
|
40
126
|
|
|
41
|
-
## ๐ค AI
|
|
127
|
+
## ๐ค AI Providers
|
|
42
128
|
|
|
43
|
-
|
|
44
|
-
- **OpenAI**: `gpt-5` (High quality)
|
|
45
|
-
- **Groq**: `groq/compound` (Ultra fast)
|
|
129
|
+
GIMS supports multiple AI providers. Choose based on your needs:
|
|
46
130
|
|
|
47
|
-
|
|
131
|
+
| Provider | Model | Speed | Quality | Cost |
|
|
132
|
+
|----------|-------|-------|---------|------|
|
|
133
|
+
| **Gemini** | `gemini-3-flash-preview` | โกโกโก | โญโญโญ | ๐ Free |
|
|
134
|
+
| **Groq** | `groq/compound` | โกโกโกโก | โญโญโญ | ๐ Free tier |
|
|
135
|
+
| **OpenAI** | `gpt-5.2-2025-12-11` | โกโก | โญโญโญโญ | ๐ฐ Paid |
|
|
136
|
+
|
|
137
|
+
### Setting Up API Keys
|
|
138
|
+
|
|
139
|
+
#### Option 1: Interactive Setup (Recommended)
|
|
48
140
|
|
|
49
141
|
```bash
|
|
50
|
-
#
|
|
51
|
-
g
|
|
52
|
-
g
|
|
53
|
-
g o # Quick commit + push
|
|
54
|
-
|
|
55
|
-
# Advanced
|
|
56
|
-
g sg --multiple # Get 3 AI suggestions
|
|
57
|
-
g ll # Detailed history
|
|
58
|
-
g sync --rebase # Smart sync
|
|
142
|
+
g setup --api-key gemini # Guided setup with instructions
|
|
143
|
+
g setup --api-key openai
|
|
144
|
+
g setup --api-key groq
|
|
59
145
|
```
|
|
60
146
|
|
|
147
|
+
#### Option 2: Environment Variables (Auto-detected)
|
|
148
|
+
|
|
149
|
+
GIMS automatically detects API keys from environment variables. Add to your shell profile (`~/.zshrc`, `~/.bashrc`, etc.):
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Gemini (recommended - free)
|
|
153
|
+
export GEMINI_API_KEY="your-api-key-here"
|
|
154
|
+
|
|
155
|
+
# OpenAI
|
|
156
|
+
export OPENAI_API_KEY="your-api-key-here"
|
|
157
|
+
|
|
158
|
+
# Groq
|
|
159
|
+
export GROQ_API_KEY="your-api-key-here"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Then reload your shell: `source ~/.zshrc`
|
|
163
|
+
|
|
164
|
+
> **๐ก Tip:** If multiple API keys are set, GIMS auto-selects in order: Gemini โ OpenAI โ Groq
|
|
165
|
+
|
|
166
|
+
### Getting API Keys
|
|
167
|
+
|
|
168
|
+
<details>
|
|
169
|
+
<summary><b>๐ท Gemini (Recommended)</b></summary>
|
|
170
|
+
|
|
171
|
+
1. Visit [Google AI Studio](https://aistudio.google.com/app/apikey)
|
|
172
|
+
2. Create a new API key
|
|
173
|
+
3. Set it: `export GEMINI_API_KEY="your-key"` or run `g setup --api-key gemini`
|
|
174
|
+
|
|
175
|
+
</details>
|
|
176
|
+
|
|
177
|
+
<details>
|
|
178
|
+
<summary><b>๐ข Groq</b></summary>
|
|
179
|
+
|
|
180
|
+
1. Visit [Groq Console](https://console.groq.com/keys)
|
|
181
|
+
2. Create a new API key
|
|
182
|
+
3. Set it: `export GROQ_API_KEY="your-key"` or run `g setup --api-key groq`
|
|
183
|
+
|
|
184
|
+
</details>
|
|
185
|
+
|
|
186
|
+
<details>
|
|
187
|
+
<summary><b>๐ก OpenAI</b></summary>
|
|
188
|
+
|
|
189
|
+
1. Visit [OpenAI Platform](https://platform.openai.com/api-keys)
|
|
190
|
+
2. Create a new API key
|
|
191
|
+
3. Set it: `export OPENAI_API_KEY="your-key"` or run `g setup --api-key openai`
|
|
192
|
+
|
|
193
|
+
</details>
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
61
197
|
## ๐ง Configuration
|
|
62
198
|
|
|
63
199
|
```bash
|
|
64
|
-
|
|
65
|
-
g config --
|
|
66
|
-
|
|
200
|
+
# View current settings
|
|
201
|
+
g config --list
|
|
202
|
+
|
|
203
|
+
# Enable conventional commits (feat:, fix:, etc.)
|
|
204
|
+
g config --set conventional=true
|
|
205
|
+
|
|
206
|
+
# Auto-stage all changes before commit
|
|
207
|
+
g config --set autoStage=true
|
|
208
|
+
|
|
209
|
+
# Disable clipboard copy
|
|
210
|
+
g config --set copy=false
|
|
211
|
+
|
|
212
|
+
# Show/hide progress indicators
|
|
213
|
+
g config --set progressIndicators=true
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Configuration Options
|
|
217
|
+
|
|
218
|
+
| Option | Type | Default | Description |
|
|
219
|
+
|--------|------|---------|-------------|
|
|
220
|
+
| `provider` | string | `auto` | AI provider: `gemini`, `openai`, `groq`, `auto`, `none` |
|
|
221
|
+
| `model` | string | โ | Override default model for provider |
|
|
222
|
+
| `conventional` | boolean | `false` | Use Conventional Commits format |
|
|
223
|
+
| `autoStage` | boolean | `false` | Auto-stage all changes |
|
|
224
|
+
| `copy` | boolean | `true` | Copy suggestions to clipboard |
|
|
225
|
+
| `progressIndicators` | boolean | `true` | Show progress spinners |
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## ๐ Usage Examples
|
|
230
|
+
|
|
231
|
+
### Daily Workflow
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
g s # Check what's changed
|
|
235
|
+
g sp # Safe pull (won't lose uncommitted work)
|
|
236
|
+
# ... do your work ...
|
|
237
|
+
g o # Commit everything with AI message + push
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Code Review Before Commit
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
g r # Get AI review of your changes
|
|
244
|
+
g o # Commit if review looks good
|
|
67
245
|
```
|
|
68
246
|
|
|
69
|
-
|
|
247
|
+
### Handling Branch Issues
|
|
70
248
|
|
|
71
249
|
```bash
|
|
72
|
-
g
|
|
73
|
-
g
|
|
250
|
+
g fix # See sync status and options
|
|
251
|
+
g fix --ai # Get AI recommendation
|
|
252
|
+
g fix --merge # Merge remote changes
|
|
253
|
+
g fix --rebase # Rebase onto remote
|
|
74
254
|
```
|
|
75
255
|
|
|
256
|
+
### Working with Stashes
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
g ss # Quick stash
|
|
260
|
+
g main # Switch to main and pull
|
|
261
|
+
# ... check something ...
|
|
262
|
+
g pop # Get your work back
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Large Changeset
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
g split # Get suggestions for splitting changes
|
|
269
|
+
g sg --multiple # Get multiple commit message options
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## ๐ GIMS vs Plain Git
|
|
275
|
+
|
|
276
|
+
| Task | Git | GIMS |
|
|
277
|
+
|------|-----|------|
|
|
278
|
+
| Commit & push | `git add . && git commit -m "msg" && git push` | `g o` |
|
|
279
|
+
| Pull with uncommitted changes | `git stash && git pull && git stash pop` | `g sp` |
|
|
280
|
+
| Check status | `git status` | `g s` (+ AI insights) |
|
|
281
|
+
| Fix diverged branch | Multiple commands + decisions | `g fix --ai` |
|
|
282
|
+
| Code review | External tool | `g r` |
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## ๐ Getting Help
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
g --help # Full command list with descriptions
|
|
290
|
+
g q # Quick reference card
|
|
291
|
+
g <command> -h # Help for specific command
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## ๐ค Contributing
|
|
297
|
+
|
|
298
|
+
Contributions are welcome! Feel free to:
|
|
299
|
+
|
|
300
|
+
- ๐ Report bugs
|
|
301
|
+
- ๐ก Suggest features
|
|
302
|
+
- ๐ง Submit pull requests
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
76
306
|
## ๐ License
|
|
77
307
|
|
|
78
|
-
MIT ยฉ [S41R4J](https://github.com/s41r4j)
|
|
308
|
+
MIT ยฉ [S41R4J](https://github.com/s41r4j)
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
<div align="center">
|
|
313
|
+
|
|
314
|
+
**[โฌ Back to Top](#-gims---git-made-simple)**
|
|
315
|
+
|
|
316
|
+
Made with โค๏ธ for developers who'd rather code than write commit messages
|
|
317
|
+
|
|
318
|
+
</div>
|