https://github.com/thedavidweng/canvas-cli
Agent-friendly CLI for Canvas LMS. Stable JSON output, automatic pagination, mutation safety gates, audit logging.
https://github.com/thedavidweng/canvas-cli
agent-friendly api-client canvas-lms cli education go json lms
Last synced: 14 days ago
JSON representation
Agent-friendly CLI for Canvas LMS. Stable JSON output, automatic pagination, mutation safety gates, audit logging.
- Host: GitHub
- URL: https://github.com/thedavidweng/canvas-cli
- Owner: thedavidweng
- License: apache-2.0
- Created: 2026-06-13T03:39:50.000Z (21 days ago)
- Default Branch: main
- Last Pushed: 2026-06-20T09:28:00.000Z (14 days ago)
- Last Synced: 2026-06-20T11:20:18.900Z (14 days ago)
- Topics: agent-friendly, api-client, canvas-lms, cli, education, go, json, lms
- Language: Go
- Homepage: https://thedavidweng.github.io/site/canvas-cli/
- Size: 403 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
canvas-cli
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.
## Why
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.
## Quickstart
### Install
Run the following on macOS or Linux:
```shell
curl -fsSL https://raw.githubusercontent.com/thedavidweng/canvas-cli/main/install.sh | sh
```
Run the following on Windows:
```shell
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):**
```shell
brew tap thedavidweng/tap
brew install --cask canvas
```
**Go:**
```shell
go install github.com/thedavidweng/canvas-cli/cmd/canvas@latest
```
**Manual download:** grab the archive for your platform from the [latest GitHub Release](https://github.com/thedavidweng/canvas-cli/releases/latest), extract it, and place the `canvas` binary on your `PATH`.
### Set up
```shell
canvas auth login
```
The 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:
```shell
canvas courses list
canvas assignments list --course 123 --json
```
### Uninstall
```shell
# 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`
## Documentation
- [Authentication & Configuration](docs/auth.md) — token, cookie, OAuth, profiles, env vars
- [Command Reference](docs/command-spec.md) — full command inventory with examples
- [JSON Contract](docs/json-contract.md) — envelope schema, exit codes, `--json` output
- [Safety Model](docs/safety-model.md) — read-only mode, dry-run, confirm gates
- [Architecture](docs/architecture.md) — codebase structure and design decisions
- [Contributing](CONTRIBUTING.md) — development setup and guidelines
## Infrastructure
- **CI/CD:** [cli-workflow-template](https://github.com/thedavidweng/cli-workflow-template) — reusable GitHub Actions workflows
- **Docs:** [site](https://github.com/thedavidweng/site) — landing page and documentation
## License
Apache License 2.0. See [LICENSE](LICENSE).