4 releases
| 0.2.2 | Feb 3, 2026 |
|---|---|
| 0.2.1 | Feb 3, 2026 |
| 0.2.0 | Feb 3, 2026 |
| 0.1.0 | Feb 3, 2026 |
#770 in Command line utilities
135KB
3.5K
SLoC
AI-Powered Learning Environment
A structured, self-paced learning environment designed to work with AI tutors (Claude, ChatGPT, etc.). Features auto-graded quizzes, exercise tracking, spaced repetition, and an interactive TUI.
Features
- Structured Curricula: Organized modules with concepts, exercises, and quizzes
- Auto-Graded Quizzes: Markdown-based quizzes with automatic grading
- Exercise Tracking: Cargo test integration for Rust (extensible to other languages)
- Spaced Repetition: Built-in review scheduling for long-term retention
- Progress Tracking: YAML-based progress with detailed metrics
- Interactive TUI: Terminal UI for browsing and taking quizzes
- CLI Tools: Commands for grading, checking progress, and more
- AI Tutor Integration: Instructions file for AI assistants to act as tutors
Installation
Option 1: Install from crates.io (recommended)
cargo install learning-tui
Option 2: Build from source
git clone https://github.com/rusenbb/learning.git
cd learning/cli
cargo build --release
# Binary at: ./target/release/learn
Quick Start
1. Clone the learning environment
git clone https://github.com/rusenbb/learning.git
cd learning
# Copy example files
cp progress.yaml.example progress.yaml
# Edit config with your name
nano config.yaml
2. Check Your Progress
learn status
learn next
4. Start Learning with an AI Tutor
Open your favorite AI assistant and include the contents of .tutor/instructions.md in your system prompt or paste it at the start of your conversation. Then say:
"Let's continue with my Rust learning"
CLI Commands
learn status # Show current progress
learn next # What to work on next
learn grade rust/02-basics # Grade a quiz
learn check rust/02-basics # Run exercises & update progress
learn mark-read rust/02-basics # Mark concepts as read
learn mark-understood rust/02-basics
learn tui # Launch interactive TUI
learn --help # Full help
Add --json to any command for programmatic output.
Project Structure
learning/
├── README.md # This file
├── CLAUDE.md # AI tutor instructions (for Claude Code)
├── config.yaml # Your settings
├── progress.yaml # Your progress (gitignored)
├── progress.yaml.example # Template for new users
│
├── .tutor/
│ └── instructions.md # AI tutor instructions (same as CLAUDE.md)
│
├── cli/ # Rust CLI + TUI
│ ├── Cargo.toml
│ └── src/
│
├── curricula/ # Course content
│ └── rust/ # Example: Rust curriculum
│ ├── curriculum.yaml
│ ├── 01-getting-started/
│ │ ├── concepts.md
│ │ ├── quiz.md
│ │ └── exercises/
│ └── ...
│
└── templates/ # For creating new curricula
Creating Your Own Curriculum
-
Create the structure:
mkdir -p curricula/python/01-basics/{exercises,hints} -
Add
curriculum.yaml:meta: name: "Python Programming" type: "coding-heavy" difficulty: "beginner" modules: 01-basics: title: "Python Basics" estimated_hours: 3 objectives: - "Write your first Python program" learning_path: beginner: - 01-basics -
Create module content:
concepts.md- Theory and explanationsquiz.md- Questions with<!-- ANSWER_KEY: 1=A, 2=BC -->exercises/- Test files for your language
-
Add to progress.yaml:
topics: python: status: "not_started" current_module: null modules: {}
See curricula/rust/ for a complete example.
Quiz Format
# Quiz: Topic Name
<!-- ANSWER_KEY: 1=B, 2=AC -->
<!-- Passing score: 70% -->
## Question 1: Single Choice
What is 2 + 2?
- [ ] A) 3
- [ ] B) 4
- [ ] C) 5
## Question 2: Multiple Select
Which are prime? (Select all)
- [ ] A) 2
- [ ] B) 4
- [ ] C) 7
Students mark answers with [x], then run learn grade <topic>/<module>.
Using with AI Tutors
The tutor instructions (CLAUDE.md / .tutor/instructions.md) contain:
- Teaching methodology
- Session protocols
- Quiz and exercise formats
- Feedback guidelines
Claude Code
Claude Code automatically reads CLAUDE.md. Just open the project and say:
"Let's continue with my Rust learning"
ChatGPT / Other
Paste the contents of .tutor/instructions.md at the start of your conversation.
Contributing
Contributions welcome! Ideas:
- New curricula (Python, Go, JavaScript, etc.)
- TUI improvements
- Additional exercise runners
- Better spaced repetition algorithms
License
MIT
Dependencies
~14–30MB
~408K SLoC