linux-tutor is an interactive Linux learning app written in Go. It combines a terminal UI, a graphical UI, LPIC-style question generation, AI explanations, and progress tracking in SQLite.
The app helps users practice Linux command-line skills in a structured way. It is built around LPIC-inspired topics such as GNU and Unix commands, process management, permissions, shell scripting, user administration, networking, and host security.
The current project focuses on the GUI flow and the AI tutoring layer. Questions are generated from the LPIC catalog, explanations are produced through the AI adapter with a local fallback, and practice is now driven by many variants per topic rather than one fixed prompt. The next question logic is also controlled by error frequency, so weaker topics come back more often.
- Graphical UI built with Fyne.
- LPIC topic catalog stored in JSON.
- AI explanation layer with GitHub Models fallback behavior.
- Multiple question variants per topic, up to 50 per topic in the current generator.
- Adaptive question flow driven by weak topics and error history.
- SQLite-backed progress tracking.
- Separate lesson, question, feedback, and explanation views.
The project is organized by responsibility:
cmd/— entry points for each executable.internal/agent/— question generation, evaluation rules, prompts, guidelines, AI explanation, and tutoring logic.internal/catalog/— LPIC topic catalog data.internal/domain/— core domain types such as topics, questions, answers, attempts, and stats.internal/infra/— persistence, repositories, and other infrastructure code.internal/gui/— GUI application, theme, and desktop flow.internal/usecase/— application use cases such as starting lessons, generating questions, evaluating progress, and recommending next topics.internal/ai/— AI-facing abstractions, catalog loading, tutoring spec, and adapter interfaces.
This structure keeps UI concerns, business logic, and infrastructure separate, which makes the project easier to extend and test.
A typical learning flow looks like this:
- The app loads the LPIC catalog.
- The agent generates a question for a selected topic.
- The user answers in the GUI.
- The answer is evaluated and scored.
- An explanation is generated by the AI layer or local fallback.
- Progress is saved to SQLite.
- The app recommends the next topic, often favoring weaker areas.
The learning model is designed around topic-level practice rather than random quizzes. Each topic can generate many task variants, including command-based prompts and scenario-style tasks.
The current generator uses up to 50 variants per topic, so the same topic can be practiced repeatedly without seeing the same prompt every time. The next-question selection is guided by mistakes and weak-topic counts, so the app spends more time where the learner struggles.
- Go 1.22 or newer.
- SQLite support.
- A desktop environment for the GUI version.
go run ./cmd/appgo build -o bin/linux-tutor ./cmd/appgo run ./cmd/guiIf you want real AI explanations, set the following environment variables:
GITHUB_TOKENGITHUB_MODELGITHUB_API_VERSIONoptional, defaults to2026-03-10
If these are not set, the app uses a local explanation fallback.
linux-tutor/
├─ cmd/
├─ internal/
│ ├─ agent/
│ ├─ ai/
│ ├─ catalog/
│ ├─ domain/
│ ├─ gui/
│ ├─ infra/
│ ├─ terminal/
│ └─ usecase/
├─ Makefile
└─ README.md
Answer evaluation uses a simple rubric:
- exact answer.
- partial answer.
- wrong answer.
This makes it possible to distinguish between full understanding and partial familiarity, especially in shell and scenario-based tasks.
Contributions are welcome. If you add new topics, update the catalog. If you add a new task type, extend the agent and AI layers consistently. If you change persistence, keep the repository and infra layers aligned.
MIT