https://github.com/DNSZLSK/gitcoach-cli
Git CLI tool with educational guidance and optional AI commit messages. Built for the GitHub Copilot CLI Challenge 2026.
https://github.com/DNSZLSK/gitcoach-cli
ai beginner-friendly cli copilot education git github-copilot multilingual nodejs typescript
Last synced: 12 days ago
JSON representation
Git CLI tool with educational guidance and optional AI commit messages. Built for the GitHub Copilot CLI Challenge 2026.
- Host: GitHub
- URL: https://github.com/DNSZLSK/gitcoach-cli
- Owner: DNSZLSK
- Created: 2026-01-23T20:38:16.000Z (30 days ago)
- Default Branch: master
- Last Pushed: 2026-02-06T00:09:13.000Z (17 days ago)
- Last Synced: 2026-02-09T22:47:53.318Z (13 days ago)
- Topics: ai, beginner-friendly, cli, copilot, education, git, github-copilot, multilingual, nodejs, typescript
- Language: TypeScript
- Homepage: https://dev.to/dnszlsk/gitcoach-the-git-mentor-that-teaches-you-while-you-work-github-copilot-cli-challenge-1708
- Size: 342 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: docs/README.md
Awesome Lists containing this project
- awesome-starts - DNSZLSK/gitcoach-cli - Git CLI tool with educational guidance and optional AI commit messages. Built for the GitHub Copilot CLI Challenge 2026. (ai)
README
# GitCoach
```
██████╗ ██╗████████╗ ██████╗ ██████╗ █████╗ ██████╗██╗ ██╗
██╔════╝ ██║╚══██╔══╝██╔════╝██╔═══██╗██╔══██╗██╔════╝██║ ██║
██║ ███╗██║ ██║ ██║ ██║ ██║███████║██║ ███████║
██║ ██║██║ ██║ ██║ ██║ ██║██╔══██║██║ ██╔══██║
╚██████╔╝██║ ██║ ╚██████╗╚██████╔╝██║ ██║╚██████╗██║ ██║
╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
```
**Interactive Git assistant that prevents mistakes before they happen.**
[](https://www.npmjs.com/package/gitcoach-cli)
[](https://github.com/DNSZLSK/gitcoach-cli)
[](https://opensource.org/licenses/MIT)
---
## Why GitCoach?
Git is powerful but brutal to beginners. Cryptic error messages, lost work from uncommitted changes, fear of breaking everything.
**GitCoach is different:**
- **Prevents mistakes BEFORE they happen** - Warns about uncommitted changes, detached HEAD, force push risks
- **Educational** - Shows every Git command being executed so you learn while you use it
- **Adapts to your level** - Beginner (verbose), Intermediate (balanced), Expert (minimal)
- **Multilingual** - Works in English, French, and Spanish
- **5 Copilot CLI integrations** - AI commit messages, Git Q&A, error explanations, diff summaries, conflict resolution (works without it too)
Built for the **GitHub Copilot CLI Challenge 2026**.
---
## Quick Start
```bash
npm install -g gitcoach-cli
gitcoach
```
That's it. GitCoach guides you from there.
---
## Prerequisites
### 1. Node.js (version 18 or higher)
**Windows:**
Download from [nodejs.org](https://nodejs.org/) (LTS version)
**Mac:**
```bash
brew install node
```
**Linux (Ubuntu/Debian):**
```bash
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
```
### 2. Git
**Windows:**
Download from [git-scm.com](https://git-scm.com/download/win)
**Mac:**
```bash
brew install git
```
**Linux (Ubuntu/Debian):**
```bash
sudo apt-get install git
```
### 3. GitHub Copilot CLI (Optional)
For 5 AI-powered integrations (commit messages, Git Q&A, error explanations, diff summaries, conflict resolution):
```bash
npm install -g @github/copilot
copilot login
```
GitCoach works perfectly fine without Copilot CLI - all core features are available.
---
## Features
### Interactive Menus
Navigate Git with simple menus instead of memorizing commands.
```
? Main Menu
> [S] Status - View current changes
[A] Add - Stage files for commit
[C] Commit - Save your changes
[P] Push - Upload to remote
[L] Pull - Download changes
[B] Branch - Manage branches
[U] Undo - Undo actions
[H] History - View commit history
[W] Stash - Save work temporarily
[G] Config - Configure GitCoach
[?] Help - Ask Git questions
[Q] Quit - Exit GitCoach
```
### Experience Levels
GitCoach adapts to your skill level:
| Level | Menu Labels | Confirmations | Warnings | Explanations |
|-------|-------------|---------------|----------|--------------|
| **Beginner** | Full descriptions | All | All | Shown |
| **Intermediate** | Short descriptions | All | Most | Hidden |
| **Expert** | Git commands | Destructive only | Critical only | Hidden |
Example in Expert mode:
```
? Main Menu
> [S] git status
[A] git add
[C] git commit
[P] git push
[L] git pull
```
### Error Prevention
GitCoach warns you BEFORE you make mistakes:
**Uncommitted changes:**
```
+------------------- Warning --------------------+
| |
| You have uncommitted changes! |
| Switching branches will lose your work. |
| |
+------------------------------------------------+
```
**Detached HEAD:**
```
+--------------- Detached HEAD ------------------+
| |
| You are in detached HEAD state. |
| Your commits may be lost if you switch |
| branches without creating a new branch. |
| |
+------------------------------------------------+
? How do you want to resolve this?
> [C] Create a new branch
[M] Return to main branch
[S] Stash changes and return
[I] Ignore (advanced users)
```
**Force push:**
```
? You are about to FORCE PUSH. This rewrites remote history.
? Are you absolutely sure? (yes/no)
```
### Educational Mode
Every action shows the Git command being executed:
```
? Stage all files? Yes
> git add -A
5 file(s) staged successfully.
```
You learn Git while using GitCoach.
### Smart Commits (Optional AI)
If you have GitHub Copilot CLI installed, GitCoach can generate commit messages:
```
? Generate message with AI? Yes
Generating...
Suggested: feat(auth): add OAuth2 authentication
? Use this message? (Y/n)
```
Without Copilot CLI, you write commit messages manually (conventional commits format suggested).
### Git Q&A (Optional AI)
Ask Git questions if Copilot CLI is installed:
```
? Your question: What's the difference between merge and rebase?
MERGE creates a merge commit, preserving history.
REBASE rewrites history by moving commits.
Use merge for shared branches, rebase for local cleanup.
```
### Staged Diff Summary (Optional AI)
Before committing, Copilot summarizes your staged changes in plain language:
```
Analyzing changes...
+-------------- Changes summary ---------------+
| |
| auth.ts: Added OAuth2 login flow |
| config.ts: New env variable for API key |
| utils.ts: Refactored error handling |
| |
+-----------------------------------------------+
```
### Contextual Error Explanation (Optional AI)
When a Git command fails, Copilot explains the error and suggests a fix:
```
+----------------- Error ----------------------+
| fatal: not a git repository |
+-----------------------------------------------+
Copilot explains:
You are not inside a Git repository. Navigate to
a folder that contains a .git directory, or run
"git init" to create a new repository here.
```
### AI-Assisted Conflict Resolution (Optional AI)
During merge conflicts, ask Copilot to analyze both versions and suggest a resolution:
```
? How to resolve conflict in auth.ts?
> Keep local version
Keep remote version
Keep both versions
Edit manually
Ask Copilot AI <-- NEW
Back
Copilot suggests: LOCAL
The local version has the latest bug fix that
should be kept.
? Accept this suggestion? (Y/n)
```
Copilot returns a structured recommendation (LOCAL / REMOTE / BOTH / CUSTOM) with an explanation.
### Branch Management
Create, switch, merge, and delete branches with guidance:
```
? Select an option
> Create a new branch
Switch branch
Merge a branch
Delete a branch
Back
```
### Multilingual Support
English, French, and Spanish. Localized confirmations:
- English: `(Y/n)`
- French: `(O/n)`
- Spanish: `(S/n)`
---
## Commands
| Command | Description |
|---------|-------------|
| `gitcoach` | Launch interactive menu |
| `gitcoach init` | First-time setup |
| `gitcoach config` | Change settings |
| `gitcoach stats` | View your statistics |
---
## Tech Stack
- **TypeScript** - Type-safe code
- **Inquirer.js** - Interactive prompts
- **simple-git** - Git operations
- **i18next** - Internationalization
- **Chalk** - Terminal styling
- **Jest** - 522 tests
---
## Development
```bash
git clone https://github.com/DNSZLSK/gitcoach-cli.git
cd gitcoach-cli
npm install
npm run build
npm test
npm link
gitcoach
```
---
## Project Structure
```
gitcoach-cli/
├── bin/ # CLI entry point
├── src/
│ ├── commands/ # CLI commands
│ ├── config/ # Configuration management
│ ├── i18n/ # Translations (en, fr, es)
│ ├── services/ # Git operations, Copilot integration
│ ├── ui/
│ │ ├── components/ # Reusable UI components
│ │ ├── menus/ # Interactive menus
│ │ └── themes/ # Color themes
│ └── utils/ # Helpers, validators
├── test/ # 522 tests
└── docs/ # Documentation
```
---
## Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
---
## Links
- **npm:** [npmjs.com/package/gitcoach-cli](https://www.npmjs.com/package/gitcoach-cli)
- **GitHub:** [github.com/DNSZLSK/gitcoach-cli](https://github.com/DNSZLSK/gitcoach-cli)
- **Issues:** [github.com/DNSZLSK/gitcoach-cli/issues](https://github.com/DNSZLSK/gitcoach-cli/issues)
---
## Author
**DNSZLSK** - CDA Student at AFPA, France
Built for the [GitHub Copilot CLI Challenge 2026](https://dev.to/challenges/github).
---
## License
MIT