Skip to main content

studip-router — Stud.IP files, sorted into your folders

Terms · Quick start · Usage · Configuration · Commands · FAQ · Troubleshooting

CI Python 3.11–3.14 macOS | Linux License MIT Never deletes

Course files in, your folder structure out. Most Stud.IP downloaders mirror the course's folder tree. studip-router files every document into the folders you already use — whatever you call them (Exercises, Übungen, Hausaufgaben, Slides, Skript, Exams/Past papers, …) — with per-course rules, because every lecturer organises their course differently:

studip

Press s, confirm the one-line summary, done. A second run downloads nothing unless something changed on Stud.IP.

Home screen of the terminal UI

The home screen: one suggested next step (Enter does it), five everyday actions, the rest behind More. All course names in the screenshots are made up.


Guides

Course-specific routing rules and PDF merge settings are configured in TOML; the settings screen covers the common options and groups the rest under Advanced.

Features

One key to sync run studip, press s, confirm the summary.
Incremental only new or changed files are downloaded; a second run does nothing.
Rule-based routing per course, first match wins: Stud.IP folder, folder type, file name (glob/regex), extension, MIME type, size, date, description.
Automatic routing a file no rule matches still lands in the right folder when its Stud.IP folder says what it is (Übungen, Tutorium, Notebooks, Folien, Slides, Vorlesung, …) — also for folders created mid-semester.
Rule suggestions understand German and English folder names on both sides (Übungsblätter, Homework, Tutorium … → your Exercises/Übungen/… folder) — including courses with one folder per session.
Renaming templates with regex groups (Blatt (\d+) → Exercise_{1:02}{ext}), zero padding, umlauts, spaces, prefixes.
Settings screen essentials plus advanced options, change with ←/→ (or h/l), saved immediately; u undoes the last change — comments in your config file are kept.
Knows your existing files hand-downloaded files are recognised (even as Name_with_underscores.pdf); a file you moved within the course folder is followed.
Updates become versions a changed file becomes name_v2.pdf (configurable). Renames, moves and re-uploads of the same content never create copies.
Robust a failing course is reported while all others still sync; messy names, interrupted transfers, HTML error pages, broken ZIPs and iCloud are handled — see tricky files.
Background sync with desktop notifications, also about problems; a failed login pauses it so a changed password cannot lock your account.
Changed dates after each sync: cancelled, moved and re-roomed course dates and new exam dates — in the summary and as a notification; studip dates lists upcoming exams.
Locked PDFs one shared PDF password per course (keychain) — PDFs locked with it are stored without it; see FAQ.
Extras Courseware files (opt-in), announcements, ZIP extraction, merged slide PDFs, never-download list, --json output, profiles.

Quick start

uv tool install studip-router
studip

The first start opens a setup in three steps. Every field is prefilled with a good guess, so usually you only press Enter:

Step Asks for Prefilled with
1/3 Stud.IP address, username, password — (the password goes to the OS keychain)
2/3 where your course folders live the folder that already contains most of your courses — searched in iCloud Drive, Documents, Desktop, Dropbox, OneDrive, Google Drive, Nextcloud. Nothing found: a new iCloud Drive/Uni/WiSe 2026-27 (without iCloud: ~/Documents/Uni/…)
3/3 which courses to sync, the subfolders of new course folders, the default folder the courses that already have a folder (all of them when starting fresh); the subfolders your existing course folders share — otherwise Folien, Übungen, Klausur, Sonstiges

Missing folders are created after one confirmation, each course folder with the same subfolders. Because their names say what they hold, files land in the right one from the first sync on — no rules needed.

Setup step 2: the folder that already holds your courses is suggested first Setup step 3: courses, subfolders of new course folders, default folder

Then: p shows where every file would go, s syncs. studip init is the same setup in the terminal.

One block, one command: the copy icon takes exactly one call.


Requirements

  • Python 3.11+, macOS or Linux. Windows is not supported (not tested; background sync and notifications do not exist there).
  • An OS keychain: macOS Keychain, or a Secret Service keyring on Linux (GNOME Keyring, KWallet). On servers, WSL or containers without one, set STUDIP_ROUTER_PASSWORD instead (see Headless use); the password is never stored in a file.
  • A Stud.IP instance with the JSON:API enabled and username/password login (local or LDAP accounts). Check: https://<your-studip>/jsonapi.php/v1/discovery must open in a browser.
  • SSO-only accounts (Shibboleth/OIDC without a Stud.IP password) and two-factor authentication are not supported yet — contributions welcome, see docs/DESIGN.md.

Installation

Tool Install Update
uv uv tool install studip-router uv tool upgrade studip-router
pipx pipx install studip-router pipx upgrade studip-router
pip (in a venv) python3 -m venv ~/.venvs/studip && ~/.venvs/studip/bin/pip install studip-router ~/.venvs/studip/bin/pip install -U studip-router

After an update the background sync checks whether the new version would put files you already have into other folders. If so, it waits (at most three days) and sends one notification; opening studip or one studip sync by hand ends the wait, and o moves the files if you agree.

uv and pipx put the studip command on your PATH and keep it apart from other Python packages. Plain pip install studip-router into the system Python is refused by Homebrew and most Linux distributions ("externally-managed-environment"); with a venv, call ~/.venvs/studip/bin/studip or link it into a folder on your PATH.

Releases come from PyPI, built and uploaded by this repository's GitHub Actions (changes). A specific version: uv tool install studip-router==0.2.1. No uv yet? See its installation (one command; it brings its own Python). The unreleased state of main: uv tool install git+https://github.com/nbomers/studip-router.

Shell completions (zsh, bash, fish)

zsh (the macOS default):

mkdir -p ~/.zfunc && studip completion zsh > ~/.zfunc/_studip

Then add fpath=(~/.zfunc $fpath) to ~/.zshrc before compinit.

bash:

mkdir -p ~/.local/share/bash-completion/completions && studip completion bash > ~/.local/share/bash-completion/completions/studip

fish:

studip completion fish > ~/.config/fish/completions/studip.fish

Completes subcommands, flags and your course folders. Run the command again after an update. shell/studip.fish is an optional fish wrapper for running from a source checkout.


Terms of use

The tool logs in with your own account and only reads what you can see in the browser. Check whether your university's terms of use allow automated access; keep the background interval reasonable (at least 15 minutes is enforced, 2 hours is the default). Licensed course material stays licensed after it is downloaded or unlocked.

Development

uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .

Ground rules, layout and conventions: CONTRIBUTING.md. Invariants, architecture and the Stud.IP API calls: docs/DESIGN.md. Changes: CHANGELOG.md.

Use of AI

The code was written with Claude (Anthropic) via Claude Code; the commits say so in their Co-Authored-By lines. What for:

  • Writing code — modules, the terminal UI and the tests; run and checked with pytest and ruff before being adopted.
  • Review and debugging — e.g. file names with decomposed umlauts (NFD) on Linux.
  • Documentation — this README, the design notes and the changelog.

Tests run against a fake Stud.IP (tests/fake_studip.py); no real course data, IDs or accounts are in the repository.

Credits

License Use
Stud.IP JSON:API — the data source
HTTPX BSD-3-Clause HTTP client
Typer MIT command line
Textual MIT terminal UI
keyring MIT password in the OS keychain
tomlkit MIT config edits that keep comments
pypdf BSD-3-Clause merged slide PDFs, unlocking PDFs
cryptography Apache-2.0 / BSD-3-Clause AES for locked PDFs
platformdirs MIT config, state and log paths
truststore MIT the operating system's certificates

License

The code is under the MIT license.

Not affiliated with the Stud.IP e.V. or any university.

Metadata

Release files for studip-router 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for studip-router 0.5.0
File Size Uploaded Provenance Actions
studip_router-0.5.0.tar.gz 382.4 kB With provenance Details for studip_router-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for studip-router 0.5.0
File Interpreter ABI Platform Actions
studip_router-0.5.0-py3-none-any.whl Python 3 none any Details for studip_router-0.5.0-py3-none-any.whl

Total release size: 568.9 kB

Release files / studip_router-0.5.0.tar.gz

Download URL studip_router-0.5.0.tar.gz
Size 382.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c3cfce1421274d39654309ba92ccff021f36fc565c7b00f527352ae72d55dc76
BLAKE2b-256 checksum
How to use checksums
8418bd4d9b93aceac957a8c3c12db1a405de1aef5b3212800e5222121f7b9e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / studip_router-0.5.0-py3-none-any.whl

Download URL studip_router-0.5.0-py3-none-any.whl
Size 186.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30b2a4159c612370c7e1d00f529c6c87b2f39f05520e7b2b744af4f550f198ec
BLAKE2b-256 checksum
How to use checksums
845f471dad54589326d925be38aa67c844af55ac06a25b6541f706eb3becfdb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for studip-router 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for studip_router-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page