jinomial / fw-cli
The command line interface for the FW framework.
v1.0.1
2026-03-07 20:41 UTC
Requires
- php: >=8.3.0
- symfony/console: ^7.0
- symfony/yaml: ^7.4
Requires (Dev)
- jinomial/fw-framework: ^1.0
- mockery/mockery: ^1.6
- pestphp/pest: ^3.0
This package is auto-updated.
Last update: 2026-03-07 20:43:38 UTC
README
This is the command-line utility for the FW Ecosystem, acting as the core compiler that transforms declarative YAML into highly-optimized, strictly-typed PHP code.
Available Commands
When running php fw from your application root, the following commands are available:
build:api
- Purpose: Compiles
api/*.yamlfiles. - Output:
- Generates strict
readonly classDTOs for payloads. - Generates
*Handlerclasses with invoked methods. - Compiles
build/routes.phpas a static array for the Kernel.
- Generates strict
build:db
- Purpose: Compiles
database/schema.yaml. - Output:
- Generates strictly-typed native PHP
*Modelclasses (e.g.,UserModel). - Generates
*RepositoryInterfacecontracts. - Generates
Base*Repositoryclasses containing explicit parameter-bound SQL queries mapping to the DTOs, completely eliminating N+1 lazy loading.
- Generates strictly-typed native PHP
build:migrations
- Purpose: Compiles
database/schema.yamldiffs into SQL scripts. - Output:
- Drops raw
CREATE TABLE.sqlscripts intodatabase/migrations/.
- Drops raw
build:container
- Purpose: Compiles the Dependency Injection Container.
- Output:
- Reflects across your entire application and specifically bound
config/dependencies.phpfile. - Writes
build/container.php, a giganticswitch/casestatement of instantiated singletons to eliminate runtime reflection overhead.
- Reflects across your entire application and specifically bound