Agent-friendly CLI for Canvas LMS.
canvas-cli gives students, teachers, scripts, and agents a stable terminal interface for Canvas LMS: predictable commands, JSON output, safe mutation gates, and a raw API escape hatch when the typed command surface is not enough.
Canvas automation often fails because browser flows, ad hoc exports, and one-off scripts are brittle. canvas-cli keeps the common LMS workflows small and scriptable while preserving enough structure for agents to reason about courses, assignments, submissions, files, and inbox state.
Run the following on macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/thedavidweng/canvas-cli/main/install.sh | shRun the following on Windows:
powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/thedavidweng/canvas-cli/main/install.ps1 | iex"The installer detects Homebrew automatically and uses it when available (recommended for easy upgrades). Otherwise it downloads the binary to ~/.local/bin.
Other installation methods
Homebrew Cask (macOS/Linux):
brew tap thedavidweng/tap
brew install --cask canvasGo:
go install github.com/thedavidweng/canvas-cli/cmd/canvas@latestManual download: grab the archive for your platform from the latest GitHub Release, extract it, and place the canvas binary on your PATH.
canvas auth loginThe CLI walks you through selecting your Canvas instance and authenticating. You can use an access token (recommended) or a session cookie (experimental, for schools that disable tokens).
Then try it:
canvas courses list
canvas assignments list --course 123 --json# Homebrew Cask
brew uninstall --cask canvas
# install.sh
curl -fsSL https://raw.githubusercontent.com/thedavidweng/canvas-cli/main/install.sh | sh -s uninstall
# Go
rm "$(go env GOPATH)/bin/canvas"Remove config if desired: rm -rf ~/.config/canvas-cli
Docs are organized by the Diátaxis framework — the full index has everything.
Tutorial:
- Getting started — install, authenticate, first queries
How-to guides (all guides):
- Students: check what's due, submit an assignment, download course files, message your instructor
- Schools that disable tokens: log in with a session cookie
- Teaching teams: collect submissions, enter grades
Reference:
- Command Reference — full command inventory
- JSON Contract — envelope schema, exit codes,
--jsonoutput - Authentication & Configuration — token, cookie, OAuth, profiles, env vars
Explanation:
- Safety Model — read-only mode, dry-run, confirm gates
- Architecture — codebase structure and design decisions
- Contributing — development setup and guidelines
Apache License 2.0. See LICENSE.