A fast, terminal-first CLI for Canvas LMS.
canvas-cli helps you quickly see assignment work from your shell, with a clean table UI, due-date highlighting, clickable assignment titles, and simple ignore controls.
- Fast assignment listing via Canvas Planner API
- Manual token login flow (
canvas login) - Clean table output with:
- Colorized courses
- Overdue due dates highlighted in red
- Clickable assignment names
- Row-based ignore flow (
canvas ignore) --allmode to include completed + undated assignments- Config stored in XDG config directory
- Python 3.13+
uv(recommended)
uv tool install --force /path/to/canvas-cliThen run:
canvas --helpuv pip install -e /path/to/canvas-cliuv run canvas --help- Log in:
canvas loginYou’ll be guided to create a Canvas access token in your browser and paste it securely.
- View open assignments:
canvas ls- Show everything (including completed + undated):
canvas ls --all
# or
canvas ls -a- Ignore an assignment by row number:
canvas ignore 4Or run without args to pick interactively after listing:
canvas ignoreSaves your Canvas base URL + token to local config.
Options:
--base-url--token(optional; if omitted, prompted securely)
Lists assignments from active courses.
Default behavior:
- Shows incomplete assignments with due dates
- Sorted by due date
- Hides ignored assignments
Options:
--all,-a: include completed and undated assignments
Ignores an assignment so it no longer appears in canvas ls.
- Uses row IDs from the most recent
canvas lsoutput - If no row is provided, prompts after showing the list
Config file location:
${XDG_CONFIG_HOME:-~/.config}/canvas-cli/config.json
Stored data includes:
base_urltoken- cached display metadata (
display_name,host) - ignored assignment keys
- last
lsrow mapping (forcanvas ignore)
Run lint:
uv run ruff checkRun CLI in dev:
uv run canvas --helpcanvas_cli/
api.py # Canvas HTTP + endpoint helpers
cli.py # Typer commands
config.py # config load/save/require
formatting.py # due-date + link formatting helpers
models.py # dataclasses