Interactive shell command tutor powered by GitHub Copilot CLI -- learn the terminal through hands-on challenges.
shelltutor is a CLI tool that teaches you shell commands by giving you real challenges, evaluating your answers with AI, and explaining solutions in plain English. It's like having a patient terminal teacher right in your shell.
Learning shell commands from documentation is painful. You read the man page, forget it immediately, and Google the same thing next week. shelltutor fixes this with:
- Hands-on challenges -- Type real commands, not multiple choice
- AI-powered evaluation -- Copilot CLI checks if your answer is functionally equivalent (not just exact string matching)
- Intelligent hints -- Stuck? Ask for an AI-generated hint without revealing the answer
- Detailed explanations -- Every challenge ends with a Copilot CLI breakdown of why the solution works
- Progress tracking -- See your accuracy per topic and build streaks
- 8 topic areas -- Files, text processing, permissions, processes, networking, git, pipes, and search
- Node.js 18+
- GitHub CLI with Copilot extension (recommended, but works without it)
gh auth login
gh extension install github/gh-copilotgit clone https://github.com/Garinmckayl/shelltutor.git
cd shelltutor
npm install
npm run build
npm link # optional: makes "shelltutor" available globallyWork through challenges at your own pace with multiple attempts, hints, and explanations:
shelltutor practice # 5 random challenges
shelltutor practice -n 10 # 10 challenges
shelltutor practice -t git # Git challenges only
shelltutor practice -d beginner # Beginner difficulty
shelltutor practice -t files -d advanced # Advanced file challengesDuring practice:
- Type your shell command answer
- Type
hintorhfor an AI-generated hint - Type
skiporsto skip a challenge - Type
quitorqto end the session
Timed quiz with one attempt per question -- no hints allowed:
shelltutor quiz # 10 beginner questions
shelltutor quiz -d intermediate # Intermediate difficulty
shelltutor quiz -n 20 # 20 questionsAsk Copilot CLI to explain any shell command in plain English:
shelltutor explain find . -name "*.js" -mtime +7
shelltutor explain awk -F: '{print $1}' /etc/passwd
shelltutor explain tar -xzf archive.tar.gz -C /optshelltutor topics # List all available topics and challenge countsshelltutor stats # See your accuracy, streaks, and topic breakdownshelltutor reset # Clear all progress data| Topic | Description | Challenges |
|---|---|---|
| files | File management (ls, cp, mkdir, find, du, rsync) | 6 |
| text | Text processing (wc, head, sed, cut, awk, sort) | 5 |
| permissions | Permissions & ownership (chmod, chown) | 2 |
| processes | Process management (ps, kill, nohup) | 3 |
| networking | Networking (curl, wget, ss, netstat) | 2 |
| git | Git operations (reset, log, rebase) | 3 |
| pipes | Pipes & redirection (sort, diff, process substitution) | 2 |
| search | Search & find (grep, find) | 3 |
Each challenge has beginner, intermediate, and advanced variants.
shelltutor integrates with Copilot CLI in five distinct ways:
-
Answer Evaluation -- When you submit an answer, Copilot CLI determines if it's functionally equivalent to the expected solution (not just string matching). This means
find . -type f -name "*.log"andfind . -name "*.log" -type fare both recognized as correct. -
Hint Generation -- Type
hintduring a challenge and Copilot CLI generates a contextual hint that guides you without revealing the full answer. -
Solution Explanations -- After each challenge, Copilot CLI provides a detailed breakdown of the solution, explaining each flag and concept.
-
Command Explainer -- The
explaincommand lets you ask Copilot CLI about any shell command at any time. -
Personalized Follow-Up -- After a practice session, Copilot CLI analyzes your mistakes and suggests what topics to focus on next.
When Copilot CLI is not available, shelltutor falls back to exact string matching and static hints/explanations.
- TypeScript -- Type-safe codebase
- Commander.js -- CLI argument parsing
- Inquirer.js -- Interactive prompts
- chalk + boxen -- Terminal UI
- ora -- Loading spinners
- GitHub Copilot CLI -- AI-powered evaluation, hints, and explanations
MIT License -- see LICENSE for details.
This project was built as part of the GitHub Copilot CLI Challenge on DEV Community. GitHub Copilot CLI was used both as the core AI engine within the tool and as a development assistant while building it.