Skip to main content

CLI tool for Uppsala University Canvas (Studium)

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

studium_cli-0.2.2.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

studium_cli-0.2.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file studium_cli-0.2.2.tar.gz.

File metadata

  • Download URL: studium_cli-0.2.2.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for studium_cli-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a71daa0a144fb27147ae7c97838f842ef3052060d408332c77f0d30b3c1c026d
MD5 c1a41858937bfc1a540e7ba1117982f1
BLAKE2b-256 632ff893b8724bd456eec693db032964f8a1d7acb92fb8571284bb1bc9ef28cd

See more details on using hashes here.

File details

Details for the file studium_cli-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: studium_cli-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for studium_cli-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9cbdb10a036f435a109cf3d53cab2e1cf261a3b0ca1aaf6717a49b57fd3aaa3e
MD5 12706c684db82d1d9ee7bb27a950fdca
BLAKE2b-256 5be7acac16e4f34af18655688e4db694466c53782d16f1d8b64c44ad269a7c2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page