Download the PHP package spatial/cli without Composer
On this page you can find all versions of the php package spatial/cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package cli
Short Description CLI tools for Spatial Framework - code generators, migrations, and development utilities
License MIT
Informations about the package cli
Spatial CLI
Development tools for Spatial Framework - code generators, migrations, and development utilities.
Installation
Commands (21)
Generators (13)
| Command | Description |
|---|---|
make:controller |
Controller with Area + CQRS |
make:command |
CQRS command + handler |
make:query |
CQRS query + handler |
make:module |
API module structure |
make:dto |
DTO with validation |
make:entity |
Doctrine entity |
make:service |
Infrastructure service |
make:middleware |
PSR-15 middleware |
make:trait |
Domain DB trait |
make:event |
Domain event |
make:listener |
Event listener |
make:seeder |
Database seeder |
make:job |
Background job |
Database (4)
| Command | Description |
|---|---|
migrate:create |
Create migration |
migrate:run |
Run migrations |
migrate:status |
Migration status |
db:seed |
Run seeders |
Quality (2)
| Command | Description |
|---|---|
lint |
PSR-12 code style |
analyze |
PHPStan analysis |
Build (2)
| Command | Description |
|---|---|
deploy:build |
Package for production |
openapi:generate |
Generate OpenAPI spec |
Usage
Dry-Run Mode
Preview generated code without creating files:
Output shows:
- File paths that would be created
- Line counts and file sizes
- First 20 lines of each file as preview
- Full content can be reviewed before committing
Smart Error Messages
The CLI provides contextual help when errors occur:
Typo Detection:
Missing Parameters:
Optional Flags
All generators support optional flags for fine-grained control over generated code:
Common Flags
--logging- Include PSR-3 LoggerInterface dependency injection and logging calls--tracing- Include OpenTelemetry TracerInterface dependency injection and span tracking
Generator-Specific Flags
make:query,make:command--releaseEntity- Add entity manager cleanup in finally block
make:controller--auth- Add #[Authorize] attributes to POST/PUT/DELETE endpoints
make:job--retry=<number>- Set custom retry attempts (default: 3)--queue=<name>- Set queue name (default: default)
make:middleware--folder=<name>- Set folder name (default: Middlewares)
Configuration
Create a .spatial.yml file in your project root to define default generator settings and avoid repetitive flag usage.
Example Configuration
Priority System
Configuration values are resolved in this order (highest to lowest):
- CLI Flags - Explicit command-line arguments
- Generator Overrides - Command-specific config (
make:query,make:command, etc.) - Global Defaults - Project-wide defaults
- Hardcoded Defaults - Built-in framework defaults
Usage Examples
With config file:
This command:
Automatically includes logging (from config), equivalent to:
Override config with CLI:
See .spatial.yml.example for a complete configuration template.
Package Separation
This package contains development tools only.
| Package | Commands | Install |
|---|---|---|
spatial/core |
5 runtime (route:, cache:, queue:work) | require |
spatial/cli |
21 development | require-dev |
License
MIT - Created by Kofi Owusu-Afriyie