Skip to content

peter7775/linux-tutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linux-tutor

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.

What it is

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.

Current state

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.

Features

  • 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.

Architecture

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.

How it works

A typical learning flow looks like this:

  1. The app loads the LPIC catalog.
  2. The agent generates a question for a selected topic.
  3. The user answers in the GUI.
  4. The answer is evaluated and scored.
  5. An explanation is generated by the AI layer or local fallback.
  6. Progress is saved to SQLite.
  7. The app recommends the next topic, often favoring weaker areas.

Learning model

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.

Getting started

Requirements

  • Go 1.22 or newer.
  • SQLite support.
  • A desktop environment for the GUI version.

Run the app

go run ./cmd/app

Build the binary

go build -o bin/linux-tutor ./cmd/app

Run the GUI

go run ./cmd/gui

AI configuration

If you want real AI explanations, set the following environment variables:

  • GITHUB_TOKEN
  • GITHUB_MODEL
  • GITHUB_API_VERSION optional, defaults to 2026-03-10

If these are not set, the app uses a local explanation fallback.

Project layout

linux-tutor/
├─ cmd/
├─ internal/
│  ├─ agent/
│  ├─ ai/
│  ├─ catalog/
│  ├─ domain/
│  ├─ gui/
│  ├─ infra/
│  ├─ terminal/
│  └─ usecase/
├─ Makefile
└─ README.md

Scoring

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.

Contributing

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.

License

MIT

About

linux-tutor is an interactive Linux learning app written in Go. It combines a terminal UI, a graphical UI, an LPIC-style question engine, and progress tracking in SQLite.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors