# uip vss generate

> Syntax and options for `uip vss generate`, which produces a TypeScript file from a Data Fabric schema for use in vertical solution code.

`uip vss generate` produces a TypeScript `vss.gen.ts` file from a Data Fabric schema (`data_fabric_schema.json`). It resolves choice sets into TypeScript unions and emits entity types the solution code can import. Run it after editing the entity schema or pulling a new schema export from [`uip df`](./uip-df.md).

## Synopsis

```
uip vss generate [options]
```

## Options

| Flag | Description |
|---|---|
| `-s, --schema <path>` | Path to the Data Fabric schema JSON. Defaults to `<target-path>/data_fabric_schema.json`. |
| `-t, --target-path <targetPath>` | Directory to write `vss.gen.ts`. Defaults to the current directory. |

## Examples

```bash
# Generate using the schema at <target>/data_fabric_schema.json
uip vss generate

# Custom schema path and target directory
uip vss generate \
    --schema ./schemas/data_fabric_schema.json \
    --target-path ./src/generated
```

## Data shape (--output json)

```json
{
  "Code": "TypesGenerated",
  "Data": {
    "Path": "/Users/alice/my-app/vss.gen.ts"
  }
}
```

## Related

- [uip df entities](./uip-df-entities.md) — author and inspect the schema that `generate` consumes.
- [uip vss init](./uip-vss-init.md) / [scaffold](./uip-vss-scaffold.md) — produce the project layout that `generate` writes into.

## See also

- [Vertical Solutions tool overview](./uip-vss.md)
- [Global options](./global-options.md)
- [Exit codes](./exit-codes.md)
