Skip to content

Commands Overview

Lich CLI provides commands for project management, code generation, DevOps, and security.

Command Categories

🚀 Project Management

Command Description
lich init Create a new Lich project
lich dev Start development servers
lich stop Stop development servers
lich shell Open interactive Python shell

🛠️ Code Generation

Command Description
lich make entity Create domain entity
lich make service Create service layer
lich make api Create API router
lich make dto Create data transfer objects
lich make factory Create test factory
lich make middleware Create middleware
lich make event Create event class
lich make listener Create event listener
lich make job Create background job
lich make policy Create authorization policy

🗃️ Database

Command Description
lich migration Database migration commands
lich seed Database seeding
lich backup Create/restore backups

🔒 Security

Command Description
lich security Run security scans
lich secret Manage secrets
lich lint Code linting

🚀 DevOps & CI/CD

Command Description
lich deploy Deploy with Ansible
lich ci Run CI checks locally
lich production-ready Check production readiness

🔧 Utilities

Command Description
lich middleware Enable/disable middlewares
lich routes List all API routes
lich test Run tests
lich version Show version info

Getting Help

All commands support --help:

lich --help                  # Main help
lich make --help             # Make commands help
lich migration --help        # Migration help
lich security --help         # Security scans help
lich deploy --help           # Deployment help

Command Context

Most commands require being in a Lich project directory (has .lich/ folder):

cd your-lich-project
lich make entity User     # ✅ Works

cd /some/other/folder
lich make entity User     # ❌ Not a Lich project!