Multi-school Canvas, Blackboard & Moodle CLI and default-read-only MCP server (with opt-in, audited upload & write workflows) for Codex, Claude Code, and terminal workflows.
English | 简体中文 · Compatibility · Evolution Plan · Roadmap · Discussions
Query courses, announcements, assignments, grades, files, and calendars across Canvas, Blackboard, and Moodle from a single terminal interface — or expose them safely to AI agents via read-only Model Context Protocol (MCP) tools.
Installation, school discovery, profile setup, and updates all happen directly in the terminal. A local sign-in window opens only when your university SSO or MFA requires interactive authentication.
- CLI-first & harness-agnostic (zero plugin required): Any shell-capable third-party agent harness (OpenCode, Cline, Roo Code, Windsurf, Goose, Aider, Claude Code, Codex, Cursor, or custom loops) can self-discover and drive
lmsnatively vialms capabilities --compact,lms guide --mode cli, cross-platform verbs (lms courses,lms announcements,lms grades,lms calendar,lms todo,lms files), single-processlms batch, and--compactJSON — with optional stdiolms mcpand Codex / Claude Code plugins when desired. - Multi-school & multi-platform: Search official Canvas school directories, paste any school/course URL (
lms setup --url/lms detect), extend the data-driven school catalog (src/data/schools.jsonor$LMS_HOME/schools.json), or connect Moodle subpath deployments like/moodle. - Bilingual sign-in GUI (EN / 中文): The isolated local sign-in window auto-detects OS locale and includes a live
EN / 中文toggle while keeping all CLI/code strictly English. - Read-only by default, opt-in tiered writes: Every profile starts strictly
readonly. Opt in locally per profile (lms profiles writes <id> --mode draft|standard --yes) to unlock audited file uploads, drafts, assignment submissions, and discussion replies with--dry-runSHA-256 preflight and mandatory--confirm/confirm: true. Quizzes, exams, and raw HTTP remain permanently disabled. See docs/EVOLUTION.md. - Local-first security: Sessions and local todos are encrypted on disk with keys managed by your OS keychain (
@napi-rs/keyring); SHA-256 verified standalone releases with resumable updates. - Deadline tracking & ICS export: Track schedule/deadline changes spotted in announcements and export local todos to
.icscalendars.
Terminal / Codex / Claude Code / MCP Client
│
▼
cli.ts / mcp.ts ◄── config · auth · local todos
│
▼
backend.ts + policy.ts (read-only allowlist · schema validation · cache)
│
▼
worker.ts (isolated per profile × platform) ──► vault.ts (OS keychain)
│
▼
platforms/{canvas,blackboard,moodle}/runtime.ts ──► University HTTPS API
Every LMS platform is registered once in src/platforms/registry.ts — CLI flags, MCP schemas, login policies, and overview planners are all derived from it. See docs/ARCHITECTURE.md.
macOS / Linux:
curl -fsSL --proto '=https' https://raw.githubusercontent.com/zs-andy/lms-cli/main/install.sh | shWindows (PowerShell):
& ([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/zs-andy/lms-cli/main/install.ps1).Content))The installer downloads the matching self-contained archive from GitHub Releases, verifies SHA256SUMS.txt, and installs into your user directory with bundled Node.js — no admin rights, Node, npm, or Git required. Verified Homebrew, Scoop, and Winget manifests are also generated from SHA256SUMS.txt for each release (see packaging/README.md). For unsupported targets, see building from source.
lms setupWorks for any school — preset or not:
- Search by school name/domain, or paste any course/dashboard URL straight from your browser (e.g.
https://canvas.uni.edu/courses/123,https://learn.uni.edu/ultra/course,https://uni.edu/moodle/my/).lms-cliautomatically detects the platform, strips course/login leaf paths (preserving clean Moodle subpaths), and suggests the timezone. - Auto-detects installed AI clients (Codex, Claude Code, Cursor) so you can connect your preferred client—or use standalone CLI—without hitting missing-client errors.
Useful shortcuts:
lms setup --url "https://your-school-lms-url" # One-command auto-detect + setup
lms detect "https://your-school-lms-url" # Inspect platform & clean base URL
lms setup --client claude --client cursor # Connect Claude Code / Cursor directly
lms profiles attach --moodle https://uni.edu/moodle # Add a second platform to a school
lms profiles export-preset --alias "MyUni" # Export a secret-free preset JSON to share or PRlms status # Active profile, auth & write policy summary
lms overview --days 7 --fresh # Bounded schedule + full announcements across platforms
lms courses --compact # Cross-platform fan-out (single-line JSON)
lms announcements --compact
lms batch --calls '[{"tool":"canvas_list_courses"}]' --compact
lms download <file-id> --directory ./downloads # Relative paths resolved on CLI; never overwrites
lms capabilities --compact # Single-shot manifest for third-party harnesses
lms guide --mode cli --out AGENTS.md # Export live harness-agnostic agent instructionsAfter running lms setup --no-codex:
claude plugin marketplace add zs-andy/lms-cli
claude plugin install lms-cli@lms-cliOr register the MCP server directly (do not enable both at once):
claude mcp add --scope user lms -- lms mcpRead-only lms tools carry MCP read-only annotations; local configuration, login, download, and opt-in write tools (lms_profile_add, lms_profile_attach, lms_profile_use, lms_auth_login, lms_items_upsert, lms_download_file, lms_write) should remain confirmation-gated.
lms update --check # Check for a newer stable release
lms update # Download (with resume & SHA-256 check) and upgrade
lms update --rollback # Revert to the previous versionSet LMS_UPDATE_CHECK=0 to disable automatic update checks.
When re-authentication is needed, lms-cli always opens your school's genuine SSO/login page. Optional, off-by-default Remember Password and Auto Sign-In toggles are available for standard forms, multi-step sign-in flows, and Microsoft ADFS (such as PolyU). Credentials are encrypted locally only after verified authentication; CAPTCHA, push MFA, and device compliance remain controlled by your school. See docs/USER_GUIDE.md for details and cleanup instructions.
After enabling both Remember Password and Auto Sign-In interactively, scheduled CLI or MCP runs can opt into hidden reauthorization with LMS_AUTH_BACKGROUND=1:
LMS_AUTH_BACKGROUND=1 lms overview --days 7 --fresh
LMS_AUTH_BACKGROUND=1 lms auth loginThis keeps the authorization controller, school SSO child windows, and JavaScript dialogs hidden without stealing focus (and suppresses the macOS Dock icon). Each platform is capped at 45 seconds and continues to remaining platforms on failure. Without existing consent—or on MFA, CAPTCHA, network errors, or unsupported forms—it fails closed with state: "cancelled" instead of popping up a window; repair interactively by running lms auth login with LMS_AUTH_BACKGROUND unset. Note that background mode hides windows within a graphical desktop session; headless Linux without a display server (or Xvfb) and OS Secret Service remains unsupported.
- Users: User Guide · Schools & Multi-Account Setup · School Compatibility Matrix · Install Options · Privacy · Security
- Contributors: Contributing Guide · Code of Conduct · Roadmap · Changelog · Development Guide · Architecture · Adding a New LMS Platform · Releasing
Contributions are very welcome! Great places to jump in:
- Report your university's compatibility in Discussions or docs/COMPATIBILITY.md, or add verified school presets.
- Pick up starter issues labeled
good first issueorhelp wanted. - Add a new LMS platform (e.g., Brightspace/D2L, Google Classroom, Sakai) using the template in
src/platforms/_template/and docs/ADDING_A_PLATFORM.md. - Improve cross-platform installers & tests across macOS, Linux, and Windows.
Run the offline check & test suite locally (no university account required):
npm ci
node node_modules/electron/install.js
npm run check:repo && npm run typecheck && npm testSee CONTRIBUTING.md and CODE_OF_CONDUCT.md before opening a pull request.
Independent community project with no affiliation to any university, Instructure, Anthology, or OpenAI. Connectors build on canvas-student-mcp and blackboard-mcp; see THIRD_PARTY_NOTICES.md.
Licensed under the MIT License.