npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

canvaslms-cli

v1.11.0

Published

A command line tool for interacting with Canvas LMS

Downloads

481

Readme

Canvas CLI Tool

npm version License: MIT Node.js Package Downloads

A modern, user-friendly command-line interface for Canvas LMS. Manage courses, assignments, submissions, grades, and more directly from your terminal.

Features

  • List and filter enrolled/starred courses
  • Star/unstar courses to manage favorites
  • Interactive course selection for all commands
  • View assignments, grades, and submission status
  • Advanced assignment filtering (missing, due this week, all courses)
  • Interactive file upload for assignments with visual file browser
  • Bulk download all course files with organized folder structure
  • GPA Calculator - Calculate overall GPA across all courses on 4.0 scale
  • What-if Grade Calculator - Find out what you need on remaining work
  • View upcoming due dates and calendar events
  • Browse course modules and content
  • View course announcements
  • Display user profile information
  • Modern table displays with adaptive column widths
  • Direct access to Canvas API endpoints

Preview

Assignment Submission Interface

Assignment submission interface

Interactive Files Selection

Interactive files selection

Detailed Grades View

Detailed grades view

Installation

Global (Recommended)

npm install -g canvaslms-cli

Setup

The setup wizard will guide you through:

  1. Getting your Canvas API Token

    • Log into your Canvas
    • Go to Account → Settings
    • Scroll down to "Approved Integrations"
    • Click "+ New Access Token"
    • Copy the generated token

    Canvas Approved Integrations

  2. Configure the CLI

    canvas config setup
  3. Entering your credentials

    • Canvas domain (e.g., school.instructure.com)
    • Your API token

Usage

Configuration

The CLI stores your Canvas domain and API token in ~/.canvaslms-cli-config.json. You can manage configuration with:

canvas config setup              # Initial setup wizard
canvas config edit               # Edit existing configuration
canvas config show               # Display current configuration
canvas config set <key> <value>  # Set a configuration value (domain, token, truncate)

Table Display Options:

  • Wrap mode (default): Text wraps to multiple lines within the column
  • Truncate mode: Text is truncated with "..." when it exceeds column width

You can toggle this during canvas config setup, canvas config edit, or use canvas config set truncate <true|false>.

Common Commands

canvas config                    # Configure domain and API token
canvas list                      # List starred courses
canvas list -a                   # List all enrolled courses

# Star/Unstar Courses
canvas star                      # Interactive course selection to star
canvas star database           # Star course matching database
canvas unstar                    # Interactive selection (shows only starred courses)
canvas unstar math             # Unstar course matching math

# Assignments (supports course name instead of ID)
canvas assignments               # Interactive course selection
canvas assignments math        # List assignments for course matching math
canvas assignments -s            # Show only submitted assignments
canvas assignments -p            # Show only pending assignments
canvas assignments -a            # Show assignments from ALL courses
canvas assignments -m            # Show MISSING assignments only
canvas assignments -w            # Show assignments DUE THIS WEEK
canvas assignments -a -m         # Show all missing assignments across all courses
canvas assignments -a -w         # Show assignments due this week from all courses

# Grades (supports course name instead of ID)
canvas grades                    # Interactive course selection + detailed grades
canvas grades database         # Show detailed grades for course matching database
canvas grades -a                 # Include inactive/completed courses
canvas grades -v                 # Include verbose enrollment details

# GPA Calculator & What-If Scenarios
canvas gpa                       # Calculate overall GPA across all active courses
canvas gpa -p                    # Include past/completed courses in GPA calculation
canvas what-if                   # Calculate what grade you need on remaining work

# Bulk Download Files
canvas download                  # Interactive course selection for bulk download
canvas download math           # Download all files from course matching math
canvas download -o ~/Downloads   # Specify output directory
canvas download math -o ./files  # Download to specific folder

# Announcements (supports course name instead of ID)
canvas announcements             # Interactive course selection
canvas announcements software  # Show announcements for course matching software
canvas announcements -l 10       # Show last 10 announcements

# Calendar & Due Dates
canvas calendar                  # View upcoming due dates (next 14 days)
canvas calendar -d 30            # View due dates for next 30 days
canvas calendar -p               # Include past due items (last 7 days)
canvas calendar -a               # Include all courses (not just starred)

# Modules
canvas modules                   # Interactive course selection
canvas modules algorithms      # Browse modules for course matching algorithms

# Todo List
canvas todo                      # View all pending items across courses
canvas todo -l 10                # Show only 10 items

# Files
canvas files                     # Interactive course file browser
canvas files math              # Browse files for course matching math

# Groups
canvas groups                    # View your group memberships
canvas groups -m                 # Show group members
canvas groups -v                 # Show detailed group info

# Submission
canvas submit                    # Interactive assignment submission
canvas submit tools            # Submit to course matching tools
canvas submit -f file.pdf        # Submit specific file
canvas submit --dry-run          # Test submission without uploading

# Profile
canvas profile                   # Show user profile
canvas profile -v                # Show all profile fields

License

See LICENSE for details.