🔧 Squehub CLI Commands
The Squehub CLI is a powerful tool that helps you scaffold, run, and manage different parts of your application directly from the terminal. It is accessible using the command:
php squehub
Below is a breakdown of all available CLI commands and how to use them.
🚀 Quick Start Commands
- Start development server:
- List all available CLI commands:
php squehub start
php squehub help
📦 Make/Generate Commands
These commands scaffold files into their appropriate directories with default boilerplate content.
- Create a Controller:
- Create a Model:
- Create a Middleware:
- Create a Migration file:
- Create a Dumper class:
php squehub make:controller UserController
php squehub make:model User
php squehub make:middleware AuthMiddleware
php squehub make:migration CreateUsersTable
php squehub make:dumper UsersDumper
📂 Run Commands
These commands execute logic like database migrations or test data insertion.
- Run all migration files:
- Rollback the last batch of migrations:
- Reset all migrations (rollback all):
- Run a specific Dumper file:
- Backup project to development-safe folder:
php squehub migrate
php squehub migrate:rollback
php squehub migrate:reset
php squehub dump:run UsersDumper
php squehub backup:dev
🆘 Help & Utility
- Show all CLI commands:
php squehub help
📁 File Locations
- Controllers:
project/controllers/
- Models:
project/models/
- Middlewares:
project/middleware/
- Migrations:
database/migrations/
- Dumper:
database/dumper/
- Backups (dev):
storage/backups/dev/
(auto-created)
✅ Summary
- Use
php squehub make:<type> <Name>
to generate files. - Use
php squehub migrate
,php squehub migrate:rollback
, orphp squehub migrate:reset
to manage migrations. - Use
php squehub dump:run
to execute Dumper files. - Use
php squehub backup:dev
to safely export current work. - Keep code organized and add namespaces where necessary.
💡 Tip: You can create your own CLI commands by editing
clis/clis.php
and following the command structure.