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.
- 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
libmpvplayer 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.
- Rust 1.88+ (Rust 2024 edition)
- libmpv development headers and library installed on host system.
| 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 |
-
Clone repository and copy configuration template:
git clone https://github.com/k5602/course_pilot.git cd course_pilot cp .env.example .env -
Run database migrations:
diesel migration run
-
Build and launch application:
cargo run --release
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) |
# Compile check
cargo check
# Run test suite
cargo test
# Format code
cargo fmtsrc/
├── 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)
MIT License. See LICENSE for details.