Skip to main content

CLI Commands Reference

Zuraffa v5 centers the CLI around one primary generation command: zfa make.

The canonical workflow is:

  1. zfa entity create
  2. zfa make
  3. zfa build

zfa feature scaffold still exists, but it is documented as a wrapper over the feature preset.


Commands overview

CommandDescription
zfa entityCreate and manage Zorphy entities
zfa makeCanonical architecture/code generation command
zfa feature scaffoldWrapper over zfa make --preset=feature
zfa buildRun the build/codegen step
zfa mockGenerate mock data (Dart or JSON)
zfa configManage .zfa.json project defaults
zfa manifestInspect available plugins and capabilities
zfa applyExecute a previously generated plan
zfa doctorInspect tooling and environment health

zfa entity create

Use this to create entities under the fixed v5 domain layout.

zfa entity create -n Product \
--field id:String \
--field name:String \
--field price:double

Entity path contract:

lib/src/domain/entities/{entity_snake}/{entity_snake}.dart

zfa make

The primary command for generating architecture.

Syntax

zfa make <Name> <plugin1> <plugin2> ... [options]

Preset-driven examples

zfa make Product --preset=crud --methods=get,getList,create,update,delete
zfa make Product \
--preset=crud \
--methods=get,getList,create,update,delete \
--with=vpc \
--state \
--di \
--test

Explicit-plugin example

zfa make Product usecase repository datasource view presenter controller state di test \
--methods=get,getList,create,update,delete

Common flags and selectors

Selector / FlagPurpose
--preset=crudResolve the CRUD generation preset
--preset=featureResolve the feature preset
--with=vpcExpand the VPC alias to view/presenter/controller
--without=<plugin>Exclude a plugin or alias from the final plan
--stateAdd the state plugin
--diAdd dependency injection generation
--testAdd tests
--mockAdd mock data generation
--jsonGenerate JSON mock data (with --mock)
--cacheAdd cache generation
--gqlAdd gql string generation
--planPrint the normalized plan and exit
--explainExplain plan resolution and exit
--format=jsonEmit machine-readable output

Planning examples

zfa make Product --preset=crud --with=vpc --plan
zfa make Product --preset=crud --with=vpc --plan --format=json

JSON input

{
"name": "Product",
"preset": "crud",
"with": ["vpc"],
"methods": ["get", "getList", "create", "update", "delete"]
}
zfa make --from-json make_config.json --plan --format=json

zfa feature scaffold

This command remains available, but in v5 it is documented as wrapper syntax.

Equivalent intent:

zfa make Product --preset=feature --plan
zfa feature scaffold Product --plan

Prefer zfa make in tutorials, automation, and AI guidance.


zfa mock

Generate mock data for testing and prototyping. Supports Dart code generation and JSON output (v5.1.0).

Generate Dart mock data

zfa mock Product
zfa mock data Product # Mock data fixtures only

Generate JSON mock data

zfa mock json Product
zfa mock json Product --domain=catalog --force

JSON mock output:

data/mock_json/{domain}/
├── {entity}.mock.json # 3 mock instances
├── {entity}.mock.json.meta # Generation metadata
└── {entity}_mock_json.dart # fromJson-based helper

Options

FlagDescription
--data-onlyGenerate only mock data fixtures (Dart)
--jsonGenerate JSON mock data with fromJson helper
--force / -fOverwrite existing files
--dry-runPreview without writing files
--verbose / -vEnable detailed logging

zfa build

Use zfa build after entity or architecture generation.

zfa build
zfa build --watch
zfa build --clean

.zfa.json and .zfa/

  • .zfa.json stores active project defaults.
  • .zfa/ is the canonical v5 project-memory model.
.zfa/
├── plans/
├── runs/
├── blueprints/
├── decisions/
├── manifests/
└── context.json

During the migration period, some internals may still reference older storage paths. Public-facing docs should still describe .zfa/ as the forward contract.