Skip to content

Repository files navigation

Course Pilot

Rust CI License: MIT

Course Pilot is a local-first desktop application for structuring and studying video courses from YouTube playlists or local media files. It automatically detects module boundaries, extracts transcripts, generates AI summaries, and provides inline context-aware Q&A and quizzes.

Features

  • Ingestion: Import YouTube playlists or scan local directories (MP4, MKV, WEBM) with companion subtitle support.
  • Module Boundaries: Algorithmic video grouping based on title pattern detection with configurable fallback sizes.
  • Media Player: Integrated libmpv player with position tracking, playback speed controls, and subtitle rendering.
  • Study Companion: Context-aware AI Q&A chat and MCQ quiz generation powered by Gemini (or self-hosted LLMs via genai).
  • Notes & Search: Local notes per video with SQLite FTS5 full-text search.

Prerequisites

  • Rust 1.88+ (Rust 2024 edition)
  • libmpv development headers and library installed on host system.

Dependencies (Linux)

Distribution Command
Ubuntu/Debian sudo apt install libmpv-dev libsqlite3-dev
Fedora sudo dnf install mpv-devel sqlite-devel
Arch Linux sudo pacman -S mpv sqlite

Quick Start

  1. Clone repository and copy configuration template:

    git clone https://github.com/k5602/course_pilot.git
    cd course_pilot
    cp .env.example .env
  2. Run database migrations:

    diesel migration run
  3. Build and launch application:

    cargo run --release

Configuration

Set environment variables in .env or pass directly:

Variable Required Default Description
DATABASE_URL No course_pilot.db SQLite database file path
GEMINI_API_KEY No None Gemini API key for AI features (can also be set in app settings)

Development

# Compile check
cargo check

# Run test suite
cargo test

# Format code
cargo fmt

Architecture Overview

src/
├── app.rs        # AppContext container and configuration loading
├── boundary.rs   # Title pattern analysis and subtitle text cleaning
├── courses.rs    # Course ingestion, playlist parsing, and directory scanning
├── study.rs      # Summarization, note handling, and quiz management
├── companion.rs  # Contextual AI Q&A and chat history persistence
├── db.rs         # Diesel SQLite persistence layer and FTS5 search index
├── player.rs     # libmpv media player binding
├── ai.rs         # genai LLM client adapter
└── ui/           # Iced 0.14 GUI (views, components, theme, state)

License

MIT License. See LICENSE for details.

About

A ML Augmented Modern Rust desktop application that automatically analyzes video-based courses, creates logical learning structures, and generates personalized study schedules. Built with performance, accessibility, and user experience at its core.

Resources

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages