CLI Guide¶
The IronTrack command-line interface (CLI) is the central tool for managing the application lifecycle, from database migrations to user administration.
Main CLI Entry Point (app)¶
All core operations are performed using the app command. You can always use the --help flag at any level to see available options.
Server Management¶
Manage the FastAPI application server.
Command |
Description |
|---|---|
|
Starts the development server with hot-reload enabled. |
|
Starts the server in production mode (no reload, optimized). |
Database Administration¶
Handle schema evolution and database state.
Command |
Description |
|---|---|
|
Applies all pending SQLAlchemy/Alembic migrations. |
|
Shows additional database tools (revision, downgrade, etc.). |
User & Access Management¶
These commands manage roles and user accounts. Note: Some commands will prompt for missing information (like passwords) interactively.
Command |
Description |
|---|---|
|
Mandatory. Initializes system roles (Superuser, Application Access, etc.) from fixtures. |
|
Creates a default administrator using the email defined in config. |
|
Interactive command to create a new regular or superuser. |
|
Grants superuser status and the superuser role to an existing email. |
Example: Promoting a user
app users promote-to-superuser --email user@example.com
Database Seeding¶
To populate the database with reference books (muscle groups, equipment, etc.) and the standard exercise collection, use the command:
make seed