Skip to content

mackrus/studium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Studium CLI

A command-line tool for Uppsala University's Canvas instance (Studium).

Installation

1. Install UV

UV is required to run and install this tool. See the UV documentation.

curl -sSfL https://astral-sh.uv.io/install.sh | sh

2. Install the CLI

You can install it directly from the source:

git clone https://github.com/mackrus/studium.git
cd studium
uv tool install .

Setup

You will need an API Access Token from Studium:

  1. Log in to Studium.
  2. Go to Account > Settings.
  3. Scroll to Approved Integrations and click + New Access Token.
  4. Copy the token and set it in the CLI:
studium config set-token <YOUR_TOKEN>

(Configuration is stored in ~/.config/studium/.env)

Usage

Check your connection:

studium config status

List your active courses:

studium courses

List 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 sketchybar

List recent announcements:

studium announcements

Update to the latest version:

studium update

Open in browser:

# Open the assignment with the closest deadline
studium browser latest

# Open a specific course or assignment by ID
studium browser 123456

Sync with Canvas (updates cache and sends macOS/Linux notifications):

studium sync

(Local cache is stored at ~/.cache/studium/assignments.json)

Shell Completions

Bash, Zsh, Fish, PowerShell

The CLI uses Typer, which supports automatic completion installation:

studium --install-completion

Nushell

Completions for Nushell are provided in contrib/completions/studium.nu. Add this to your config.nu:

source /path/to/studium/contrib/completions/studium.nu

Extensions

Sketchybar (macOS)

Scripts and setup instructions for integration with Sketchybar are available in the contrib/sketchybar/ directory.

Linux Status Bars (Polybar, Waybar, etc.)

The studium assignments --format sketchybar command outputs a simple string (e.g., 󰑫 3) that can be used in most Linux status bars.

Polybar (X11)

Add a custom module to your config.ini:

[module/studium]
type = custom/script
exec = studium assignments --format sketchybar
interval = 600
label = %output%

Waybar (Wayland)

Add a custom module to your config.jsonc:

"custom/studium": {
    "format": "{}",
    "interval": 600,
    "exec": "studium assignments --format sketchybar"
}

Development

To run the tool locally without installing:

uv run studium <command>

\n- Auto-versioning enabled via git hook.

About

CLI tool for Uppsala University's Canvas instance (Studium) with assignments, courses, and status bar integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors