Skip to content

joparara/learntheshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

learntheshell

CLI way to learn the top 50 commands any Linux sysadmin needs to run and maintain a server. Lessons are driven by data/commands.json, and progress is stored locally in ~/.cli-learn/progress.json.

Features

  • cli learn <cmd>: Show key flags, example, demo, and a short quiz
  • cli random: Random command lesson
  • cli quiz [n]: Quiz on N commands (default 5)
  • cli list: Print all commands grouped by category
  • cli search <term>: Find commands by keyword
  • cli progress: Show learned commands and earned badges
  • --safe: Demo only (no execution)
  • --verbose: Show a brief --help excerpt when available

Usage

python cli.py list
python cli.py search log
python cli.py learn tail
python cli.py learn rsync --safe
python cli.py random
python cli.py quiz 5
python cli.py progress

Example Session

$ python cli.py learn tail
Command: tail
Category: Logs
Key Flags: -f, -n
Example: tail -f /var/log/apache2/access.log
Safe Demo: echo "tail -f /var/log/apache2/access.log"
Safe Demo: echo "Manila time: 2026-03-16 14:36:00"
Why Junior Needs: Follow logs in real time to debug issues.
Run `cli learn tail` for interactive lesson
Quiz: What's a common flag for tail? f
Correct!

Data Format

data/commands.json should be a list of objects like:

[
  {
    "name": "tail",
    "category": "Logs",
    "desc": "Follow logs in real time to debug issues.",
    "flags": ["-f", "-n"],
    "examples": ["tail -f /var/log/apache2/access.log"]
  }
]

Optional field:

  • warning: true marks commands that should strongly suggest --safe.

Progress & Badges

Progress is stored at ~/.cli-learn/progress.json. Badges currently awarded:

  • First Steps (first correct quiz answer)
  • Command Cadet (80%+ score on quiz)
  • Log Ninja (learn any command in category Logs)
  • Rsync Rebel (learn rsync)

Project Structure

explainhints/
├── cli.py
├── data/
│   └── commands.json
└── README.md

About

command line linux tutor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages