Getting started
Install the OpenL2 CLI and Python package, then jump straight into the workflow you need.
Step 1: Install OpenL2
Section titled “Step 1: Install OpenL2”Prerequisites
Section titled “Prerequisites”- Git
- Python 3.11 or newer
- Optional: an AI client that supports local MCP servers (Claude Desktop, Cursor, Codex, etc.)
Install
Section titled “Install”git clone https://github.com/jetway-languages/openl2.gitcd openl2python3 -m venv .venvsource .venv/bin/activatepython -m pip install -e .Optional extras:
- Passage analysis / level estimation:
Terminal window python -m pip install -e ".[analysis]" - Contributors (
pytest,ruff):Terminal window python -m pip install -e ".[dev]"
Verify the install:
openl2 library listopenl2 validate courses/calling-in-sickConnect an AI agent (MCP)
Section titled “Connect an AI agent (MCP)”If you plan to author or adapt courses with an AI client, register openl2-course-design-mcp as a local MCP server using absolute paths:
{ "mcpServers": { "openl2": { "command": "/absolute/path/to/openl2/.venv/bin/openl2-course-design-mcp", "args": [], "env": { "OPENL2_COURSES_DIR": "/absolute/path/to/courses" } } }}Where to place this config for common clients:
- Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json - Cursor:
.cursor/mcp.json(project) or~/.cursor/mcp.json(global) - Codex / Claude Code: Add via your client’s MCP config (
~/.codex/config.tomlor.mcp.json)
Omit the env block if you want the agent to work directly on the repository’s built-in courses/ directory.
Step 2: Pick your path
Section titled “Step 2: Pick your path”- Adapt a Course — Fork CEFR, HSK, JLPT, or Latin for a specific learner, job, or goal using MCP or Git.
- Build Your First Course — Author a new focused course from scratch on top of a language library.
- Analyze Text & Difficulty — Score real-world passages against a language library and inspect interactive HTML reports.
- Export & Publish — Publish static reference sites, export a course to Anki, or publish a course to Jetway.
Developers
Section titled “Developers”- Integrating OpenL2 — Compile courses in Python (
compile_level_export) and render lessons in your own app. - Learner Modeling & SRS — Track per-Concept/Skill mastery, schedule contextual reviews, and exchange state via
openl2-study. - Building Plugins — Register an
openl2.pluginsexporter or integrate via.openl2-study.json. - Level Predictor Training — Reproduce or retrain OpenL2’s
0–100difficulty predictor weights.