Skip to content

CLI Reference ​

All commands run via php hexaphp <command>.

Generators ​

CommandDescription
make:slice NameFull vertical slice (controller, model, routes, services)
make:grpc Slice.proto contract and typed RPC service for a slice (Connect, gRPC-Web, gRPC); runs protoc when installed. Options: --service=Name, --no-protoc
make:model NameModel class
make:controller NameController class
make:request NameFormRequest class
make:migration nameMigration file
make:seeder NameSeeder class
make:factory NameModel factory
make:mail NameMailable class
make:job NameQueue job
make:event NameEvent class
make:middleware NameMiddleware class
make:provider NameService provider
make:notification NameNotification class
make:resource NameAPI resource
make:test NameTest class

Database ​

CommandDescription
migrateRun pending migrations
migrate:rollbackRollback last batch
migrate:rollback --step=NRollback last N batches
migrate:freshDrop all tables + re-run migrations
migrate:fresh --seed+ run seeders
migrate:statusShow ran / pending migrations
db:seedRun DatabaseSeeder
db:seed --class=NameRun a specific seeder

Queue ​

CommandDescription
queue:installCreate jobs table migration
queue:workStart queue worker
queue:work --queue=nameWork a specific queue
queue:failedList failed jobs

Scheduler ​

CommandDescription
schedule:listShow all scheduled tasks
schedule:runRun due tasks (for cron: * * * * * php hexaphp schedule:run)
schedule:workDaemon — runs tasks as they come due, graceful SIGTERM shutdown

Cache & Optimization ​

CommandDescription
config:cacheCompile all config files into one cached file
config:clearRemove config cache
optimizeCache config + routes
optimize:clearClear all caches

OpenAPI ​

CommandDescription
openapi:generateGenerate openapi.json from your route definitions

Maintenance ​

CommandDescription
downPut app in maintenance mode (503 for all requests)
upBring app back online

Development ​

CommandDescription
server:startStart FrankenPHP worker server (auto-downloads if needed)
tinkerInteractive REPL (PsySH) with framework bootstrap

Cron setup for scheduler ​

Add this single cron entry on your server:

bash
* * * * * cd /path/to/my-app && php hexaphp schedule:run >> /dev/null 2>&1

Or use the daemon (recommended with supervisor):

bash
php hexaphp schedule:work

Released under the MIT License.