CLI Commands Reference

Lila Framework provides powerful CLI tools to speed up development. All commands follow the pattern lila-{command}

Model Generator

Create SQLAlchemy models with CRUD methods automatically.

cli.mode

# Create a new model
lila-model create --name Product

# Create with custom table name
lila-model create --name Product --table products

# List all models
lila-model list-models

Scaffold Generator

Generate complete CRUD functionality from existing models.

cli.scaffold_crud

# Generate scaffold from model
lila-scaffold-crud --model Product

# Custom route name
lila-scaffold-crud --model Product --name products

Migrations

Run database migrations to create tables from models.

cli.migrations

# Run migrations
lila-migrations migrate

# Refresh (drop and recreate all tables)
lila-migrations migrate --refresh

Authentication

Generate authentication system with login, register, and password recovery.

cli.auth

# Generate auth system
lila-auth main

Admin Panel

Create admin users and admin panel.

cli.create_admin

# Create admin user
lila-create-admin --password mypassword

# Create admin panel
lila-create-panel-admin --password mypassword

Minify Assets

Minify CSS and JavaScript files for production.

cli.minify

# Minify all CSS and JS files
lila-minify

React Integration

Setup React development environment with Lila backend.

cli.react

# Setup React  
lila-react create

# Run react development server
lila-react dev