Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Summary

Manage Canvas LMS from the terminal — courses, assignments, submissions and grading, modules, pages, quizzes, users, enrollments, files, and analytics.

Install to Claude Code

/plugin install canvas-cli@canvas

Run in Claude Code. Add the marketplace first with /plugin marketplace add jjuanrivvera/canvas-cli if you haven't already.

README.md

<p align="center"> <img src="docs/assets/images/logo.svg" alt="Canvas CLI" width="280"> </p>

<p align="center"> <a href="https://github.com/jjuanrivvera/canvas-cli/actions/workflows/ci.yml"><img src="https://github.com/jjuanrivvera/canvas-cli/actions/workflows/ci.yml/badge.svg" alt="CI"></a> <a href="https://github.com/jjuanrivvera/canvas-cli/actions/workflows/ci.yml"><img src="https://img.shields.io/badge/coverage-%E2%89%A580%25-brightgreen" alt="Coverage"></a> <a href="https://go.dev/"><img src="https://img.shields.io/badge/Go-1.25+-00ADD8?style=flat&logo=go" alt="Go Version"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"></a> <a href="https://github.com/jjuanrivvera/canvas-cli/releases"><img src="https://img.shields.io/github/v/release/jjuanrivvera/canvas-cli" alt="Release"></a> <a href="https://pkg.go.dev/github.com/jjuanrivvera/canvas-cli"><img src="https://pkg.go.dev/badge/github.com/jjuanrivvera/canvas-cli.svg" alt="Go Reference"></a> <a href="https://deepwiki.com/jjuanrivvera/canvas-cli"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a> <a href="https://cliwright.jjuanrivvera.com"><img src="https://img.shields.io/badge/built_with-cliwright-1f6feb" alt="Built with cliwright"></a> </p>

<p align="center"> A powerful command-line interface for <a href="https://www.instructure.com/canvas">Canvas LMS</a>, built with Go. </p>

<p align="center"> <a href="https://jjuanrivvera.github.io/canvas-cli/"><strong>Documentation</strong></a> · <a href="https://jjuanrivvera.github.io/canvas-cli/getting-started/installation/"><strong>Installation</strong></a> · <a href="https://jjuanrivvera.github.io/canvas-cli/commands/"><strong>Commands</strong></a> </p>

---

Features

  • Secure Authentication - OAuth 2.0 with PKCE (confidential or secret-less public clients), system keyring integration
  • Multi-Instance - Manage multiple Canvas instances from one CLI
  • Smart Rate Limiting - Adaptive throttling based on API quotas
  • Multiple Outputs - Table, JSON, YAML, and CSV formats
  • Interactive Mode - REPL shell with command history and completion
  • 80% API Coverage - 876 of Canvas's 1086 documented endpoints implemented in the service layer, exposed through 93 command groups
  • Spec-Verified - Every endpoint path validated against Canvas's official API spec in CI (details)
  • MCP Server - Use as an AI agent tool via Model Context Protocol
  • AI Agent Skill - Bundled skill for Claude Code, Cursor, and other agents (canvas skills install)
  • Signed Releases - cosign-signed checksums, SBOMs, and a distroless Docker image

Installation

Quick Install (macOS/Linux)

Auto-detects your platform and verifies the checksum:

curl -fsSL https://raw.githubusercontent.com/jjuanrivvera/canvas-cli/main/install.sh | sh

Homebrew (macOS/Linux)

brew tap jjuanrivvera/canvas-cli
brew install canvas-cli

Scoop (Windows)

scoop install https://raw.githubusercontent.com/jjuanrivvera/scoop-canvas-cli/main/canvas-cli.json

Go Install

Requires Go 1.25+ (or Go 1.24+ with automatic toolchain download).

go install github.com/jjuanrivvera/canvas-cli/cmd/canvas@latest

Docker

docker run --rm ghcr.io/jjuanrivvera/canvas-cli:latest version

Images are published to GHCR for every release (:latest, :v1, and exact versions). Pass credentials via environment variables:

docker run --rm -e CANVAS_URL -e CANVAS_TOKEN ghcr.io/jjuanrivvera/canvas-cli:latest courses list

Binary Download

Download from GitHub Releases. Release checksums are signed with cosign (keyless) and archives ship with SBOMs — verification instructions are in the .goreleaser.yaml signs section.

Quick Start

# Authenticate with your Canvas instance
canvas auth login https://your-school.instructure.com

# List your courses
canvas courses list

# Get assignments for a course
canvas assignments list --course-id <course-id>

# Start interactive mode (alias: canvas shell)
canvas repl

Command Overview

| Category | Commands | |----------|----------| | Auth | login, logout, status | | Courses | list, get, create, update, delete | | Assignments | list, get, create, update, delete | | Submissions | list, get, grade, bulk-grade, comments | | Users | me, list, get, create, update | | Enrollments | list, get, create, conclude, reactivate, accept, reject | | Modules | list, get, create, update, delete, publish, items | | Pages | list, get, create, update, delete, front, revisions | | Discussions | list, get, create, entries, post, reply, subscribe | | Announcements | list, get, create, update, delete | | Quizzes | list, get, create, update, delete, questions, submissions | | Grades | history, feed, columns | | Groups | list, get, create, update, delete, users, categories | | Outcomes | list, get, create, update, link, unlink, groups, results | | Rubrics | list, get, create, update, delete, associate | | Conversations | list, get, create, reply, archive, star, mark-read | | Calendar | list, get, create, update, delete, reserve | | Files | list, get, upload, download, delete | | Sections | list, get, create, update, delete, crosslist | | Polls | polls, choices, sessions, submissions | | Folders / Files | folders, files, multi-context (course / group / user) | | Favorites / Bookmarks | favorites, bookmarks, course-nicknames | | Account Admin | auth-providers, csp-settings, account-reports, enrollment-terms, developer-keys, grading-period-sets | | Grading | grading-periods, grading-standards, rubric-associations, live-assessments | | Content | content-exports, content-migrations, blackout-dates, course-pacing, blueprint | | Comms / Misc | conversations, comm-channels, content-shares, media, conferences, eportfolios, audit | | Admin | admins, roles, analytics, sis-imports, appointment-groups | | Utilities | repl, doctor, webhook, api, version |

This is a sample — the CLI has 93 command groups, and its service layer implements 80% of Canvas's official API. See the full command reference for all 540+ commands and their flags.

API Spec Compliance

Canvas CLI's API paths are validated in CI against Canvas's official API spec (Swagger 1.2, committed under testdata/spec/). A network-free contract test harvests every endpoint the CLI calls and asserts it matches a documented Canvas endpoint — so a wrong path fails the build. The committed manifest is refreshed from a live Canvas host with make spec-sync, and make spec-coverage reports which documented endpoints aren't implemented yet.

Configuration

# ~/.canvas-cli/config.yaml
default_instance: myschool
instances:
  myschool:
    url: https://myschool.instructure.com
    client_id: your-client-id
settings:
  default_output_format: table
  cache_enabled: true

See Authentication Guide for detailed setup.

MCP Server Mode

Canvas CLI can also run as an MCP server, exposing nearly all of its commands as tools for AI coding agents (Claude Code, Cursor, VS Code Copilot). Only the canvas mcp management commands themselves are excluded.

# Start as STDIO MCP server
canvas mcp start

# Start as HTTP MCP server
canvas mcp stream --port 8080

# Export all tool schemas to JSON
canvas mcp tools

# Auto-configure in your editor
canvas mcp claude enable
canvas mcp vscode enable
canvas mcp cursor enable

The same binary, two interfaces. When used as an MCP server, each CLI command becomes an MCP tool with typed parameters derived from the command's flags. Required flags become required schema properties. All output goes through structured JSON.

Sensitive flags (--show-token, --config) are automatically excluded from MCP exposure.

> Note for go install users: MCP support requires Go 1.25+ due to the MCP Go SDK dependency. Homebrew and binary downloads are not affected by this requirement.

For full setup (Claude Desktop, Claude Code CLI, Cursor, VS Code, OpenCode, Codex), auth precedence, and troubleshooting, see:

AI Agent Skill

Canvas CLI ships an agent skill that teaches AI coding agents (Claude Code, Cursor, Codex, Gemini CLI, Windsurf, Copilot, …) how to drive it — commands, flags, safety rules (--dry-run previews), and common grading/content workflows. Install the skill across every agent you have with one command:

npx skills add jjuanrivvera/canvas-cli

Or use one of the built-in / native paths:

canvas skills install --global              # write the bundled skill (no Node needed)
canvas skills install --agent cursor        # target a specific agent

# Native Claude Code plugin:
#   /plugin marketplace add jjuanrivvera/canvas-cli
#   /plugin install canvas-cli@canvas

The skill wraps this binary, so install the CLI (above) and authenticate first. For structured tool access (Claude Desktop, etc.) use the MCP server mode described above — the two can coexist.

See the Agent Skill guide for details.

Agent Safety

When an AI agent drives canvas, it can issue destructive commands (courses delete, sections crosslist, enrollments conclude). Use the built-in guard to generate permission rules and a PreToolUse hook that hard-block irreversible operations and require approval for writes:

# Review what will be generated
canvas agent guard --host claude-code

# Install config and hook script into the current project
canvas agent guard --host claude-code --write

# Strictest: also block create/update/grade
canvas agent guard --host claude-code --all-writes --write

Supported hosts: claude-code, codex, opencode. Regenerate after upgrading canvas so new commands are covered.

See the Agent Safety guide for the hard-block vs ask model, obfuscation caveats, and MCP-only recommendations.

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

MIT License

Related plugins

Browse all →