An AI-powered CLI study tutor that generates questions on any topic and drills you using seven different learning methods. Progress and spaced-repetition state are persisted between sessions.
- AI question generation — enter any topic and the tutor generates a question bank via the OpenAI API (model:
o4-mini) - Seven learning methods — automatically rotated based on your performance:
Method Description Flashcard Classic Q&A card with self-graded recall Cloze Deletion Fill-in-the-blank sentence Q&A Drill Open-ended question graded by the LLM Self-Explanation Explain a concept from memory Quiz Multiple-choice, True/False, or short-answer Matching Pair terms with their definitions Sequencing Order steps or events correctly - Adaptive difficulty — difficulty (1–5) adjusts automatically based on recent accuracy
- Adaptive method selection — methods you struggle with are shown more often; mastered methods less often
- Spaced repetition — SM-2 algorithm schedules card reviews based on individual card performance
- Persistent progress — per-topic stats and card state saved to
progress.json; question bank cached inquestions.json
- Bun v1.2+
- An OpenAI API key
bun installCreate a .env file in the project root:
OPENAI_API_KEY=your_key_here
bun run index.tsYou will be prompted for a topic. The tutor will load a saved question bank if one exists for that topic, or generate a new one (takes ~15–30 s). From there you can:
- Start a practice session (adaptive or choose a method manually)
- View your per-method performance stats
- Re-generate the question bank for the topic
index.ts – Main flow / entry point
state.ts – Shared types (TutorState, Question, LearningMethod)
adaptive.ts – Difficulty & method-weight adaptation logic
callLlm.ts – OpenAI client wrapper
questions.ts – Question generation & persistence
progress.ts – Progress load/save helpers
methods/ – One file per learning method
plugins/cli.ts – readline-based CLI helpers (ask, print, hr)