Skip to main content

Usage

Basic Commands

Create a New Application

regius new myapp

This creates a new web application with all the necessary files and directories.

Show Help

regius help

Displays all available commands and their usage.

Check Version

regius version

Shows the current version of Regius.

Database Migrations

Run Migrations

regius migration

Runs all "up" migrations that have not been run previously.

Rollback Last Migration

regius migration down

Reverses the most recent migration.

Reset Migrations

regius migration reset

Runs all "down" migrations in reverse order, then all "up" migrations.

Create a Migration

regius make migration create_users_table fizz

Creates two new migration files (up and down) in the migrations folder. The format can be fizz or sql.

Code Generation

Create a Model

regius make model User

Creates a new model in the data directory.

Create a Handler

regius make handler Home

Creates a stub handler in the handlers directory.

Create Mail Templates

regius make mail Welcome

Creates two starter mail templates in the mail directory.

Authentication

Generate Authentication Scaffolding

regius make auth

Creates and runs migrations for authentication tables, and creates models and middleware.

Session Management

Create Session Store

regius make session

Creates a table in the database for session storage.

Maintenance Mode

Enable Maintenance Mode

regius down

Puts the server in maintenance mode.

Disable Maintenance Mode

regius up

Brings the server back from maintenance mode.

Configuration

All configuration is done through the .env file in your project root. See the Configuration section for details on all available options.