Rhapsody CLI Command Reference

Run the framework’s command-line utility from your project root using php rhapsody followed by the command name.

📋 List all commands: php rhapsody list 🆘 Get help: php rhapsody help [command]

⚡ Application & Optimization Commands

These utilities manage your production optimizations, template pre‑compilation, environment files, and system state.

Command Description Syntax
app:cache-warm Pre‑compiles all Twig templates under your application directory for faster production performance. php rhapsody app:cache-warm
cache:clear Flushes the application cache, including Twig compilation files, data cache components, and OPcache if configured. php rhapsody cache:clear
env:sync Scans .env.example and appends any missing variables to your active .env file without overwriting your existing values. php rhapsody env:sync
route:cache Compiles all active route definitions into a single performance‑optimized PHP file to bypass runtime parsing. php rhapsody route:cache
route:clear Deletes the generated route cache file, forcing the router to fall back to live definition parsing. php rhapsody route:clear

🛠️ Code Generation & Database Commands

Boilerplate scaffolding tools that respect the decoupled application architecture, writing clean files directly into your active rhapsody-app directory structural roots.

Command Description Syntax
make:controller Generates a new controller class block under your application’s namespace layer. php rhapsody make:controller UserController
make:model Generates a new database data model or entity file. php rhapsody make:model Post
make:middleware Scaffolds a global or route‑specific request‑response lifecycle middleware block. php rhapsody make:middleware CheckAdmin
make:event Creates a standard event payload container class. php rhapsody make:event OrderShipped
make:listener Creates an event listener class capable of hooking into the core event infrastructure engine. php rhapsody make:listener SendOrderConfirmation
make:migration Builds a timestamped database schema delta/migration boilerplate structure. php rhapsody make:migration create_posts_table
migrate Processes and executes any outstanding pending sequential migration updates against your active database context. php rhapsody migrate

🔄 Version & Package Utilities

Keeps your application’s core framework vendor dependency synchronizations healthy and transparent.

Command Description Syntax
check-version Queries upstream sources to check if a newer release of the rhapsody-core framework core package is available. php rhapsody check-version
update Leverages Composer under the hood to fetch, lock, and integrate the latest framework core codebase. php rhapsody update

Rhapsody Framework — CLI Reference • Generated with ❤️