π οΈ Command-Line Tools
LibreFolio provides the dev.py script for administration tasks. This page covers the commands most relevant to system administrators.
π©βπ» For Developers
For development-specific commands (frontend build, test runner, API sync, i18n audit), see the Developer Installation Guide.
π Installation
Install all project dependencies (Python and Node.js):
π₯οΈ Server (Production)
βΆοΈ Starting the Server
# Standard start
./dev.py server
# With auto-calculated workers (2 Γ (CPU-1))
./dev.py server --workers N
# Kill existing process on port before starting
./dev.py server --force
Multi-worker
For production, use --workers to run multiple Uvicorn workers. This improves throughput and is recommended for any deployment with more than 1 CPU core.
π€ User Management
User management is done via ./dev.py user subcommands:
# Create a user (first user becomes admin automatically)
./dev.py user create <username> <email> <password>
# List all users
./dev.py user list
# Reset a user's password
./dev.py user reset <username> <new_password>
# Promote a user to admin
./dev.py user promote <username>
# Demote an admin to regular user
./dev.py user demote <username>
βοΈ System Management
π§ Initialize Global Settings
Populates the database with default Global Settings if they don't already exist.
ποΈ Database Migrations
ποΈ Database reset
./dev.py db create-clean recreates the database from scratch β all data is lost. Use only if you need a fresh start.
π Documentation
# Build and deploy MkDocs documentation to GitHub Pages
./dev.py mkdocs deploy
# Generate gallery screenshots (requires running server + test data)
./dev.py mkdocs gallery
π Full Command Tree
For a complete list of all available commands:
π©βπ» Developer Commands
Additional commands for development workflows:
- Frontend:
./dev.py front build,front dev,front checkβ see Frontend Development - Testing:
./dev.py test allβ see Test Walkthrough - API Client:
./dev.py api syncβ see API Overview - i18n:
./dev.py i18n auditβ see Internationalization