A command-line tool for Uppsala University's Canvas instance (Studium).
UV is required to run and install this tool. See the UV documentation.
curl -sSfL https://astral-sh.uv.io/install.sh | shYou can install it directly from the source:
git clone https://github.com/mackrus/studium.git
cd studium
uv tool install .You will need an API Access Token from Studium:
- Log in to Studium.
- Go to Account > Settings.
- Scroll to Approved Integrations and click + New Access Token.
- Copy the token and set it in the CLI:
studium config set-token <YOUR_TOKEN>(Configuration is stored in ~/.config/studium/.env)
Check your connection:
studium config statusList your active courses:
studium coursesList upcoming assignments:
# Display a table with countdown timers
studium assignments
# Filter by course code
studium assignments --course 1FA603
# Force a refresh from the API and update the cache
studium assignments --force
# Get a status-bar-formatted string ( 3)
studium assignments --format sketchybarList recent announcements:
studium announcementsUpdate to the latest version:
studium updateOpen in browser:
# Open the assignment with the closest deadline
studium browser latest
# Open a specific course or assignment by ID
studium browser 123456Sync with Canvas (updates cache and sends macOS/Linux notifications):
studium sync(Local cache is stored at ~/.cache/studium/assignments.json)
The CLI uses Typer, which supports automatic completion installation:
studium --install-completionCompletions for Nushell are provided in contrib/completions/studium.nu.
Add this to your config.nu:
source /path/to/studium/contrib/completions/studium.nuScripts and setup instructions for integration with Sketchybar are available in the contrib/sketchybar/ directory.
The studium assignments --format sketchybar command outputs a simple string (e.g., 3) that can be used in most Linux status bars.
Add a custom module to your config.ini:
[module/studium]
type = custom/script
exec = studium assignments --format sketchybar
interval = 600
label = %output%Add a custom module to your config.jsonc:
"custom/studium": {
"format": "{}",
"interval": 600,
"exec": "studium assignments --format sketchybar"
}To run the tool locally without installing:
uv run studium <command>\n- Auto-versioning enabled via git hook.