Left Icon Right Icon
Squehub SqueHub

🔧 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:
  • php squehub start
  • List all available CLI commands:
  • php squehub help

📦 Make/Generate Commands

These commands scaffold files into their appropriate directories with default boilerplate content.

  • Create a Controller:
  • php squehub make:controller UserController
  • Create a Model:
  • php squehub make:model User
  • Create a Middleware:
  • php squehub make:middleware AuthMiddleware
  • Create a Migration file:
  • php squehub make:migration CreateUsersTable
  • Create a Dumper class:
  • php squehub make:dumper UsersDumper

📂 Run Commands

These commands execute logic like database migrations or test data insertion.

  • Run all migration files:
  • php squehub migrate
  • Rollback the last batch of migrations:
  • php squehub migrate:rollback
  • Reset all migrations (rollback all):
  • php squehub migrate:reset
  • Run a specific Dumper file:
  • php squehub dump:run UsersDumper
  • Backup project to development-safe folder:
  • 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, or php 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.
;