Skip to content

The command line

longbox-cli is installed by deploy/install.sh and is the right entry point on a systemd host, because it supplies the three things an interactive shell does not have: the working directory, the service configuration from /etc/longbox.env, and the service account, so anything written stays owned by the user that owns the data.

Running the module directly is the development form, and works wherever the environment already points at the right data directory:

python -m app.cli reset-password <username>

Every example below is written this way; on a systemd install substitute sudo longbox-cli for python -m app.cli and the subcommands are identical. If the environment is not set, the CLI stops rather than guessing — it will not create a database at a path you did not mean, because an empty one would answer "there are no accounts" to the one person who needs the truth.

The subcommands:

Command Does
backup write a verified snapshot, then prune old ones
backups list what has been kept
verify hash every comic in full and report anything that changed
tag write stored metadata into CBZ files as ComicInfo.xml
convert repack CBR, CB7 and CBT archives as CBZ
relocate <old> <new> rewrite stored paths after moving comics on disk
list-users every account, role, state and comic count
reset-password <user> print a one-time reset link (--email to send it)
set-password <user> emergency only: set one directly, prompting for it. The account is then made to choose its own on next sign-in
make-admin <user> grant administrator rights (--revoke to remove)
unlock <user> re-enable an account and clear its sign-in lockout
create-user <user> create an account (--admin, --home, --email)

The CLI imports nothing outside the standard library, so it still works if the web dependencies are broken or missing.