Skip to content

The open alternative to Salesforce, designed for AI.

1.3 KB
Raw Blame
---
title: Scaffolding
description: Generate app entities with twenty app add.
---

import { PageBanner } from "/snippets/page-banner.mdx"

## Overview

Use the standalone CLI to generate an object, field, validation rule, logic function, or front component:

```bash
twenty app add
twenty app add object --name invoice --name-plural invoices --no-input
twenty app add field --name amount --type NUMBER --object <object-uuid> --no-input
twenty app add validation-rule --name invoice-has-amount --object <object-uuid> --no-input
twenty app add logic-function --name send-invoice --no-input
twenty app add front-component --name invoice-panel --no-input
```

Without flags, interactive terminals prompt for missing values. For scripts and agents, supply the required fields and use `--no-input` or `--json`.

Object generation can also create a view, navigation item, and record page layout:

```bash
twenty app add object --name invoice --name-plural invoices \
  --create-view --create-navigation-menu-item --create-page-layout --no-input
```

For other entity types, write the corresponding `define*` file using `twenty-sdk/define` and a valid UUID v4. Run `twenty app typecheck` and `twenty app plan` before syncing.

`--path` selects the app directory, not a custom output folder. Run `twenty app add --help` for supported options.

<PageBanner illustration="dev-contribute" />