Skip to main content

CLI users

athenaeum users edits the database under --data (or ATHENAEUM_DATA) without starting the HTTP server. Useful for recovery, bootstrap, and automation.

./bin/athenaeum users help
./bin/athenaeum users list --data ./data
./bin/athenaeum users add alice --password 'secretpass'
./bin/athenaeum users add carol --password 'secretpass' --admin
./bin/athenaeum users set-admin bob
./bin/athenaeum users set-admin bob --no-admin
./bin/athenaeum users set-permissions alice --set read,edit_metadata
./bin/athenaeum users reset-password alice
./bin/athenaeum users rename alice alice2
./bin/athenaeum users show alice
./bin/athenaeum users delete alice --force

Commands​

CommandDescription
list / lsList users
add / create <username>Create a local user (--admin grants admin)
reset-password / passwd / passwordReset password (--revoke-sessions=false keeps active sessions)
rename <user> <name>Rename a user
set-admin / adminGrant admin (--no-admin to revoke)
set-permissions / permissionsSet non-admin permission names (--set read,edit_metadata)
show / getShow one user
delete / rmDelete a user (--force skips the confirmation prompt)

Global flags​

FlagDescription
--data <dir>Data directory (default ./data or ATHENAEUM_DATA)
--color <mode>auto, always, or never
--no-colorDisable ANSI color

Passwords​

Password sources, in order: --password, ATHENAEUM_PASSWORD, or stdin. Strength rules follow the same policy flags as the server (Configuration).

Permission names match Authentication: read, edit_metadata, delete_books, manage_library, manage_users.