| Crates.io | canvas-downloader |
| lib.rs | canvas-downloader |
| version | 0.4.0 |
| created_at | 2026-01-18 09:15:03.138006+00 |
| updated_at | 2026-01-18 09:15:03.138006+00 |
| description | Download and organize all your course materials from Canvas LMS 📚 |
| homepage | |
| repository | https://github.com/aik2mlj/canvas-downloader |
| max_upload_size | |
| id | 2052104 |
| size | 235,437 |
A command-line tool to download and organize all your Canvas course materials—files, syllabi, pages, modules, assignments, discussions, and announcements—into a clean local folder structure. Made in async Rust⚡.
This is a maintained fork of this project. Also shout out to this previous fork that implements downloading additional materials.
brew tap aik2mlj/tap # add custom tap
brew install canvas-downloader
# use pre-built binary
paru -S canvas-downloader-bin
# or if you prefer, compile from source
paru -S canvas-downloader
$PATH for easier accessFor macOS, the following commands may be needed because the binary isn't signed with an Apple developer account. Also see Apple's official doc on this.
# Remove quarantine attribute
xattr -d com.apple.quarantine canvas-downloader
Create a config file in TOML format with your Canvas URL and access token:
canvas_url = "https://canvas.stanford.edu"
canvas_token = "12345~jfkdlejoiferjiofu"
How to get your token:
Config file locations (searched in order):
--config optioncanvas-downloader.toml in current directoryconfig.toml in platform-specific config directory:
~/.config/canvas-downloader/config.toml~/.config/canvas-downloader/config.toml or ~/Library/Application Support/canvas-downloader/config.toml%APPDATA%\canvas-downloader\config.tomlRun the tool to see which courses are available:
$ canvas-downloader
Please provide either Term ID(s) via -t or course name(s)/code(s) via -c
Term ID | Course Code | Course Name
-----------------------------------------------------------
115 | CS1101S | Programming Methodology
| CS1231S | Discrete Structures
-----------------------------------------------------------
120 | CS2040S | Data Structures and Algorithms
| CS2030 | Programming Methodology II
-----------------------------------------------------------
125 | CS3230 | Design and Analysis of Algorithms
You can download courses by term ID or by course name/code:
Download by term (all courses in specific terms):
$ canvas-downloader -t 115 120
Download by course name or code (specific courses only):
$ canvas-downloader -c CS1101S "Introduction to Data Structures"
Combine both (courses matching both criteria):
$ canvas-downloader -t 115 -c CS1101S
The tool will show you all files to be downloaded with their sizes, then ask for confirmation before proceeding. Downloads are organized by course, preserving Canvas's folder structure.
Note: Course name matching is exact match - use the exact course code (e.g., "CS1101S") or the exact course name as shown in the discovery step.
Create a .canvasignore file in your current directory to skip certain files using .gitignore syntax:
# Ignore all videos
*.mp4
*.mov
# Ignore specific courses
/CS1101S/
# Ignore lecture recordings folder
lecture-recordings/
The tool automatically loads .canvasignore from the current directory if it exists. You can also specify a custom ignore file with -i:
$ canvas-downloader -t 115 -i custom-ignore.txt
See .canvasignore.example for more patterns.
Use -n to overwrite local files with newer versions from Canvas:
$ canvas-downloader -t 115 -n
By default, existing local files won't be overwritten even if Canvas has newer versions.
Specify a custom folder with -d:
$ canvas-downloader -t 115 -d ~/Canvas
Use -v to enable verbose output for troubleshooting:
# Enable debug logging
$ canvas-downloader -t 115 -v
Without -v, only important progress messages are shown (info level).
Usage: canvas-downloader [OPTIONS]
Options:
--config <FILE> Path to config file (default: platform-specific config locations)
-d, --destination-folder <FOLDER> Download location [default: .]
-n, --download-newer Overwrite local files with newer Canvas versions
-t, --term-ids <ID>... Term IDs to download
-c, --course-names <NAME>... Course names or codes to download - exact match
-i, --ignore-file <FILE> Path to ignore patterns file [default: .canvasignore]
--dry-run Preview downloads without executing
--no-raw Do not save raw JSON responses
-v, --verbose Enable debug logging
-h, --help Print help
-V, --version Print version