Repository navigation
Squeak Commands
This page provides a complete reference for all interactive commands available in the squeak shell.
To run these commands, launch the interactive shell from your project root:
php squeakOnce inside the prompt (>), enter any command listed below to execute the task or launch its interactive TUI wizard.
Commands for running the development server, streaming live logs, generating configuration files, and managing server deployments.
| Command | Category | Description |
|---|---|---|
help |
System | Shows the help menu, listing all available commands. |
version |
System | Shows the current version of mouse-php and squeak. |
init |
Project | Initializes a new mouse-php project directory. |
serve |
Server | Starts the built-in web server with hot reloading enabled. |
tail |
Logging | Starts a live real-time log stream from mouse.db. |
gen-env |
Config | Generates a new environment configuration file (.env). |
gen-db-config |
Config | Generates a new database configuration file. |
gen-deployment-config |
Config | Generates a deployment configuration file defining deployment parameters. |
deploy |
Deployment | Bundles a lightweight deployment package and deploys it to the configured remote server. |
rollback |
Deployment | Rolls back the remote server deployment to a previously selected snapshot. |
Interactive wizards for generating new framework components. All scaffolding commands obey squeak's No Destructive Commands policy and will abort if a target file already exists on disk.
| Command | Target Location | Description |
|---|---|---|
add-auth |
./core/ |
Launches an interactive wizard to scaffold a complete authentication starter stack. |
add-controller |
./core/controllers/ |
Scaffolds a new Controller class with framework dependencies injected ($DB, $SQLITE, $REQUEST_DATA). |
add-model |
./core/models/ |
Scaffolds a new query pipeline Model class containing prepared statement templates. |
add-view |
./core/views/ |
Scaffolds a new View file for rendering response content. |
add-utility |
./core/utilities/ |
Scaffolds a new helper class in the utils namespace. |
Commands for registering, inspecting, and unhooking API route definitions in Api_Routes.php and Web_Routes.php.
| Command | Action | Description |
|---|---|---|
add-route |
Create / Wire | Interactively prompts for HTTP method, URI path, target Controller/method, and automatically registers the route in Api_Routes.php and Web_Routes.php. |
show-routes |
Inspect | Displays a formatted table of all registered routes, HTTP methods, and target handlers in the current project. |
rmv-route |
Unhook | Interactively unhooks a route mapping from Api_Routes.php or Web_Routes.php. (Implementation logic files remain on disk). |
Commands for managing middleware guard modules, global stack execution, route groups, and global bypass rules.
| Command | Target Scope | Description |
|---|---|---|
add-middleware |
Module | Scaffolds a new middleware module file in ./core/middleware/modules/. |
show-middleware |
Inspection | Displays all existing middleware modules, active groups, and global assignments. |
mk-group |
Groups | Interactively creates a new named middleware group in Middleware_Module_Groups.php. |
rmv-group |
Groups | Removes a named middleware group definition. |
add-group-middleware |
Group Stack | Appends a middleware module to an existing middleware group. |
rmv-group-middleware |
Group Stack | Removes a middleware module from an existing middleware group. |
add-group-route |
Group Wiring | Maps a route URI pattern to a designated middleware group in Middleware_Route_Groups.php. |
rmv-group-route |
Group Wiring | Unlinks a route URI pattern from a middleware group. |
add-global-middleware |
Global Stack | Attaches a middleware module to execute globally on every incoming request. |
rmv-global-middleware |
Global Stack | Removes a middleware module from the global execution stack. |
add-global-bypass |
Global Stack | Registers a route URI to bypass the global middleware execution pipeline. |
rmv-global-bypass |
Global Stack | Removes a route URI from the global bypass stack. |