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-downloaderscoop bucket add aik2mlj https://github.com/aik2mlj/scoop-bucket # add custom bucket
scoop install aik2mlj/canvas-downloader# use pre-built binary
# you need to have cargo-binstall installed first
cargo binstall canvas-downloader
# or compile from source
cargo install canvas-downloader- Download the corresponding binary archive from Releases
- Decompress the archive file
- Directly run the executable from terminal, or move it to
$PATHfor easier access
For 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-downloaderYou can copy the example config into one of the config file locations (searched in order):
- Custom path via
--configoption canvas-downloader.tomlin current directoryconfig.tomlin platform-specific config directory:- Linux:
~/.config/canvas-downloader/config.toml - macOS:
~/.config/canvas-downloader/config.tomlor~/Library/Application Support/canvas-downloader/config.toml - Windows:
%APPDATA%\canvas-downloader\config.toml
- Linux:
Then modify it to your Canvas instance URL and access token.
- Log in to Canvas → Account → Settings → New Access Token
Run 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 AlgorithmsYou can download courses by term ID or by course name/code:
Download by terms (all courses in specific terms):
$ canvas-downloader -t 115 120Download by course names and/or codes (specific courses only):
$ canvas-downloader -c CS1101S "Introduction to Data Structures"Combine both (courses matching both criteria):
$ canvas-downloader -t 115 -c CS1101SThe 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.
- Files
- Modules
- Syllabi (in HTML and JSON)
- Assignments (in HTML and JSON)
- Discussions and announcements (in HTML and JSON)
- Pages (in HTML and JSON)
- User information (in JSON)
- Panopto lecture videos (seems still buggy)
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.txtSee the example file for more patterns.
Use -n to overwrite local files with newer versions from Canvas:
$ canvas-downloader -t 115 -nBy 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 ~/CanvasUse -v to enable verbose output for troubleshooting:
# Enable debug logging
$ canvas-downloader -t 115 -vWithout -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
--no-submissions Do not download assignment submission files
-v, --verbose Enable debug logging
-h, --help Print help
-V, --version Print version