Skip to content

Command line

The package installs one command, sufs-tracker (also python -m sufs_tracker). build and catalog use only the standard library; init, user and backup need the server dependencies. In the container, prefix with docker compose exec sufs-tracker.

sufs-tracker build

Writes the standalone page and its PWA files, for hosting on any static web server.

Option Meaning
--dist DIR Output directory. Default dist.
--check Also run node --check on each copy's inline script (needs Node.js).

Output: DIR/index.html (standalone), DIR/manifest.webmanifest, DIR/icon-192.png, DIR/icon-512.png. Exits with an error if a template marker is missing.

sufs-tracker catalog [SOURCE]

Converts a SUFS catalog export to sufs_tracker/page/catalog.js. SOURCE defaults to data/catalog.json. Exits with an error if two lines would share an 8-character key.

sufs-tracker init

Creates the server database, or upgrades an older one, at SUFS_DB_PATH. Safe to repeat; the server also does this on startup.

sufs-tracker backup DEST

Writes a consistent copy of the database to DEST using SQLite's online backup, so it's safe while the server is running and writing. DEST of - streams the file to standard output, which is how to pull a backup out of a container without a shared volume. See Back up and restore.

sufs-tracker user create USERNAME

Creates a login and a personal account named after it, set as the user's default. Prompts for the password twice.

sufs-tracker user reset USERNAME

Sets a new password and deletes all of that user's sessions.

Both user commands accept --password-stdin to read the password from one line of standard input.

Rules: usernames are 1–64 characters from letters, digits and . _ @ -, compared case-insensitively; passwords are at least 8 characters.