gitcoach-cli 1.0.3 → 1.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/README.md +429 -0
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
# GitCoach
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
██████╗ ██╗████████╗ ██████╗ ██████╗ █████╗ ██████╗██╗ ██╗
|
|
5
|
+
██╔════╝ ██║╚══██╔══╝██╔════╝██╔═══██╗██╔══██╗██╔════╝██║ ██║
|
|
6
|
+
██║ ███╗██║ ██║ ██║ ██║ ██║███████║██║ ███████║
|
|
7
|
+
██║ ██║██║ ██║ ██║ ██║ ██║██╔══██║██║ ██╔══██║
|
|
8
|
+
╚██████╔╝██║ ██║ ╚██████╗╚██████╔╝██║ ██║╚██████╗██║ ██║
|
|
9
|
+
╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**The AI-powered Git coach that prevents mistakes before they happen.**
|
|
13
|
+
|
|
14
|
+
[](https://www.npmjs.com/package/gitcoach-cli)
|
|
15
|
+
[](https://github.com/DNSZLSK/gitcoach-cli)
|
|
16
|
+
[](https://opensource.org/licenses/MIT)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Why GitCoach?
|
|
21
|
+
|
|
22
|
+
Git is powerful but brutal to beginners. Cryptic error messages, lost work from uncommitted changes, fear of breaking everything.
|
|
23
|
+
|
|
24
|
+
**GitCoach is different:**
|
|
25
|
+
|
|
26
|
+
- **Prevents mistakes BEFORE they happen** - Warns about uncommitted changes, detached HEAD, force push risks
|
|
27
|
+
- **Educational** - Shows every Git command being executed so you learn while you use it
|
|
28
|
+
- **AI-powered** - Uses GitHub Copilot CLI to generate smart commit messages and answer Git questions
|
|
29
|
+
- **Multilingual** - Works in English, French, and Spanish
|
|
30
|
+
- **Beginner-friendly** - No more cryptic error messages
|
|
31
|
+
|
|
32
|
+
Built for the **GitHub Copilot CLI Challenge 2026**.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Install globally
|
|
40
|
+
npm install -g gitcoach-cli
|
|
41
|
+
|
|
42
|
+
# Run in any Git repository
|
|
43
|
+
gitcoach
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
That's it. GitCoach guides you from there.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Prerequisites
|
|
51
|
+
|
|
52
|
+
Before installing GitCoach, you need Node.js and Git installed on your system.
|
|
53
|
+
|
|
54
|
+
### 1. Node.js (version 18 or higher)
|
|
55
|
+
|
|
56
|
+
**Windows:**
|
|
57
|
+
1. Download the LTS version from [nodejs.org](https://nodejs.org/)
|
|
58
|
+
2. Run the installer
|
|
59
|
+
3. Restart your terminal
|
|
60
|
+
|
|
61
|
+
**Mac:**
|
|
62
|
+
```bash
|
|
63
|
+
brew install node
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Linux (Ubuntu/Debian):**
|
|
67
|
+
```bash
|
|
68
|
+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
|
|
69
|
+
sudo apt-get install -y nodejs
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Verify installation:**
|
|
73
|
+
```bash
|
|
74
|
+
node --version # Should show v18.x.x or higher
|
|
75
|
+
npm --version # Should show 9.x.x or higher
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 2. Git
|
|
79
|
+
|
|
80
|
+
**Windows:**
|
|
81
|
+
1. Download from [git-scm.com](https://git-scm.com/download/win)
|
|
82
|
+
2. Run the installer with default options
|
|
83
|
+
3. Restart your terminal
|
|
84
|
+
|
|
85
|
+
**Mac:**
|
|
86
|
+
```bash
|
|
87
|
+
brew install git
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Linux (Ubuntu/Debian):**
|
|
91
|
+
```bash
|
|
92
|
+
sudo apt-get install git
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Verify installation:**
|
|
96
|
+
```bash
|
|
97
|
+
git --version # Should show git version 2.x.x
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 3. GitHub Copilot CLI (Optional - for AI features)
|
|
101
|
+
|
|
102
|
+
GitCoach works without Copilot CLI, but AI-powered commit messages and Git Q&A require it.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm install -g @githubnext/github-copilot-cli
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then authenticate:
|
|
109
|
+
```bash
|
|
110
|
+
github-copilot-cli auth
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Features
|
|
116
|
+
|
|
117
|
+
### Interactive Menus
|
|
118
|
+
|
|
119
|
+
No more memorizing commands. Navigate Git with simple menus.
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
? Main Menu
|
|
123
|
+
> [S] Status - View current changes
|
|
124
|
+
[A] Add - Stage files for commit
|
|
125
|
+
[C] Commit - Save your changes
|
|
126
|
+
[P] Push - Upload to remote
|
|
127
|
+
[L] Pull - Download changes
|
|
128
|
+
[B] Branch - Manage branches
|
|
129
|
+
[U] Undo - Undo actions
|
|
130
|
+
[H] History - View commit history
|
|
131
|
+
[W] Stash - Save work temporarily
|
|
132
|
+
[?] Help - Ask Git questions (AI)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### AI-Powered Commits
|
|
136
|
+
|
|
137
|
+
GitCoach uses GitHub Copilot CLI to analyze your changes and generate meaningful commit messages following conventional commits format.
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
? Generate message with AI? Yes
|
|
141
|
+
Generating...
|
|
142
|
+
|
|
143
|
+
+--------------- Suggested message ---------------+
|
|
144
|
+
| |
|
|
145
|
+
| feat(auth): add OAuth2 user authentication |
|
|
146
|
+
| |
|
|
147
|
+
+-------------------------------------------------+
|
|
148
|
+
|
|
149
|
+
? Use this message? (Y/n)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Error Prevention
|
|
153
|
+
|
|
154
|
+
GitCoach warns you BEFORE you make mistakes:
|
|
155
|
+
|
|
156
|
+
**Uncommitted changes protection:**
|
|
157
|
+
```
|
|
158
|
+
+------------------- Warning --------------------+
|
|
159
|
+
| |
|
|
160
|
+
| You have uncommitted changes! |
|
|
161
|
+
| Switching branches will lose your work. |
|
|
162
|
+
| |
|
|
163
|
+
| Recommended: Commit or stash first. |
|
|
164
|
+
| |
|
|
165
|
+
+------------------------------------------------+
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Detached HEAD detection:**
|
|
169
|
+
```
|
|
170
|
+
+--------------- Detached HEAD ------------------+
|
|
171
|
+
| |
|
|
172
|
+
| You are in detached HEAD state. |
|
|
173
|
+
| This means you are not on any branch. |
|
|
174
|
+
| |
|
|
175
|
+
| Your commits may be lost if you switch |
|
|
176
|
+
| branches without creating a new branch. |
|
|
177
|
+
| |
|
|
178
|
+
+------------------------------------------------+
|
|
179
|
+
|
|
180
|
+
? How do you want to resolve this?
|
|
181
|
+
> [C] Create a new branch
|
|
182
|
+
[M] Return to main branch
|
|
183
|
+
[S] Stash changes and return
|
|
184
|
+
[I] Ignore (advanced users)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Force push confirmation:**
|
|
188
|
+
```
|
|
189
|
+
? You are about to FORCE PUSH. This rewrites remote history.
|
|
190
|
+
? Are you absolutely sure? (yes/no)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Educational Mode
|
|
194
|
+
|
|
195
|
+
Every action shows the Git command being executed:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
? Stage all files? Yes
|
|
199
|
+
> git add -A
|
|
200
|
+
5 file(s) staged successfully.
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
You learn Git while using GitCoach. Eventually, you won't need it anymore. That's the goal.
|
|
204
|
+
|
|
205
|
+
### Ask Git Questions
|
|
206
|
+
|
|
207
|
+
Don't know what a rebase is? Just ask.
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
? Your question: What's the difference between merge and rebase?
|
|
211
|
+
Thinking...
|
|
212
|
+
|
|
213
|
+
+------------------- Answer ---------------------+
|
|
214
|
+
| |
|
|
215
|
+
| Both integrate changes from one branch |
|
|
216
|
+
| into another, but differently: |
|
|
217
|
+
| |
|
|
218
|
+
| MERGE creates a merge commit, preserving |
|
|
219
|
+
| history as it happened. |
|
|
220
|
+
| |
|
|
221
|
+
| REBASE rewrites history by moving your |
|
|
222
|
+
| commits on top of the target branch. |
|
|
223
|
+
| |
|
|
224
|
+
| Use merge for shared branches. |
|
|
225
|
+
| Use rebase for local cleanup. |
|
|
226
|
+
| |
|
|
227
|
+
+------------------------------------------------+
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Conflict Resolution
|
|
231
|
+
|
|
232
|
+
When merge conflicts occur, GitCoach guides you through resolution:
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
+------------ Merge Conflicts Detected ----------+
|
|
236
|
+
| |
|
|
237
|
+
| A conflict occurs when the same file was |
|
|
238
|
+
| modified both locally and on the server. |
|
|
239
|
+
| Git cannot automatically merge these changes. |
|
|
240
|
+
| |
|
|
241
|
+
+------------------------------------------------+
|
|
242
|
+
|
|
243
|
+
Conflicting files:
|
|
244
|
+
- src/index.ts
|
|
245
|
+
- README.md
|
|
246
|
+
|
|
247
|
+
? How do you want to resolve?
|
|
248
|
+
> [V] View conflicts
|
|
249
|
+
[O] Open in editor
|
|
250
|
+
[A] Accept local changes (--ours)
|
|
251
|
+
[T] Accept remote changes (--theirs)
|
|
252
|
+
[M] Mark as resolved
|
|
253
|
+
[X] Abort merge
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Branch Management
|
|
257
|
+
|
|
258
|
+
Create, switch, merge, and delete branches with guidance:
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
? Select an option
|
|
262
|
+
> [C] Create a new branch
|
|
263
|
+
[S] Switch branch
|
|
264
|
+
[F] Merge a branch
|
|
265
|
+
[D] Delete a branch
|
|
266
|
+
[R] Return
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Merge with explanation:**
|
|
270
|
+
```
|
|
271
|
+
+--------------- What is Merge? -----------------+
|
|
272
|
+
| |
|
|
273
|
+
| Merging combines the changes from one branch |
|
|
274
|
+
| into another. All commits from the source |
|
|
275
|
+
| branch will be integrated into your current |
|
|
276
|
+
| branch. |
|
|
277
|
+
| |
|
|
278
|
+
+------------------------------------------------+
|
|
279
|
+
|
|
280
|
+
You are on 'main'. Which branch do you want to merge here?
|
|
281
|
+
> feature/login
|
|
282
|
+
feature/dashboard
|
|
283
|
+
bugfix/header
|
|
284
|
+
|
|
285
|
+
This will execute: git merge feature/login
|
|
286
|
+
? Continue? (Y/n)
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Multilingual Support
|
|
290
|
+
|
|
291
|
+
Switch between English, French, and Spanish anytime.
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
? Select language:
|
|
295
|
+
> English
|
|
296
|
+
Francais
|
|
297
|
+
Espanol
|
|
298
|
+
|
|
299
|
+
Configuration updated.
|
|
300
|
+
Bienvenue dans GitCoach !
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Localized confirmations:
|
|
304
|
+
- English: `(Y/n)`
|
|
305
|
+
- French: `(O/n)`
|
|
306
|
+
- Spanish: `(S/n)`
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Commands
|
|
311
|
+
|
|
312
|
+
| Command | Description |
|
|
313
|
+
|---------|-------------|
|
|
314
|
+
| `gitcoach` | Launch interactive menu |
|
|
315
|
+
| `gitcoach init` | First-time setup |
|
|
316
|
+
| `gitcoach config` | Change settings |
|
|
317
|
+
| `gitcoach stats` | View your statistics |
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Configuration
|
|
322
|
+
|
|
323
|
+
GitCoach adapts to your experience level:
|
|
324
|
+
|
|
325
|
+
| Level | Description |
|
|
326
|
+
|-------|-------------|
|
|
327
|
+
| **Beginner** | Verbose explanations, step-by-step guidance, all warnings |
|
|
328
|
+
| **Intermediate** | Helpful tips, conventional commit suggestions |
|
|
329
|
+
| **Expert** | Minimal output, critical warnings only |
|
|
330
|
+
|
|
331
|
+
Change your level anytime:
|
|
332
|
+
```bash
|
|
333
|
+
gitcoach config
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Tech Stack
|
|
339
|
+
|
|
340
|
+
- **TypeScript** - Type-safe code
|
|
341
|
+
- **Inquirer.js** - Interactive prompts
|
|
342
|
+
- **simple-git** - Git operations
|
|
343
|
+
- **GitHub Copilot CLI** - AI features
|
|
344
|
+
- **i18next** - Internationalization
|
|
345
|
+
- **Chalk** - Terminal styling
|
|
346
|
+
- **Jest** - Testing
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Development
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
# Clone the repository
|
|
354
|
+
git clone https://github.com/DNSZLSK/gitcoach-cli.git
|
|
355
|
+
cd gitcoach-cli
|
|
356
|
+
|
|
357
|
+
# Install dependencies
|
|
358
|
+
npm install
|
|
359
|
+
|
|
360
|
+
# Build
|
|
361
|
+
npm run build
|
|
362
|
+
|
|
363
|
+
# Run tests
|
|
364
|
+
npm test
|
|
365
|
+
|
|
366
|
+
# Run locally
|
|
367
|
+
./bin/run.js
|
|
368
|
+
|
|
369
|
+
# Link globally for testing
|
|
370
|
+
npm link
|
|
371
|
+
gitcoach
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## Project Structure
|
|
377
|
+
|
|
378
|
+
```
|
|
379
|
+
gitcoach-cli/
|
|
380
|
+
├── bin/ # CLI entry point
|
|
381
|
+
├── src/
|
|
382
|
+
│ ├── commands/ # CLI commands
|
|
383
|
+
│ ├── config/ # Configuration management
|
|
384
|
+
│ ├── i18n/ # Translations (en, fr, es)
|
|
385
|
+
│ ├── services/ # Git operations, Copilot integration
|
|
386
|
+
│ ├── ui/
|
|
387
|
+
│ │ ├── components/ # Reusable UI components
|
|
388
|
+
│ │ ├── menus/ # Interactive menus
|
|
389
|
+
│ │ └── themes/ # Color themes
|
|
390
|
+
│ └── utils/ # Helpers, validators
|
|
391
|
+
├── test/ # Test files
|
|
392
|
+
└── docs/ # Documentation
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Contributing
|
|
398
|
+
|
|
399
|
+
Contributions welcome! Please:
|
|
400
|
+
|
|
401
|
+
1. Fork the repository
|
|
402
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
403
|
+
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
|
|
404
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
405
|
+
5. Open a Pull Request
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## Links
|
|
410
|
+
|
|
411
|
+
- **npm:** [npmjs.com/package/gitcoach-cli](https://www.npmjs.com/package/gitcoach-cli)
|
|
412
|
+
- **GitHub:** [github.com/DNSZLSK/gitcoach-cli](https://github.com/DNSZLSK/gitcoach-cli)
|
|
413
|
+
- **Issues:** [github.com/DNSZLSK/gitcoach-cli/issues](https://github.com/DNSZLSK/gitcoach-cli/issues)
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Author
|
|
418
|
+
|
|
419
|
+
**DNSZLSK**
|
|
420
|
+
|
|
421
|
+
CDA Student at AFPA, France.
|
|
422
|
+
|
|
423
|
+
Built for the [GitHub Copilot CLI Challenge 2026](https://dev.to/challenges/github).
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## License
|
|
428
|
+
|
|
429
|
+
MIT - See [LICENSE](LICENSE) for details.
|
package/dist/utils/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const APP_VERSION = "1.0.
|
|
1
|
+
export declare const APP_VERSION = "1.0.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/utils/version.js
CHANGED