CanvasCLI is a powerful tool for UPenn students to interact with the Canvas LMS from the command line.
UPenn Canvas LMS API.
- Student-managed access token ensures full privacy.
- Automate self-hosting of .ics calendar feeds.
# Coming soon...canvascli setup # Setup API connection by prompting for a user token
canvascli sync # Sync course data from Canvas APIcanvascli course ls # List active courses
canvascli course ls --all # List all courses (including old/inactive)
canvascli course ls --published # Show only courses with published .ics feedscanvascli calendar ls # List all calendar items chronologically
canvascli calendar ls --course <id|name> # List calendar items for a specific course
canvascli calendar ls --filtered # Show filtered calendar itemscanvascli calendar filter # Launch interactive terminal UI for managing filters- Navigate using arrow keys (
↑↓) - Add a new filter: Press
a, then chooseincludeorexclude, and enter a regex pattern - Remove a filter: Select a filter and press
d - Edit a filter: Select a filter and press
e - Apply changes and exit: Press
q
canvascli calendar publish setup # Setup Google Drive API authentication
canvascli calendar publish ls # List all published calendars
canvascli calendar publish --course <id|name> # Publish a single course's .ics feed
canvascli calendar publish --all # Publish all active course .ics feeds
canvascli calendar publish --filtered # Publish all active filtered .ics feeds- First-time setup: Users will authenticate with Google Drive via OAuth2.
- Publishing: Uploads
.icsto Google Drive and provides a shareable link.
To ensure .ics feeds stay updated, users can enable automatic updates using the CLI.
canvascli calendar autoupdate enable # Automatically sync and publish every 4 hours- Adds a cron job (Linux/macOS) or Task Scheduler task (Windows) to run every 4 hours.
- Runs
canvascli syncfollowed bycanvascli calendar publish --all --filtered.
canvascli calendar autoupdate disable # Remove the scheduled auto-update task- Removes the previously created cron job or scheduled task.
crontab -e # Open the crontab editor
0 */4 * * * canvascli sync && canvascli calendar publish --all --filtered # Run every 4 hours📌 Note: Auto-updates only run when the user's computer is turned on.
canvascli calendar unpublish --course <id|name> # Remove a published .ics feedcanvascli --help # Show general help
canvascli <command> --help # Show help for a specific command🔹 Designed for efficiency
Short and intuitive commands
🔹 Flexible & Powerful
Easily manage courses and calendars from the CLI
🔹 Automatic Feed Updates
Scheduled sync ensures .ics feeds stay current when the computer is on.
🔹 Expanding Features
More integrations coming soon!
- Additional Cloud Providers: Support for OneDrive and Dropbox for
.icshosting. - Provider Switching: Allow users to select and switch between providers.
- Self-Hosting: Option to upload
.icsfiles to a personal server. - Advanced Filtering: More complex event filtering logic.
📌 Stay tuned for updates and contributions!