Terminal AI tutor for language learning. Exercises, lessons, and answer analysis are generated by an LLM provider you choose.
The fastest way to get the latest release:
curl -sSL https://github.com/scriptology/open-course-cli/releases/latest/download/open-course-cli-installer.sh | shThe installer detects macOS (Apple Silicon / Intel) and Linux x86_64, then downloads the matching binary into ~/.local/bin (or /usr/local/bin if writable). It also creates a symlink opencourse, so both commands work:
open-course-cli
# or
opencourseAdd the directory to your PATH if needed:
export PATH="$HOME/.local/bin:$PATH"You can also install with cargo if you already have the Rust toolchain:
cargo install open-course-clicargo runData is stored in .open-course-cli/ under the current directory. Use --data-dir to change the location:
cargo run -- --data-dir /path/to/projectQuit with Ctrl+C or Esc/q.
Data lives in .open-course-cli/:
config.json— provider, preferences, and one profile per language pair.pairs/{native-target}/db/— per-pair LanceDB tables (curriculum,progress,history,reviews,learning_items).
Each language pair is isolated; provider settings and preferences are global.
On the first launch a wizard asks for:
- Native and target languages (ISO 639-1 codes, e.g.
ru→en). - Age and self-assessed CEFR level (
A1–C2). - Exercises batch size (
2–5). - LLM provider, API key (or leave blank to use the provider's
*_API_KEYenvironment variable), base URL (only asked for Custom/Ollama), and model.
After onboarding the app runs model diagnostics and opens the curriculum so you can generate the first course.
flowchart LR
TUI[TUI screens] --> App[AppState]
App --> DB[(LanceDB)]
App --> LLM[rig-core LLM client]
DB --> App
LLM --> App
- The dashboard shows progress, activity, and weak topics.
- Pressing
nstarts the next balanced session: a new curriculum topic or a decayed review topic. - The LLM generates a batch of translation exercises for the chosen topic.
- After the batch, answers are analyzed and scores are updated.
- Weak topics and micro-learning items are tracked for spaced repetition.
flowchart TD
Dashboard --> |n| Pick[Pick next topic]
Pick --> Exercises[Generate exercises]
Exercises --> Solve[User translates]
Solve --> Analyze[LLM analyzes answers]
Analyze --> Report[Session report]
Report --> |n| Pick
Report --> |r| Exercises
Report --> |d| Docs[Topic docs]
Supported out of the box: OpenAI, Anthropic, Google Gemini, DeepSeek, Mistral, OpenRouter, and Ollama. Any other OpenAI-compatible endpoint can be used via the Custom provider.
Onboarding fetches the list of available models automatically. For local Ollama no API key is needed; for custom endpoints set the base URL and pick chat/completions or messages depending on the API. For the other providers, leaving the API key blank falls back to the matching environment variable (OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, DEEPSEEK_API_KEY, MISTRAL_API_KEY, OPENROUTER_API_KEY) if it's set.
On startup the app checks the latest GitHub release and, if a newer version is available, shows a prompt with the current and latest version (y installs by re-running the installer script, n skips and continues to the dashboard). The check fails silently and skips the prompt if there's no network access. To update manually at any time, re-run the install command from Install, or cargo install open-course-cli if you installed it that way.
src/ui/— ratatui screens and widgets.src/core/— session orchestration, dashboard stats, spaced-repetition logic.src/db/— LanceDB tables and schemas.src/llm/— LLM client, prompts, streaming, and diagnostics.
# Run all tests
cargo test
# Debug LLM exercise generation
python3 scripts/debug_exercises.py
# One-time setup: catch formatting issues before pushing (mirrors CI's Format job)
pip install pre-commit
pre-commit installReleases are built automatically from Git tags via GitHub Actions.
-
Bump the version in
Cargo.toml(and runcargo buildto updateCargo.lock). -
Commit and push the version bump.
-
Create and push a tag:
git tag v0.2.0 git push origin v0.2.0
-
GitHub Actions will build binaries for:
aarch64-apple-darwin(Apple Silicon)x86_64-apple-darwin(Intel Mac)x86_64-unknown-linux-gnu(Linux)
…and publish them to the GitHub Release.
-
The installer script at
installer.shalways points to the latest release.
| Target | OS | Architecture |
|---|---|---|
aarch64-apple-darwin |
macOS | Apple Silicon |
x86_64-apple-darwin |
macOS | Intel |
x86_64-unknown-linux-gnu |
Linux | x86_64 |