clitutor
Version:
Interactive CLI learning tool for beginners
238 lines (175 loc) ⢠7.37 kB
Markdown
# CLI Tutor - Chapter Development Guide
## šÆ Mission Statement
CLI Tutor transforms the intimidating command line into a friendly conversation. We teach beginners to "talk" to their computer naturally, using analogies and interactive storytelling to make complex concepts feel simple.
## šļø Chapter Architecture Philosophy
### Core Principles
1. **Conversational Learning**
- Commands are conversations, not cryptic codes
- The terminal has a personality that responds to users
- Every technical concept has a real-world analogy
2. **Progressive Disclosure**
- Start with the "why" before the "how"
- Reveal complexity gradually with typing effects
- Build confidence through small wins
3. **Visual Learning**
- Use color coding consistently (green for commands, yellow for flags/subcommands, bold for arguments)
- Create ASCII art boxes for important concepts
- Show visual "command builders" for complex syntax
4. **Interactive Engagement**
- Mix exposition with hands-on practice
- Include "Terminal says" messages for personality
- Celebrate successes with emojis and encouragement
## š Chapter Structure Template
### 1. Chapter Opening (1-2 screens)
```
ā
Welcoming title box with chapter name
ā
Brief "what you'll learn" overview
ā
Relatable analogy to set the tone
ā
Why this matters in real life
```
### 2. Core Lessons (6-9 bite-sized sections)
Each lesson should:
- **Start with an analogy**: "Commands are like verbs in a sentence"
- **Show, don't just tell**: Use visual examples in boxes
- **Build incrementally**: Each lesson adds one new concept
- **Keep it short**: 2-3 screens max per lesson
- **End with anticipation**: "Let's see how this works in practice!"
#### Lesson Components:
```javascript
{
id: "unique_id",
title: "Catchy Title That Promises Value",
content: async () => {
// 1. Clear screen and show title
// 2. Introduce concept with analogy
// 3. Show practical examples
// 4. Include a "Terminal says" personality box
// 5. Build anticipation for next lesson
}
}
```
### 3. Terminal Personality Moments
Include 2 "Terminal says" boxes per chapter:
```
š» Terminal says:
"When you give me a command without arguments,
I feel confused! It's like saying:
'Hey, add!' ...add what? š¤·"
```
These moments:
- Make the terminal feel approachable
- Reinforce concepts through emotion
- Add humor and memorability
- Break up dense technical content
### 4. Visual Elements
#### Command Structure Visualization:
```
git commit -m "Initial commit"
ā ā ā ā
ā ā ā āā Argument (for the flag)
ā ā āā Flag (message flag)
ā āā Subcommand (save changes)
āā Command (the tool)
```
#### Progressive Command Builder:
```
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā BUILD YOUR COMMAND! š§ ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā£
ā Pick a tool: [ git ] ā
ā Pick an action: [ commit ] ā
ā Add a flag: [ -m ] ā
ā Add details: [ "Fix login bug" ] ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¢
ā Result: git commit -m "Fix login bug" ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
```
### 5. Practice Exercises (Exactly 5)
#### Exercise Distribution:
1. **Warm-up** (Multiple choice) - Recognize concepts
2. **Understanding** (Multiple choice) - Apply knowledge
3. **Pattern Recognition** (Multiple choice) - See relationships
4. **Problem Solving** (Multiple choice) - Handle edge cases
5. **Synthesis** (Type command) - Build something complete
#### Exercise Features:
- **Contextual hints**: Specific hints for wrong answers
- **Progressive hints**: More help with each attempt
- **Visual aids**: Command builders for complex exercises
- **Celebration**: Positive reinforcement for correct answers
- **Learning from mistakes**: Explanations for all outcomes
## šØ Style Guide
### Language and Tone
- **Friendly teacher**: Encouraging, patient, never condescending
- **Use "you" and "we"**: Create partnership in learning
- **Analogies first**: "It's like..." before technical details
- **Short sentences**: Easy to scan on terminal
- **Active voice**: "Type this" not "This should be typed"
### Visual Hierarchy
```javascript
const green = chalk.hex("#00FF00"); // Commands
const yellow = chalk.yellow; // Flags and subcommands
const bold = chalk.bold; // Arguments and emphasis
const dim = chalk.dim; // Explanations and notes
```
### Pacing Elements
- `sleep(500)` - Brief pause between related ideas
- `sleep(700)` - Standard pause between concepts
- `sleep(1000)` - Emphasis pause for important points
- `sleep(1500)` - Major transition or complex idea
- `sleep(2000)` - Let celebration or completion sink in
## š Chapter Completion Experience
### Score Feedback Tiers:
- **100%**: "š PERFECT SCORE! You're a command line natural!"
- **80-99%**: "š Excellent work! You've mastered the basics!"
- **60-79%**: "š Good job! Keep practicing to improve!"
- **Below 60%**: "šŖ Nice effort! Review the lessons and try again!"
### Summary Elements:
1. Celebratory title box
2. Score with percentage
3. Encouraging message based on performance
4. Checklist of concepts learned
5. Teaser for next chapter
6. Exercise-by-exercise breakdown
## š Interactive Flow
### Lesson Progression:
```
Introduction ā Core Concept ā Visual Example ā
Terminal Says ā Practice Preview ā "Ready to continue?"
```
### Exercise Flow:
```
Quick Review ā Set Expectations ā Progressive Exercises ā
Immediate Feedback ā Final Celebration ā Summary
```
## š” Best Practices
### DO:
- ā
Test every command example to ensure it works
- ā
Provide escape routes ("Press Ctrl+C to exit")
- ā
Include real-world scenarios in exercises
- ā
Celebrate small wins throughout
- ā
Make mistakes feel safe and educational
### DON'T:
- ā Introduce more than one concept per lesson
- ā Use jargon without explanation
- ā Make exercises frustratingly difficult
- ā Skip the "why" to rush to the "how"
- ā Assume prior knowledge
## šÆ Success Metrics
A chapter succeeds when:
1. Complete beginners can finish it
2. Users feel encouraged, not frustrated
3. Concepts stick through memorable analogies
4. Practice feels like play, not work
5. Users want to continue to the next chapter
## š Chapter Development Checklist
- [ ] Define clear learning objectives
- [ ] Create memorable analogies for each concept
- [ ] Design visual elements for complex ideas
- [ ] Write 2-3 "Terminal says" personality moments
- [ ] Craft 5 exercises with progressive difficulty
- [ ] Add celebration and encouragement throughout
- [ ] Test with absolute beginners
- [ ] Ensure consistent color coding
- [ ] Verify all commands work correctly
- [ ] Review pacing and timing
Remember: We're not just teaching commands, we're building confidence. Every chapter should leave users feeling more capable than when they started!