GitCoach is an AI-powered Git coach CLI that prevents mistakes before they happen. Built for the GitHub Copilot CLI Challenge (deadline: February 15, 2026, 23:59 PST).
Core Problem: Beginners lose work from Git mistakes; developers waste time searching for solutions; commit messages are generic.
Solution: Interactive multilingual CLI with guided menus for beginners, quick shortcuts for experts, contextual analysis via Copilot CLI, real-time error prevention, and intelligent commit generation.
| Category | Technology |
|---|---|
| Language | TypeScript (Node.js) |
| CLI Framework | Oclif |
| Prompts/Menus | Inquirer.js |
| Git Operations | simple-git |
| Display | Chalk, Boxen, cli-table3 |
| i18n | i18next |
| AI Integration | GitHub Copilot CLI |
| Config Storage | Conf |
| Analytics | Local SQLite |
| Testing | Jest + mock-git |
gitcoach/
├── bin/
│ └── run.js # Entry point
├── src/
│ ├── commands/
│ │ ├── index.ts # Main menu
│ │ ├── init.ts # First-time setup
│ │ ├── config.ts # Configuration menu
│ │ ├── quick.ts # Expert mode (hotkey)
│ │ └── stats.ts # Analytics dashboard
│ ├── services/
│ │ ├── git-service.ts # Git operations wrapper
│ │ ├── copilot-service.ts # Copilot CLI integration
│ │ ├── analysis-service.ts # Context analysis
│ │ └── prevention-service.ts # Error detection
│ ├── ui/
│ │ ├── menus/
│ │ │ ├── main-menu.ts
│ │ │ ├── add-menu.ts
│ │ │ ├── commit-menu.ts
│ │ │ ├── branch-menu.ts
│ │ │ └── config-menu.ts
│ │ ├── themes/
│ │ │ ├── colored.ts
│ │ │ └── monochrome.ts
│ │ └── components/
│ │ ├── box.ts
│ │ ├── table.ts
│ │ └── prompt.ts
│ ├── i18n/
│ │ ├── locales/
│ │ │ ├── en.json
│ │ │ ├── fr.json
│ │ │ └── es.json
│ │ └── index.ts
│ ├── config/
│ │ ├── user-config.ts # User preferences
│ │ └── defaults.ts # Default settings
│ ├── analytics/
│ │ ├── tracker.ts # Usage tracking
│ │ └── stats-calculator.ts # Metrics calculation
│ └── utils/
│ ├── logger.ts
│ ├── validators.ts
│ └── helpers.ts
├── test/
│ ├── unit/
│ └── integration/
├── docs/
│ ├── README.md
│ ├── INSTALLATION.md
│ ├── USAGE.md
│ └── DEMO.md
├── package.json
├── tsconfig.json
└── .eslintrc.js
# Install dependencies
npm install
# Development mode with watch
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Lint code
npm run lint
# Format code
npm run format
# Link CLI globally for testing
npm link
# Run CLI locally
./bin/run.js- Interactive Main Menu - Spring Boot CLI inspired design
- Basic Git Operations - status, add, commit, push with explanations
- Copilot CLI Integration - commit message generation, context analysis
- Multilingual Support - EN, FR, ES via i18next
- Adaptive Modes - Beginner (verbose), Intermediate (tips), Expert (alerts only)
- Theme Toggle - Colored/Monochrome
- Critical Error Prevention:
- Uncommitted changes warnings before checkout
- Force push protection
- Wrong branch alerts
- Detached HEAD detection
- Expert Quick Mode - Ctrl+Shift+G hotkey for rapid commit+push
- Basic Analytics - Errors prevented, commits generated, time saved
- Persistent Configuration - User preferences saved locally
- Interactive git log history
- Branch management wizards (merge, rebase)
- Stash helper
- Conflict resolution assistant
- Custom workflows
- Export reports
// Analyze diff and generate conventional commit message
const prompt = `Analyze git changes and generate conventional commit: ${diff}`;
await exec(`gh copilot suggest "${prompt}"`);// Analyze current state and suggest next action
const prompt = `Current branch: ${branch}, files: ${files}. What should user do next?`;
await exec(`gh copilot suggest "${prompt}"`);// Predict if action will cause problems
const prompt = `User wants to: ${action}. State: ${state}. Will this cause problems?`;
await exec(`gh copilot suggest "${prompt}"`);// Explain Git concepts for beginners
const prompt = `Explain to a beginner: ${concept}`;
await exec(`gh copilot suggest "${prompt}"`);All user-facing strings must use i18next keys:
// Usage
import { t } from '../i18n';
console.log(t('menu.title'));
console.log(t('warnings.uncommitted'));
console.log(t('warnings.wrongBranch', { branch: 'main' }));Key namespaces:
menu.*- Menu items and titlescommands.*- Git command descriptionswarnings.*- Warning messageserrors.*- Error messagessuccess.*- Success messagessetup.*- First-time setup stringsstats.*- Analytics dashboard strings
- TypeScript Strict Mode - Enable all strict checks
- No Console.log - Use logger utility instead
- Async/Await - Prefer over raw promises
- Error Handling - Always wrap external calls in try/catch
- Single Responsibility - One function, one purpose
- Descriptive Names - Self-documenting code
- Comments - Only for complex logic, not obvious code
- Tests - Unit test all services, integration test commands
- Progressive Disclosure - Show complexity only when needed
- Fail Gracefully - Clear error messages with solutions
- Confirm Destructive Actions - Always ask before force push, delete
- Quick Escape - User can always cancel or go back
- Contextual Help - Explain Git commands being executed
- Consistent Layout - Same structure across all menus
- Responsive Feedback - Loading states, success confirmations
- All services (git-service, copilot-service, prevention-service)
- Utility functions
- i18n key completeness
- Command flows (init, config, main menu)
- Git operations with mock-git
- Copilot CLI responses (mocked)
- Test all 3 languages
- Test both themes
- Test all 3 experience levels
- Test on Windows, macOS, Linux
- Test coverage > 70%
- Build time < 5s
- Bundle size < 2MB
- Errors prevented (by type)
- Commits generated (AI vs manual)
- Time saved (estimated)
- User progression (level changes)
| Date | Milestone |
|---|---|
| Jan 22-28 | Week 1: Foundations + MVP Core |
| Jan 29 - Feb 4 | Week 2: Intelligence + Expert Mode |
| Feb 5-15 | Week 3: Polish + Docs + Submission |
| Feb 15, 23:59 PST | FINAL DEADLINE |
- Code compiles without errors
- Tests pass
- ESLint shows no errors
- No console.log statements
- i18n keys exist in all 3 languages
- Complex logic is commented
- All MVP features work
- Tests pass (unit + integration)
- Zero critical bugs
- Performance OK (menus < 100ms)
- Copilot CLI integration robust
- ESLint zero errors
- TypeScript strict mode
- Code formatted (Prettier)
- Dependencies up to date
- No secrets in code
- README complete
- Installation guide tested
- Usage examples with screenshots
- CHANGELOG updated
- package.json complete
- Version 1.0.0
- License MIT
- Published on npm
- Video demo (2-3 min)
- GIFs for README
- DEV.to article published
If behind schedule, prioritize in this order:
Priority 1 (MUST SHIP):
- Basic menu + git operations
- Copilot CLI commit generation
- English only
- Beginner mode only
- Colored theme only
- Uncommitted changes warning
Priority 2 (Add if time):
- FR/ES languages
- Expert mode
- Analytics
- Monochrome theme
Priority 3 (Nice to have):
- Advanced features
- UX polish
- Always run
npm run lintbefore suggesting code is complete - Prefer composition over inheritance
- Keep functions under 30 lines when possible
- Use early returns to reduce nesting
- Handle edge cases: no git repo, no Copilot CLI, offline mode
- Test Copilot CLI availability before using it
- All user-facing output goes through the UI components (not raw console)
- Theme colors are abstracted - never hardcode ANSI codes
- Config changes must persist across sessions
"Make it work, make it right, make it fast" - but SHIP on time.