Skip to content

Interactive shell command tutor powered by GitHub Copilot CLI learn the terminal through hands-on challenges with AI-powered semantic evaluation

License

Notifications You must be signed in to change notification settings

Garinmckayl/shelltutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shelltutor

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.

Demo

Explain any command in plain English

shelltutor explain demo

Browse all 26 challenges across 8 topics

shelltutor topics demo

Explain complex commands (tar, rsync, awk...)

shelltutor explain tar demo

Why shelltutor?

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

Installation

Prerequisites

Install GitHub Copilot CLI

gh auth login
gh extension install github/gh-copilot

Install shelltutor

git clone https://github.com/Garinmckayl/shelltutor.git
cd shelltutor
npm install
npm run build
npm link  # optional: makes "shelltutor" available globally

Usage

Practice Mode

Work 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 challenges

During practice:

  • Type your shell command answer
  • Type hint or h for an AI-generated hint
  • Type skip or s to skip a challenge
  • Type quit or q to end the session

Quiz Mode

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 questions

Explain Any Command

Ask 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 /opt

Browse Topics

shelltutor topics    # List all available topics and challenge counts

View Progress

shelltutor stats     # See your accuracy, streaks, and topic breakdown

Reset Progress

shelltutor reset     # Clear all progress data

Topics & Challenges

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.

How GitHub Copilot CLI Is Used

shelltutor integrates with Copilot CLI in five distinct ways:

  1. 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" and find . -name "*.log" -type f are both recognized as correct.

  2. Hint Generation -- Type hint during a challenge and Copilot CLI generates a contextual hint that guides you without revealing the full answer.

  3. Solution Explanations -- After each challenge, Copilot CLI provides a detailed breakdown of the solution, explaining each flag and concept.

  4. Command Explainer -- The explain command lets you ask Copilot CLI about any shell command at any time.

  5. 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.

Tech Stack

  • 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

License

MIT License -- see LICENSE for details.

Built with GitHub Copilot CLI

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.

About

Interactive shell command tutor powered by GitHub Copilot CLI learn the terminal through hands-on challenges with AI-powered semantic evaluation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published