gims 0.6.1 โ 0.6.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 +40 -98
- package/QUICK_REFERENCE.md +4 -4
- package/README.md +44 -457
- package/bin/gims.js +3 -3
- package/bin/lib/ai/providers.js +3 -3
- package/bin/lib/config/manager.js +6 -6
- package/package.json +1 -1
- package/.gimsrc +0 -10
- package/.github/workflows/release.yml +0 -25
- package/.kiro/steering/product.md +0 -21
- package/.kiro/steering/structure.md +0 -72
- package/.kiro/steering/tech.md +0 -68
- package/bin/lib/config.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,116 +1,58 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.6.
|
|
3
|
+
## [0.6.2] - 2024-12-19
|
|
4
4
|
|
|
5
|
-
### ๐
|
|
5
|
+
### ๐ AI Model Updates
|
|
6
|
+
- **Updated to latest AI models**:
|
|
7
|
+
- Gemini: `gemini-2.5-flash` (latest and fastest)
|
|
8
|
+
- OpenAI: `gpt-5` (latest GPT model)
|
|
9
|
+
- Groq: `groq/compound` (latest Groq model)
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **Setup Wizard** (`g setup`) - Interactive first-time configuration
|
|
12
|
-
- **Progress Indicators** - Visual feedback for all AI operations
|
|
13
|
-
|
|
14
|
-
#### **Smart Configuration Management**
|
|
15
|
-
- **Config Command** (`g config`) - Manage settings with `--set`, `--get`, `--list`
|
|
16
|
-
- **Project Type Detection** - Automatically detects React, Node, Python, etc.
|
|
17
|
-
- **Enhanced .gimsrc** - More configuration options and better validation
|
|
18
|
-
- **Global vs Local Config** - Project-specific or user-wide settings
|
|
19
|
-
|
|
20
|
-
#### **Advanced Git Operations**
|
|
21
|
-
- **Smart Sync** (`g sync`) - Intelligent pull with rebase/merge options
|
|
22
|
-
- **Enhanced Stash** (`g stash`) - AI-generated stash descriptions
|
|
23
|
-
- **Better Amend** (`g amend`) - Smart amend with AI message generation or `--no-edit`
|
|
24
|
-
- **Enhanced List** (`g ls`) - Unified list command with `--detailed` and `--limit` options
|
|
25
|
-
|
|
26
|
-
#### **AI & Performance Improvements**
|
|
27
|
-
- **Multiple Suggestions** (`g s --multiple`) - Generate 3 different commit message options
|
|
28
|
-
- **Caching System** - Cache AI responses for faster repeated operations
|
|
29
|
-
- **Provider Fallback Chain** - Automatic fallback between AI providers
|
|
30
|
-
- **Better Error Handling** - Actionable guidance and helpful suggestions
|
|
31
|
-
|
|
32
|
-
### ๐ง Architecture Improvements
|
|
33
|
-
|
|
34
|
-
#### **Modular Design**
|
|
35
|
-
- Split monolithic `gims.js` into focused modules:
|
|
36
|
-
- `lib/utils/` - Colors, progress indicators
|
|
37
|
-
- `lib/config/` - Configuration management
|
|
38
|
-
- `lib/git/` - Git analysis and insights
|
|
39
|
-
- `lib/ai/` - AI provider management
|
|
40
|
-
- `lib/commands/` - Interactive commands
|
|
41
|
-
|
|
42
|
-
#### **Enhanced Components**
|
|
43
|
-
- **GitAnalyzer** - Smart git status analysis with insights
|
|
44
|
-
- **AIProviderManager** - Improved AI handling with caching and fallbacks
|
|
45
|
-
- **ConfigManager** - Comprehensive configuration with validation
|
|
46
|
-
- **InteractiveCommands** - User interaction and guided workflows
|
|
47
|
-
- **Progress** - Visual feedback system
|
|
48
|
-
|
|
49
|
-
### ๐ User Experience Enhancements
|
|
50
|
-
|
|
51
|
-
#### **Better Feedback**
|
|
52
|
-
- Progress spinners for AI operations
|
|
53
|
-
- Success/warning/error indicators with colors
|
|
54
|
-
- Actionable error messages with suggestions
|
|
55
|
-
- Step-by-step guidance in interactive mode
|
|
56
|
-
|
|
57
|
-
#### **Smart Defaults**
|
|
58
|
-
- Auto-detection of project type and commit style
|
|
59
|
-
- Intelligent provider selection
|
|
60
|
-
- Context-aware configuration suggestions
|
|
11
|
+
### ๐ Documentation
|
|
12
|
+
- **Simplified README**: Reduced from verbose to concise format
|
|
13
|
+
- **Focused on essentials**: Quick start, main commands, examples
|
|
14
|
+
- **Better readability**: Easier to scan and understand
|
|
61
15
|
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
- More informative output
|
|
16
|
+
### ๐งน Repository Cleanup
|
|
17
|
+
- Removed development-specific files (.kiro/, .github/, coverage/)
|
|
18
|
+
- Updated .gitignore to exclude dev directories
|
|
19
|
+
- Cleaner package for npm distribution
|
|
67
20
|
|
|
68
|
-
|
|
21
|
+
---
|
|
69
22
|
|
|
70
|
-
|
|
71
|
-
- `GIMS_AUTO_STAGE` - Auto-stage changes by default
|
|
72
|
-
- `GIMS_CACHE` - Enable/disable AI response caching
|
|
73
|
-
- `GIMS_PROGRESS` - Show/hide progress indicators
|
|
74
|
-
- `GIMS_MAX_DIFF_SIZE` - Maximum diff size for AI processing
|
|
23
|
+
## [0.6.1] - 2024-12-19
|
|
75
24
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"progressIndicators": true,
|
|
82
|
-
"maxDiffSize": 100000,
|
|
83
|
-
"projectType": "react"
|
|
84
|
-
}
|
|
85
|
-
```
|
|
25
|
+
### โจ Enhanced User Experience
|
|
26
|
+
- **Single-letter aliases** for main workflow commands
|
|
27
|
+
- **Quick API setup**: `g setup --api-key <provider>`
|
|
28
|
+
- **Better onboarding**: Clear setup instructions with direct links
|
|
29
|
+
- **Quick help**: `g q` command for instant reference
|
|
86
30
|
|
|
87
|
-
###
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
31
|
+
### ๐ง Improved Commands
|
|
32
|
+
- `g s` - Status (enhanced git status)
|
|
33
|
+
- `g i` - Interactive (guided commit wizard)
|
|
34
|
+
- `g p` - Preview (see what will be committed)
|
|
35
|
+
- `g l` - Local (AI commit locally)
|
|
36
|
+
- `g o` - Online (AI commit + push)
|
|
37
|
+
- `g h` - History (numbered commit log)
|
|
38
|
+
- `g a` - Amend (smart amend with AI)
|
|
39
|
+
- `g u` - Undo (undo last commit)
|
|
92
40
|
|
|
93
|
-
|
|
94
|
-
- Removed `largelist` command (merged into `list --detailed`)
|
|
95
|
-
- Changed some internal APIs (affects programmatic usage only)
|
|
96
|
-
- Updated minimum Node.js version recommendation to 20+
|
|
41
|
+
---
|
|
97
42
|
|
|
98
|
-
|
|
99
|
-
- Fixed git status parsing for different git versions
|
|
100
|
-
- Improved error handling for large diffs
|
|
101
|
-
- Better clipboard handling across platforms
|
|
102
|
-
- Fixed configuration file validation
|
|
43
|
+
## [0.6.0] - 2024-12-19
|
|
103
44
|
|
|
104
|
-
###
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
45
|
+
### ๐ Major Enhanced Release
|
|
46
|
+
- **Interactive commit wizard** with multiple AI suggestions
|
|
47
|
+
- **Enhanced git status** with AI insights and project analysis
|
|
48
|
+
- **Modular architecture** for better performance and maintainability
|
|
49
|
+
- **Smart configuration** with project type detection
|
|
50
|
+
- **Progress indicators** and better error handling
|
|
51
|
+
- **Caching system** for improved AI response times
|
|
109
52
|
|
|
110
53
|
---
|
|
111
54
|
|
|
112
55
|
## [0.5.4] - Previous Version
|
|
113
56
|
- Basic AI-powered commit messages
|
|
114
57
|
- Simple configuration
|
|
115
|
-
- Core git operations
|
|
116
|
-
- Single-file architecture
|
|
58
|
+
- Core git operations
|
package/QUICK_REFERENCE.md
CHANGED
|
@@ -43,9 +43,9 @@ g h --detailed --limit 10 # Detailed view
|
|
|
43
43
|
|
|
44
44
|
## Default AI Models
|
|
45
45
|
|
|
46
|
-
- **Gemini**: `gemini-2.
|
|
47
|
-
- **OpenAI**: `gpt-
|
|
48
|
-
- **Groq**: `
|
|
46
|
+
- **Gemini**: `gemini-2.5-flash` (Fast, free, recommended)
|
|
47
|
+
- **OpenAI**: `gpt-5` (Latest GPT model)
|
|
48
|
+
- **Groq**: `groq/compound` (Ultra-fast inference)
|
|
49
49
|
|
|
50
50
|
## Pro Tips
|
|
51
51
|
|
|
@@ -70,5 +70,5 @@ g config --set provider=gemini # Set AI provider
|
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
g --help # All commands
|
|
73
|
-
g
|
|
73
|
+
g q # This quick reference
|
|
74
74
|
```
|
package/README.md
CHANGED
|
@@ -1,488 +1,75 @@
|
|
|
1
|
-
# ๐ GIMS - Git Made Simple
|
|
1
|
+
# ๐ GIMS - Git Made Simple
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
[](https://nodejs.org/)
|
|
8
|
-
[](https://github.com/yourusername/gims)
|
|
3
|
+
[](https://npmjs.org/package/gims)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://github.com/s41r4j/gims)
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*Now with enhanced UX, smart insights, and interactive workflows* โจ
|
|
7
|
+
**AI-powered Git CLI that writes your commit messages for you**
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
*Because life's too short for "fix stuff" commits* ๐ฏ
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## โจ What is GIMS?
|
|
19
|
-
|
|
20
|
-
GIMS is a revolutionary Git CLI tool that uses AI to automatically generate meaningful commit messages from your code changes. The enhanced version adds intelligent insights, interactive workflows, and a modular architecture for better performance and user experience.
|
|
21
|
-
|
|
22
|
-
### ๐ฌ See It In Action
|
|
11
|
+
## โก Quick Start
|
|
23
12
|
|
|
24
13
|
```bash
|
|
25
|
-
#
|
|
26
|
-
git add .
|
|
27
|
-
git commit -m "update stuff" # ๐คฆโโ๏ธ
|
|
28
|
-
git push
|
|
29
|
-
|
|
30
|
-
# GIMS workflow โก
|
|
31
|
-
g o # AI analyzes changes, commits with perfect message, and pushes!
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## ๐ Enhanced Features
|
|
35
|
-
|
|
36
|
-
### ๐ค **AI-Powered Commit Messages**
|
|
37
|
-
- OpenAI, Google Gemini, and Groq support with automatic provider selection
|
|
38
|
-
- Smart diff analysis with caching for improved performance
|
|
39
|
-
- Multiple suggestion generation for better options
|
|
40
|
-
- Handles large codebases with intelligent summarization and safe truncation
|
|
41
|
-
- Optional Conventional Commits formatting and optional commit body generation
|
|
42
|
-
|
|
43
|
-
### โก **Lightning Fast Workflow**
|
|
44
|
-
- **Interactive Mode**: `g int` - guided commit wizard with multiple suggestions
|
|
45
|
-
- **Smart Status**: `g status` - enhanced git status with AI insights
|
|
46
|
-
- **Preview Mode**: `g preview` - see what would be committed with AI message
|
|
47
|
-
- One command commits: `g o` - analyze, commit, and push
|
|
48
|
-
- Smart suggestions: `g s` - get AI-generated messages (use `--multiple` for options)
|
|
49
|
-
|
|
50
|
-
### ๐ง **Intelligent Analysis & Insights**
|
|
51
|
-
- **Project Detection**: Automatically detects project type (React, Node, Python, etc.)
|
|
52
|
-
- **Smart Insights**: AI analyzes changes and provides contextual tips
|
|
53
|
-
- **Change Complexity**: Understands and reports on the scope of changes
|
|
54
|
-
- **Commit History Analysis**: Tracks patterns and suggests improvements
|
|
55
|
-
|
|
56
|
-
### ๐ ๏ธ **Enhanced Developer Experience**
|
|
57
|
-
- **Setup Wizard**: `g setup` - interactive configuration for first-time users
|
|
58
|
-
- **Progress Indicators**: Visual feedback for AI operations
|
|
59
|
-
- **Better Error Messages**: Actionable guidance when things go wrong
|
|
60
|
-
- **Smart Sync**: `g sync` - intelligent pull with rebase/merge options
|
|
61
|
-
- **Enhanced Stash**: `g stash` - AI-generated stash descriptions
|
|
62
|
-
|
|
63
|
-
### ๐ง **Advanced Configuration**
|
|
64
|
-
- **Config Management**: `g config` - set preferences globally or per-project
|
|
65
|
-
- **Caching System**: Speeds up repeated operations
|
|
66
|
-
- **Modular Architecture**: Better performance and maintainability
|
|
67
|
-
|
|
68
|
-
## ๐ Quick Start
|
|
69
|
-
|
|
70
|
-
### Prerequisites
|
|
71
|
-
|
|
72
|
-
- Node.js >= 18.18.0 (Node 20+ recommended)
|
|
73
|
-
- npm >= 9
|
|
74
|
-
|
|
75
|
-
Tip: Use nvm to manage Node versions per-user without sudo:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
|
79
|
-
export NVM_DIR="$HOME/.nvm" && . "$NVM_DIR/nvm.sh"
|
|
80
|
-
nvm install 20 && nvm alias default 20
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Installation
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
npm install -g gims
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
If you get EACCES permission errors on Linux when installing globally, set a user prefix:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
mkdir -p ~/.npm-global
|
|
93
|
-
npm config set prefix '~/.npm-global'
|
|
94
|
-
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
|
|
95
|
-
source ~/.bashrc
|
|
14
|
+
# Install
|
|
96
15
|
npm install -g gims
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Setup AI (Choose One - Quick & Easy!)
|
|
100
16
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
g setup --api-key gemini
|
|
105
|
-
|
|
106
|
-
# OpenAI (High quality)
|
|
107
|
-
g setup --api-key openai
|
|
108
|
-
|
|
109
|
-
# Groq (Ultra fast)
|
|
110
|
-
g setup --api-key groq
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**๐ง Manual Setup (Advanced)**
|
|
114
|
-
```bash
|
|
115
|
-
# Set environment variables
|
|
116
|
-
export GEMINI_API_KEY="your-api-key-here" # Uses gemini-2.0-flash-exp
|
|
117
|
-
export OPENAI_API_KEY="your-api-key-here" # Uses gpt-4o-mini
|
|
118
|
-
export GROQ_API_KEY="your-api-key-here" # Uses llama-3.1-8b-instant
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
GIMS auto-detects configured providers and uses smart defaults. If no AI is configured, it uses local heuristics to generate sensible messages.
|
|
122
|
-
|
|
123
|
-
### Your First Enhanced Experience
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
# Quick AI setup (choose one - Gemini recommended)
|
|
127
|
-
g setup --api-key gemini # Fast & free
|
|
128
|
-
g setup --api-key openai # High quality
|
|
17
|
+
# Setup AI (choose one)
|
|
18
|
+
g setup --api-key gemini # Free & fast (recommended)
|
|
19
|
+
g setup --api-key openai # High quality
|
|
129
20
|
g setup --api-key groq # Ultra fast
|
|
130
21
|
|
|
131
|
-
#
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
# Check enhanced status with AI insights
|
|
135
|
-
g s
|
|
136
|
-
# Shows: Git status + AI insights about your changes
|
|
137
|
-
|
|
138
|
-
# Use interactive mode for guided commits
|
|
139
|
-
g i
|
|
140
|
-
# Walks you through: staging โ AI suggestions โ commit โ push
|
|
141
|
-
|
|
142
|
-
# Or use the classic one-command workflow
|
|
143
|
-
g o
|
|
144
|
-
# Output: โ Committed & pushed: "Add hello world console log"
|
|
22
|
+
# Use it
|
|
23
|
+
g s # Check status with AI insights
|
|
24
|
+
g o # AI commit + push
|
|
145
25
|
```
|
|
146
26
|
|
|
147
|
-
##
|
|
148
|
-
|
|
149
|
-
### ๐ **Main Workflow (Single Letters)**
|
|
150
|
-
| Command | Alias | Description | Example |
|
|
151
|
-
|---------|-------|-------------|---------|
|
|
152
|
-
| `gims status` | `g s` | Enhanced git status with AI insights | `g s` |
|
|
153
|
-
| `gims interactive` | `g i` | Interactive commit wizard | `g i` |
|
|
154
|
-
| `gims preview` | `g p` | Preview commit with AI message | `g p` |
|
|
155
|
-
| `gims local` | `g l` | AI commit locally | `g l` |
|
|
156
|
-
| `gims online` | `g o` | AI commit + push | `g o` |
|
|
157
|
-
| `gims list` | `g h` | Numbered commit history | `g h` |
|
|
158
|
-
| `gims amend` | `g a` | Smart amend with AI | `g a` |
|
|
159
|
-
| `gims undo` | `g u` | Undo last commit | `g u --yes` |
|
|
27
|
+
## ๐ฏ Main Commands
|
|
160
28
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
| `
|
|
165
|
-
| `
|
|
29
|
+
| Command | Description |
|
|
30
|
+
|---------|-------------|
|
|
31
|
+
| `g s` | Enhanced status with AI insights |
|
|
32
|
+
| `g i` | Interactive commit wizard |
|
|
33
|
+
| `g o` | AI commit + push |
|
|
34
|
+
| `g l` | AI commit locally |
|
|
35
|
+
| `g h` | Commit history |
|
|
36
|
+
| `g a` | Smart amend |
|
|
166
37
|
|
|
167
|
-
|
|
168
|
-
| Command | Alias | Description | Example |
|
|
169
|
-
|---------|-------|-------------|---------|
|
|
170
|
-
| `gims suggest` | `g sg` | AI suggestions with clipboard | `g sg --multiple` |
|
|
171
|
-
| `gims commit <msg>` | `g m` | Custom message commit | `g m "fix: handle edge case"` |
|
|
172
|
-
| `gims sync` | - | Smart sync: pull + rebase/merge | `g sync --rebase` |
|
|
173
|
-
| `gims stash` | - | Enhanced stash with AI descriptions | `g stash` |
|
|
174
|
-
| `gims init` | - | Initialize repo | `g init` |
|
|
175
|
-
| `gims clone <repo>` | `g c` | Clone repository | `g c https://github.com/user/repo` |
|
|
176
|
-
| `gims pull` | - | Pull changes | `g pull` |
|
|
177
|
-
| `gims branch <n>` | `g b` | Branch from commit #n | `g b 3 feature-x` |
|
|
178
|
-
| `gims reset <n>` | `g r` | Reset to commit | `g r 5 --hard --yes` |
|
|
179
|
-
| `gims revert <n>` | `g rv` | Revert commit | `g rv 2 --yes` |
|
|
38
|
+
## ๐ค AI Models
|
|
180
39
|
|
|
181
|
-
|
|
40
|
+
- **Gemini**: `gemini-2.5-flash` (Free, fast, recommended)
|
|
41
|
+
- **OpenAI**: `gpt-5` (High quality)
|
|
42
|
+
- **Groq**: `groq/compound` (Ultra fast)
|
|
182
43
|
|
|
183
|
-
|
|
184
|
-
- `--model <name>`: Override model identifier for the chosen provider
|
|
185
|
-
- `--staged-only`: Use only staged changes (default behavior for `g s`)
|
|
186
|
-
- `--all`: Stage all changes before running
|
|
187
|
-
- `--no-clipboard`: Do not copy suggestion to clipboard (for `g s`)
|
|
188
|
-
- `--body`: Generate a commit body in addition to subject
|
|
189
|
-
- `--conventional`: Format subject using Conventional Commits
|
|
190
|
-
- `--dry-run`: Print what would happen without committing/pushing
|
|
191
|
-
- `--verbose`: Verbose logging with AI provider details
|
|
192
|
-
- `--json`: Machine-readable output for `g s`
|
|
193
|
-
- `--yes`: Confirm destructive actions without prompting
|
|
194
|
-
- `--amend`: Amend the last commit instead of creating a new one
|
|
195
|
-
- `--set-upstream`: On push, set upstream if the current branch has none
|
|
44
|
+
## ๐ Examples
|
|
196
45
|
|
|
197
|
-
### Command-Specific Options
|
|
198
|
-
|
|
199
|
-
- `g s --multiple`: Generate multiple commit message suggestions
|
|
200
|
-
- `g ls --detailed`: Show detailed commit information with dates and authors
|
|
201
|
-
- `g ls --limit <n>`: Limit number of commits shown (default: 20)
|
|
202
|
-
- `g sync --rebase`: Use rebase instead of merge for sync
|
|
203
|
-
- `g stash --list`: List all stashes
|
|
204
|
-
- `g stash --pop`: Pop the latest stash
|
|
205
|
-
- `g stash --apply <n>`: Apply stash by index
|
|
206
|
-
- `g a --no-edit`: Amend without changing the commit message
|
|
207
|
-
- `g config --global`: Use global configuration instead of project-local
|
|
208
|
-
|
|
209
|
-
## ๐ก Enhanced Real-World Examples
|
|
210
|
-
|
|
211
|
-
### ๐ฏ **Interactive Workflow**
|
|
212
|
-
```bash
|
|
213
|
-
# Complex feature development
|
|
214
|
-
g status # See AI insights about your changes
|
|
215
|
-
# Output: "๐ฆ Dependencies changed - consider updating package-lock.json"
|
|
216
|
-
|
|
217
|
-
g int # Interactive commit wizard
|
|
218
|
-
# Guides you through: staging โ multiple AI suggestions โ commit
|
|
219
|
-
|
|
220
|
-
g sync --rebase # Smart sync with rebase
|
|
221
|
-
# Output: "โ Rebased successfully"
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### ๐ง **Bug Fix with Preview**
|
|
225
46
|
```bash
|
|
226
|
-
#
|
|
227
|
-
g
|
|
228
|
-
#
|
|
47
|
+
# Daily workflow
|
|
48
|
+
g s # Check what changed
|
|
49
|
+
g i # Interactive commit
|
|
50
|
+
g o # Quick commit + push
|
|
229
51
|
|
|
230
|
-
|
|
231
|
-
|
|
52
|
+
# Advanced
|
|
53
|
+
g sg --multiple # Get 3 AI suggestions
|
|
54
|
+
g h --detailed # Detailed history
|
|
55
|
+
g sync --rebase # Smart sync
|
|
232
56
|
```
|
|
233
57
|
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
# Multiple related changes
|
|
237
|
-
g s --multiple # Get several commit message options
|
|
238
|
-
# Shows: 3 different AI-generated suggestions
|
|
239
|
-
|
|
240
|
-
g stash # Stash with AI description
|
|
241
|
-
# Output: "โ Stashed changes: 'Add search functionality components'"
|
|
58
|
+
## ๐ง Configuration
|
|
242
59
|
|
|
243
|
-
g l # Commit locally first
|
|
244
|
-
g sync # Smart sync before pushing
|
|
245
|
-
g o # Push with upstream setup
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### ๐ **Project Analysis**
|
|
249
60
|
```bash
|
|
250
|
-
g
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
g config --set conventional=true # Enable conventional commits
|
|
254
|
-
g ls --detailed --limit 5 # Analyze recent commit patterns
|
|
61
|
+
g config --set conventional=true # Enable conventional commits
|
|
62
|
+
g config --set autoStage=true # Auto-stage changes
|
|
63
|
+
g config --list # View all settings
|
|
255
64
|
```
|
|
256
65
|
|
|
257
|
-
##
|
|
66
|
+
## ๐ Help
|
|
258
67
|
|
|
259
|
-
### ๐ฏ **Perfect Enhanced Workflow**
|
|
260
68
|
```bash
|
|
261
|
-
g
|
|
262
|
-
g
|
|
263
|
-
g i # Interactive commit for complex changes
|
|
264
|
-
g sync # Smart sync instead of manual pull
|
|
265
|
-
g o --set-upstream # Push with automatic upstream setup
|
|
69
|
+
g --help # All commands
|
|
70
|
+
g q # Quick reference
|
|
266
71
|
```
|
|
267
72
|
|
|
268
|
-
### ๐ง **Smart Development Patterns**
|
|
269
|
-
```bash
|
|
270
|
-
# Feature development
|
|
271
|
-
g stash # Stash with AI description
|
|
272
|
-
g b 5 feature-x # Branch from specific commit
|
|
273
|
-
g preview # Preview changes before committing
|
|
274
|
-
g s --multiple # Get multiple commit options
|
|
275
|
-
g l && g sync # Commit locally, then smart sync
|
|
276
|
-
|
|
277
|
-
# Code review preparation
|
|
278
|
-
g ls --detailed # Review commit history
|
|
279
|
-
g config --set conventional=true # Enable conventional commits
|
|
280
|
-
g amend # Update last commit with AI message
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### ๐ก๏ธ **Safe & Smart Operations**
|
|
284
|
-
```bash
|
|
285
|
-
# Experimentation
|
|
286
|
-
g stash # AI-described stash
|
|
287
|
-
g l # Commit experiment
|
|
288
|
-
g preview # Check what you're about to commit
|
|
289
|
-
g u --yes # Quick undo if needed
|
|
290
|
-
|
|
291
|
-
# Team collaboration
|
|
292
|
-
g sync --rebase # Clean history with rebase
|
|
293
|
-
g status # Check insights before committing
|
|
294
|
-
g config --global # Set team-wide preferences
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### โก **Power User Shortcuts**
|
|
298
|
-
```bash
|
|
299
|
-
# Single-letter workflow
|
|
300
|
-
g s # Enhanced status
|
|
301
|
-
g p # Quick preview
|
|
302
|
-
g i # Interactive mode
|
|
303
|
-
g sg --multiple # Multiple suggestions
|
|
304
|
-
g h --detailed # Detailed history
|
|
305
|
-
g l && g o # Local commit then push
|
|
306
|
-
|
|
307
|
-
# Configuration
|
|
308
|
-
g config --set autoStage=true # Auto-stage by default
|
|
309
|
-
g config --set progressIndicators=false # Disable progress bars
|
|
310
|
-
g config --list # Review all settings
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
## โ๏ธ Enhanced Configuration
|
|
314
|
-
|
|
315
|
-
### Setup Wizard (Recommended)
|
|
316
|
-
```bash
|
|
317
|
-
g setup # Interactive configuration wizard
|
|
318
|
-
# Detects project type, configures AI providers, sets preferences
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
### Environment Variables
|
|
322
|
-
|
|
323
|
-
| Variable | Purpose | Default |
|
|
324
|
-
|----------|---------|---------|
|
|
325
|
-
| `OPENAI_API_KEY` | OpenAI API access | - |
|
|
326
|
-
| `GEMINI_API_KEY` | Google Gemini API access | - |
|
|
327
|
-
| `GROQ_API_KEY` | Groq API access | - |
|
|
328
|
-
| `GROQ_BASE_URL` | Groq API base URL | `https://api.groq.com/openai/v1` |
|
|
329
|
-
| `GIMS_PROVIDER` | Default provider | `auto` |
|
|
330
|
-
| `GIMS_MODEL` | Default model identifier | (provider-specific) |
|
|
331
|
-
| `GIMS_CONVENTIONAL` | Enable Conventional Commits | `0` |
|
|
332
|
-
| `GIMS_COPY` | Enable clipboard copying | `1` |
|
|
333
|
-
| `GIMS_AUTO_STAGE` | Auto-stage changes | `0` |
|
|
334
|
-
| `GIMS_CACHE` | Enable AI response caching | `1` |
|
|
335
|
-
| `GIMS_PROGRESS` | Show progress indicators | `1` |
|
|
336
|
-
|
|
337
|
-
### Configuration Management
|
|
338
|
-
```bash
|
|
339
|
-
# Set configuration values
|
|
340
|
-
g config --set provider=gemini
|
|
341
|
-
g config --set conventional=true --global
|
|
342
|
-
g config --set autoStage=true
|
|
343
|
-
|
|
344
|
-
# View configuration
|
|
345
|
-
g config --list
|
|
346
|
-
g config --get provider
|
|
347
|
-
|
|
348
|
-
# Project vs Global config
|
|
349
|
-
g config --set conventional=true # Project-specific
|
|
350
|
-
g config --set conventional=true --global # Global (all projects)
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
### .gimsrc Configuration Files
|
|
354
|
-
|
|
355
|
-
**Project-level** (`./.gimsrc`):
|
|
356
|
-
```json
|
|
357
|
-
{
|
|
358
|
-
"provider": "gemini",
|
|
359
|
-
"model": "gemini-2.0-flash",
|
|
360
|
-
"conventional": true,
|
|
361
|
-
"autoStage": false,
|
|
362
|
-
"projectType": "react"
|
|
363
|
-
}
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
**Global** (`~/.gimsrc`):
|
|
367
|
-
```json
|
|
368
|
-
{
|
|
369
|
-
"provider": "auto",
|
|
370
|
-
"conventional": false,
|
|
371
|
-
"copy": true,
|
|
372
|
-
"cacheEnabled": true,
|
|
373
|
-
"progressIndicators": true,
|
|
374
|
-
"maxDiffSize": 100000
|
|
375
|
-
}
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
### Smart Fallbacks
|
|
379
|
-
|
|
380
|
-
GIMS handles edge cases gracefully:
|
|
381
|
-
|
|
382
|
-
- ๐ Large diffs: Automatically switches to summary or status view
|
|
383
|
-
- โ๏ธ Massive text: Truncates safely with informative context
|
|
384
|
-
- ๐ No API key: Uses a local heuristic that summarizes your changes
|
|
385
|
-
- โ ๏ธ API failures: Clear errors and local fallback so you keep moving
|
|
386
|
-
- ๐ Privacy-first: Only sends diffs when you explicitly run AI features
|
|
387
|
-
|
|
388
|
-
## ๐ค Contributing
|
|
389
|
-
|
|
390
|
-
We love contributions! Here's how to get involved:
|
|
391
|
-
|
|
392
|
-
1. **๐ด Fork** the repository
|
|
393
|
-
2. **๐ฟ Create** your feature branch: `git checkout -b amazing-feature`
|
|
394
|
-
3. **๐ป Code** your improvements
|
|
395
|
-
4. **๐งช Test** thoroughly
|
|
396
|
-
5. **๐ Commit** with GIMS: `g l` (dogfooding!)
|
|
397
|
-
6. **๐ Push** and create a Pull Request
|
|
398
|
-
|
|
399
|
-
### ๐ Found a Bug?
|
|
400
|
-
|
|
401
|
-
1. Check [existing issues](https://github.com/yourusername/gims/issues)
|
|
402
|
-
2. Create a [new issue](https://github.com/yourusername/gims/issues/new) with:
|
|
403
|
-
- Clear description
|
|
404
|
-
- Steps to reproduce
|
|
405
|
-
- Expected vs actual behavior
|
|
406
|
-
- Your environment details
|
|
407
|
-
|
|
408
|
-
## ๐ Why GIMS?
|
|
409
|
-
|
|
410
|
-
### Before GIMS ๐ซ
|
|
411
|
-
```bash
|
|
412
|
-
git log --oneline
|
|
413
|
-
abc1234 fix
|
|
414
|
-
def5678 update
|
|
415
|
-
ghi9012 changes
|
|
416
|
-
jkl3456 stuff
|
|
417
|
-
mno7890 final fix
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
### After GIMS โจ
|
|
421
|
-
```bash
|
|
422
|
-
git log --oneline
|
|
423
|
-
abc1234 Fix authentication timeout in user login service
|
|
424
|
-
def5678 Add responsive design for mobile navigation menu
|
|
425
|
-
ghi9012 Refactor database connection pool for better performance
|
|
426
|
-
jkl3456 Update API documentation with new endpoint examples
|
|
427
|
-
mno7890 Fix memory leak in image processing pipeline
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
## ๐ Enhanced Stats & Benefits
|
|
431
|
-
|
|
432
|
-
- โก **50% faster** commits with interactive mode and smart defaults
|
|
433
|
-
- ๐ฏ **Higher accuracy** with multiple AI suggestions and caching
|
|
434
|
-
- ๐ง **Smart insights** help improve code quality and commit patterns
|
|
435
|
-
- ๐ **Zero learning curve** - enhanced Git workflow, not replacement
|
|
436
|
-
- ๐ **Universal compatibility** - Mac, Windows, Linux, WSL
|
|
437
|
-
- ๏ฟฝ **Modular architecture** - better performance and extensibility
|
|
438
|
-
|
|
439
|
-
## ๐ What's New in Enhanced GIMS
|
|
440
|
-
|
|
441
|
-
### โจ **Major Enhancements**
|
|
442
|
-
- **Interactive Commit Wizard** - guided workflow with multiple suggestions
|
|
443
|
-
- **Smart Status & Insights** - AI analyzes your changes and provides tips
|
|
444
|
-
- **Enhanced Configuration** - setup wizard and flexible config management
|
|
445
|
-
- **Progress Indicators** - visual feedback for all AI operations
|
|
446
|
-
- **Caching System** - faster repeated operations
|
|
447
|
-
- **Better Error Handling** - actionable guidance when things go wrong
|
|
448
|
-
|
|
449
|
-
### ๐ง **Developer Experience**
|
|
450
|
-
- **Project Type Detection** - automatically adapts to React, Node, Python, etc.
|
|
451
|
-
- **Smart Sync** - intelligent pull with rebase/merge options
|
|
452
|
-
- **Enhanced Stash** - AI-generated stash descriptions
|
|
453
|
-
- **Preview Mode** - see exactly what will be committed
|
|
454
|
-
- **Modular Architecture** - cleaner code and better maintainability
|
|
455
|
-
|
|
456
|
-
## ๐บ๏ธ Roadmap
|
|
457
|
-
|
|
458
|
-
### ๐ฏ **Completed (v0.6.0)**
|
|
459
|
-
- [x] Interactive commit wizard
|
|
460
|
-
- [x] Enhanced status with AI insights
|
|
461
|
-
- [x] Smart configuration management
|
|
462
|
-
- [x] Progress indicators and better UX
|
|
463
|
-
- [x] Caching and performance improvements
|
|
464
|
-
- [x] Modular architecture
|
|
465
|
-
|
|
466
|
-
### ๐ **Coming Next**
|
|
467
|
-
- [ ] ๐ Plugin system for custom AI providers
|
|
468
|
-
- [ ] ๐ Commit message templates and team standards
|
|
469
|
-
- [ ] ๐ Multi-language commit message support
|
|
470
|
-
- [ ] ๐ Integration with popular Git GUIs (VS Code, etc.)
|
|
471
|
-
- [ ] ๐ฑ Web dashboard for team commit analytics
|
|
472
|
-
- [ ] ๐ค Advanced AI features (code review suggestions, etc.)
|
|
473
|
-
|
|
474
73
|
## ๐ License
|
|
475
74
|
|
|
476
|
-
MIT ยฉ [
|
|
477
|
-
|
|
478
|
-
---
|
|
479
|
-
|
|
480
|
-
<div align="center">
|
|
481
|
-
|
|
482
|
-
**โญ Star this repo if GIMS makes your Git workflow awesome!**
|
|
483
|
-
|
|
484
|
-
[Report Bug](https://github.com/yourusername/gims/issues) โข [Request Feature](https://github.com/yourusername/gims/issues) โข [Documentation](https://github.com/yourusername/gims/wiki)
|
|
485
|
-
|
|
486
|
-
*Made with โค๏ธ by developers who hate writing commit messages*
|
|
487
|
-
|
|
488
|
-
</div>
|
|
75
|
+
MIT ยฉ [S41R4J](https://github.com/s41r4j)
|
package/bin/gims.js
CHANGED
|
@@ -313,9 +313,9 @@ program.command('help-quick').alias('q')
|
|
|
313
313
|
console.log(` ${color.cyan('g u')} Undo - Undo last commit\n`);
|
|
314
314
|
|
|
315
315
|
console.log(color.bold('Quick Setup:'));
|
|
316
|
-
console.log(` ${color.cyan('g setup --api-key gemini')} ๐
|
|
317
|
-
console.log(` ${color.cyan('g setup --api-key openai')} ๐
|
|
318
|
-
console.log(` ${color.cyan('g setup --api-key groq')} โก
|
|
316
|
+
console.log(` ${color.cyan('g setup --api-key gemini')} ๐ gemini-2.5-flash (recommended)`);
|
|
317
|
+
console.log(` ${color.cyan('g setup --api-key openai')} ๐ gpt-5 (high quality)`);
|
|
318
|
+
console.log(` ${color.cyan('g setup --api-key groq')} โก groq/compound (ultra fast)\n`);
|
|
319
319
|
|
|
320
320
|
console.log(color.bold('Essential Workflow:'));
|
|
321
321
|
console.log(` ${color.cyan('g s')} Check what's changed`);
|
package/bin/lib/ai/providers.js
CHANGED
|
@@ -28,9 +28,9 @@ class AIProviderManager {
|
|
|
28
28
|
|
|
29
29
|
getDefaultModel(provider) {
|
|
30
30
|
const defaults = {
|
|
31
|
-
'gemini': 'gemini-2.
|
|
32
|
-
'openai': 'gpt-
|
|
33
|
-
'groq': '
|
|
31
|
+
'gemini': 'gemini-2.5-flash', // Latest and fastest
|
|
32
|
+
'openai': 'gpt-5', // Latest GPT model
|
|
33
|
+
'groq': 'groq/compound' // Latest Groq model
|
|
34
34
|
};
|
|
35
35
|
return defaults[provider] || '';
|
|
36
36
|
}
|
|
@@ -164,14 +164,14 @@ class ConfigManager {
|
|
|
164
164
|
console.log(` ${color.cyan('g setup --api-key openai')} # High quality`);
|
|
165
165
|
console.log(` ${color.cyan('g setup --api-key groq')} # Ultra fast`);
|
|
166
166
|
console.log('\nOr set environment variables manually:');
|
|
167
|
-
console.log(' - OPENAI_API_KEY (gpt-
|
|
168
|
-
console.log(' - GEMINI_API_KEY (gemini-2.
|
|
169
|
-
console.log(' - GROQ_API_KEY (
|
|
167
|
+
console.log(' - OPENAI_API_KEY (gpt-5)');
|
|
168
|
+
console.log(' - GEMINI_API_KEY (gemini-2.5-flash)');
|
|
169
|
+
console.log(' - GROQ_API_KEY (groq/compound)');
|
|
170
170
|
} else {
|
|
171
171
|
console.log('Available providers with default models:');
|
|
172
|
-
if (hasGemini) console.log(` ${color.green('โ')} Google Gemini (gemini-2.
|
|
173
|
-
if (hasOpenAI) console.log(` ${color.green('โ')} OpenAI (gpt-
|
|
174
|
-
if (hasGroq) console.log(` ${color.green('โ')} Groq (
|
|
172
|
+
if (hasGemini) console.log(` ${color.green('โ')} Google Gemini (gemini-2.5-flash)`);
|
|
173
|
+
if (hasOpenAI) console.log(` ${color.green('โ')} OpenAI (gpt-5)`);
|
|
174
|
+
if (hasGroq) console.log(` ${color.green('โ')} Groq (groq/compound)`);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
const provider = await question(`\nPreferred provider (auto/openai/gemini/groq/none) [auto]: `) || 'auto';
|
package/package.json
CHANGED
package/.gimsrc
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: release to npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout repository
|
|
13
|
-
uses: actions/checkout@v4
|
|
14
|
-
|
|
15
|
-
- name: Set up Node.js
|
|
16
|
-
uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version: 20
|
|
19
|
-
cache: 'npm'
|
|
20
|
-
|
|
21
|
-
- name: Install dependencies
|
|
22
|
-
run: npm ci
|
|
23
|
-
|
|
24
|
-
- name: Run tests
|
|
25
|
-
run: npm test
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# GIMS - Git Made Simple
|
|
2
|
-
|
|
3
|
-
GIMS is an AI-powered Git CLI tool that automatically generates meaningful commit messages from code changes. It's designed to replace generic commit messages with descriptive, professional ones that tell a story.
|
|
4
|
-
|
|
5
|
-
## Core Value Proposition
|
|
6
|
-
- Eliminates the need to write commit messages manually
|
|
7
|
-
- Uses AI (OpenAI, Google Gemini, Groq) to analyze code diffs and generate contextual messages
|
|
8
|
-
- Provides a streamlined Git workflow with single-command operations
|
|
9
|
-
- Supports both local and remote operations with intelligent fallbacks
|
|
10
|
-
|
|
11
|
-
## Key Features
|
|
12
|
-
- AI-powered commit message generation from code diffs
|
|
13
|
-
- One-command workflow: analyze, commit, and push (`g o`)
|
|
14
|
-
- Smart suggestions with clipboard integration (`g s`)
|
|
15
|
-
- Conventional Commits support
|
|
16
|
-
- Numbered commit history and branch management
|
|
17
|
-
- Safe operations with confirmations and dry-run support
|
|
18
|
-
- Graceful fallbacks for large diffs and offline use
|
|
19
|
-
|
|
20
|
-
## Target Users
|
|
21
|
-
Developers who want to maintain clean Git history without spending time crafting commit messages, especially those working on projects where commit message quality matters for collaboration and code review.
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Project Structure
|
|
2
|
-
|
|
3
|
-
## Directory Layout
|
|
4
|
-
```
|
|
5
|
-
gims/
|
|
6
|
-
โโโ bin/
|
|
7
|
-
โ โโโ gims.js # Main CLI executable and entry point
|
|
8
|
-
โโโ node_modules/ # npm dependencies (auto-generated)
|
|
9
|
-
โโโ .npm-cache/ # npm cache directory (auto-generated)
|
|
10
|
-
โโโ .github/ # GitHub workflows and templates
|
|
11
|
-
โโโ .git/ # Git repository data
|
|
12
|
-
โโโ .kiro/ # Kiro AI assistant configuration
|
|
13
|
-
โ โโโ steering/ # AI guidance documents
|
|
14
|
-
โโโ package.json # Project metadata and dependencies
|
|
15
|
-
โโโ package-lock.json # Dependency lock file
|
|
16
|
-
โโโ README.md # Comprehensive project documentation
|
|
17
|
-
โโโ LICENSE # MIT license
|
|
18
|
-
โโโ .gitignore # Git ignore patterns
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Key Files
|
|
22
|
-
|
|
23
|
-
### `bin/gims.js`
|
|
24
|
-
- **Purpose**: Single-file CLI application containing all functionality
|
|
25
|
-
- **Structure**: Monolithic approach with utility functions, command handlers, and AI integration
|
|
26
|
-
- **Exports**: Executable binary via shebang (`#!/usr/bin/env node`)
|
|
27
|
-
- **Commands**: All CLI commands and subcommands defined in this file
|
|
28
|
-
|
|
29
|
-
### `package.json`
|
|
30
|
-
- **Binary entries**: `gims` and `g` both point to `bin/gims.js`
|
|
31
|
-
- **Main entry**: Points to `bin/gims.js`
|
|
32
|
-
- **Scripts**: Minimal test script placeholder
|
|
33
|
-
- **Keywords**: Focused on git, cli, ai, commit, developer-tools
|
|
34
|
-
|
|
35
|
-
### Configuration Files
|
|
36
|
-
- **`.gimsrc`**: Optional JSON config (project root or home directory)
|
|
37
|
-
- **Environment variables**: API keys and default settings
|
|
38
|
-
- **Git integration**: Uses existing `.git` directory and configuration
|
|
39
|
-
|
|
40
|
-
## Architecture Principles
|
|
41
|
-
|
|
42
|
-
### Single-File Design
|
|
43
|
-
- All functionality consolidated in `bin/gims.js` for simplicity
|
|
44
|
-
- No separate modules or complex directory structure
|
|
45
|
-
- Easy to understand, debug, and maintain
|
|
46
|
-
- Reduces complexity for a CLI tool
|
|
47
|
-
|
|
48
|
-
### Command Structure
|
|
49
|
-
- Uses commander.js for CLI parsing and command organization
|
|
50
|
-
- Short aliases for all commands (`g o`, `g s`, `g l`, etc.)
|
|
51
|
-
- Consistent option patterns across commands
|
|
52
|
-
- Global options available to all subcommands
|
|
53
|
-
|
|
54
|
-
### File Naming Conventions
|
|
55
|
-
- Executable files in `bin/` directory
|
|
56
|
-
- Configuration files use dotfile convention (`.gimsrc`)
|
|
57
|
-
- Standard npm project files (package.json, README.md, LICENSE)
|
|
58
|
-
- No custom file extensions or special naming schemes
|
|
59
|
-
|
|
60
|
-
## Development Guidelines
|
|
61
|
-
|
|
62
|
-
### Adding New Features
|
|
63
|
-
- Add new commands directly to `bin/gims.js`
|
|
64
|
-
- Follow existing pattern of command definition with commander.js
|
|
65
|
-
- Maintain consistent error handling and logging patterns
|
|
66
|
-
- Add appropriate help text and examples
|
|
67
|
-
|
|
68
|
-
### Configuration Management
|
|
69
|
-
- Environment variables for sensitive data (API keys)
|
|
70
|
-
- JSON config files for user preferences
|
|
71
|
-
- Runtime detection and fallback logic
|
|
72
|
-
- Validate configuration at startup when needed
|
package/.kiro/steering/tech.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Technology Stack
|
|
2
|
-
|
|
3
|
-
## Runtime & Language
|
|
4
|
-
- **Node.js**: >= 18.18.0 (Node 20+ recommended)
|
|
5
|
-
- **JavaScript**: CommonJS modules (`"type": "commonjs"`)
|
|
6
|
-
- **Package Manager**: npm (with package-lock.json)
|
|
7
|
-
|
|
8
|
-
## Core Dependencies
|
|
9
|
-
- **commander**: CLI framework for command parsing and structure
|
|
10
|
-
- **simple-git**: Git operations and repository management
|
|
11
|
-
- **clipboardy**: Cross-platform clipboard operations
|
|
12
|
-
- **@google/genai**: Google Gemini AI integration
|
|
13
|
-
- **openai**: OpenAI API client
|
|
14
|
-
|
|
15
|
-
## Architecture Patterns
|
|
16
|
-
- Single-file CLI application (`bin/gims.js`)
|
|
17
|
-
- Functional programming approach with utility functions
|
|
18
|
-
- Configuration via environment variables and `.gimsrc` JSON files
|
|
19
|
-
- Graceful fallbacks and error handling throughout
|
|
20
|
-
- ANSI color utilities without external dependencies
|
|
21
|
-
|
|
22
|
-
## Code Style Conventions
|
|
23
|
-
- Use `const` for immutable values, avoid `var`
|
|
24
|
-
- Prefer template literals for string interpolation
|
|
25
|
-
- Use async/await for asynchronous operations
|
|
26
|
-
- Implement comprehensive error handling with try/catch
|
|
27
|
-
- Keep functions focused and modular
|
|
28
|
-
- Use descriptive variable names (e.g., `rawDiff`, `prefProvider`)
|
|
29
|
-
- Comment complex logic and AI prompt engineering sections
|
|
30
|
-
|
|
31
|
-
## Common Commands
|
|
32
|
-
|
|
33
|
-
### Development
|
|
34
|
-
```bash
|
|
35
|
-
# Install dependencies
|
|
36
|
-
npm install
|
|
37
|
-
|
|
38
|
-
# Test installation
|
|
39
|
-
npm test # Currently returns "No tests yet"
|
|
40
|
-
|
|
41
|
-
# Global installation for testing
|
|
42
|
-
npm install -g .
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Publishing
|
|
46
|
-
```bash
|
|
47
|
-
# Update version
|
|
48
|
-
npm version patch|minor|major
|
|
49
|
-
|
|
50
|
-
# Publish to npm
|
|
51
|
-
npm publish
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Local Development Testing
|
|
55
|
-
```bash
|
|
56
|
-
# Link for local testing
|
|
57
|
-
npm link
|
|
58
|
-
|
|
59
|
-
# Test CLI commands
|
|
60
|
-
gims --help
|
|
61
|
-
g --help
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Configuration Management
|
|
65
|
-
- Environment variables for API keys (`OPENAI_API_KEY`, `GEMINI_API_KEY`, `GROQ_API_KEY`)
|
|
66
|
-
- Optional `.gimsrc` JSON config in project root or home directory
|
|
67
|
-
- Runtime provider detection and fallback logic
|
|
68
|
-
- Support for custom models and base URLs
|
package/bin/lib/config.js
DELETED
|
File without changes
|