Mettada CLI reference
Mettada CLI reference
Section titled “Mettada CLI reference”This reference is generated from mettada list --format=json and each
registered command’s JSON help. It describes this repository revision; rerun
npm run docs:generate after changing a command. Symfony-wide options are
omitted from the per-command tables.
Common authoring flow
Section titled “Common authoring flow”php backend-laravel/bin/mettada mettada:init Workshop --path=Workshopphp backend-laravel/bin/mettada entity create Customer --project=Workshopphp backend-laravel/bin/mettada workspace create CustomerDesk --project=Workshop --entities=Customerphp backend-laravel/bin/mettada mettada:lint Workshopphp backend-laravel/bin/mettada mettada:sync WorkshopUse --interactive with mettada:init to prompt for manifest details.
The legacy codifier executable and codifier:* command aliases remain
available temporarily and print a deprecation notice; use mettada for new
scripts and workflows.
See the Quickstart for the complete framework setup.
mettada:entity:create
Section titled “mettada:entity:create”Create a schema-valid entity specification
mettada:entity:create [--relations [RELATIONS]] [--project [PROJECT]] [--manifest [MANIFEST]] [--force] [--] <name>Arguments
| Name | Required | Description |
|---|---|---|
name |
Yes | PascalCase entity class name |
Options
| Option | Value | Default | Description |
|---|---|---|---|
--relations |
Optional | null |
Comma-separated TargetEntity:relationshipType entries |
--project |
Optional | null |
Project directory or mettada.yaml path |
--manifest |
Optional | null |
Explicit mettada.yaml path |
--force |
No | false |
Replace the spec if it already exists |
mettada:entity:list
Section titled “mettada:entity:list”List entity specification files in a Mettada project
mettada:entity:list [--project [PROJECT]] [--manifest [MANIFEST]]Options
| Option | Value | Default | Description |
|---|---|---|---|
--project |
Optional | null |
Project directory or mettada.yaml path |
--manifest |
Optional | null |
Explicit mettada.yaml path |
mettada:init
Section titled “mettada:init”Initialize a Mettada backend/frontend consumer project
mettada:init [--path [PATH]] [--backend [BACKEND]] [--frontend [FRONTEND]] [--description [DESCRIPTION]] [--no-auth] [--no-rbac] [--interactive] [--force] [--] [<name>]Arguments
| Name | Required | Description |
|---|---|---|
name |
No | Consumer project name |
Options
| Option | Value | Default | Description |
|---|---|---|---|
--path |
Optional | null |
Directory to create, defaults to the project name under the packages workspace |
--backend |
Optional | "laravel" |
Backend framework |
--frontend |
Optional | "react" |
Frontend framework |
--description |
Optional | null |
Project description |
--no-auth |
No | false |
Disable authentication and user-management starter flags |
--no-rbac |
No | false |
Disable RBAC starter flags |
--interactive |
No | false |
Prompt for project manifest details |
--force |
No | false |
Replace the project manifest if it already exists |
mettada:integrate
Section titled “mettada:integrate”Wire the platform packages into a consumer framework application
mettada:integrate [--manifest [MANIFEST]] [--adopt-existing] [--] [<project>]Arguments
| Name | Required | Description |
|---|---|---|
project |
No | Consumer project directory under the packages workspace |
Options
| Option | Value | Default | Description |
|---|---|---|---|
--manifest |
Optional | null |
Project manifest path |
--adopt-existing |
No | false |
Adopt existing feature files as Mettada-managed |
mettada:lint
Section titled “mettada:lint”Validate Mettada specifications without generating or changing files
mettada:lint [--type [TYPE]] [--json] [--] [<path>]Arguments
| Name | Required | Description |
|---|---|---|
path |
No | A YAML file, specs directory, or Mettada project directory/manifest |
Options
| Option | Value | Default | Description |
|---|---|---|---|
--type |
Optional | null |
Explicit spec type for standalone files: entity or workspace |
--json |
No | false |
Print machine-readable JSON diagnostics |
mettada:sync
Section titled “mettada:sync”Synchronize a consumer project from its Mettada manifest
mettada:sync [--manifest [MANIFEST]] [--entities [ENTITIES]] [--workspaces [WORKSPACES]] [--force] [--] [<project>]Arguments
| Name | Required | Description |
|---|---|---|
project |
No | Consumer project directory under the packages workspace |
Options
| Option | Value | Default | Description |
|---|---|---|---|
--manifest |
Optional | null |
Project manifest path, relative to the Laravel base path |
--entities |
Optional | null |
Comma-separated entity names |
--workspaces |
Optional | null |
Comma-separated workspace names |
--force |
No | false |
Force a full rebuild |
mettada:template
Section titled “mettada:template”Show or copy a full-featured Mettada entity/workspace spec example
mettada:template [--output [OUTPUT]] [--check] [--] [<type>]Arguments
| Name | Required | Description |
|---|---|---|
type |
No | Template type: entity or workspace |
Options
| Option | Value | Default | Description |
|---|---|---|---|
--output |
Optional | null |
Write the example spec to a file instead of stdout |
--check |
No | false |
Check that –output matches the canonical example without writing |
mettada:workspace:create
Section titled “mettada:workspace:create”Create a schema-valid workspace specification
mettada:workspace:create [--entities [ENTITIES]] [--project [PROJECT]] [--manifest [MANIFEST]] [--force] [--] <name>Arguments
| Name | Required | Description |
|---|---|---|
name |
Yes | Workspace name |
Options
| Option | Value | Default | Description |
|---|---|---|---|
--entities |
Optional | null |
Comma-separated entity names to link |
--project |
Optional | null |
Project directory or mettada.yaml path |
--manifest |
Optional | null |
Explicit mettada.yaml path |
--force |
No | false |
Replace the spec if it already exists |
mettada:workspace:list
Section titled “mettada:workspace:list”List workspace specification files in a Mettada project
mettada:workspace:list [--project [PROJECT]] [--manifest [MANIFEST]]Options
| Option | Value | Default | Description |
|---|---|---|---|
--project |
Optional | null |
Project directory or mettada.yaml path |
--manifest |
Optional | null |
Explicit mettada.yaml path |