Skip to content

Spark CLI Commands ​

1. Publish Configuration ​

bash
php spark jengo:schema setup

2. Generate Schemas & TypeScript Definitions ​

Scan your database and automatically generate PSR-4 Schema classes:

bash
php spark jengo:schema generate

Generate TypeScript interfaces for frontend consumption:

bash
php spark jengo:schema generate --ts --ts-dir=resources/js/types/schemas

Available Command Options ​

OptionDescription
--tableGenerate schema for a specific table only.
--forceForce overwrite existing schema files.
--dbgroupSpecify database group (defaults to default or tests).
--namespaceCustom namespace for schema classes (defaults to App\Schemas).
--dirDirectory where schema files will be stored (defaults to app/Schemas).
--dry-runSimulate generation without creating or modifying files.
--with-vendorInclude vendor and system tables.
--tsGenerate TypeScript definition files (.d.ts).
--ts-dirDirectory for TypeScript definition files.

Released under the MIT License.