Which command, when
For day-to-day local iteration you almost always want
yarn twenty dev. Deploying and publishing are for shipping releases, not for the local loop.yarn twenty dev --once and yarn twenty dev --once --dry-run still work as deprecated aliases for yarn twenty apply and yarn twenty plan.Local sync does not need a version bump
The strictly-increasingversion rule (VERSION_ALREADY_EXISTS on deploy, APP_ALREADY_INSTALLED / CANNOT_DOWNGRADE_APPLICATION on install) applies to app:publish / app:install — the release path. yarn twenty dev syncs your manifest in place and never requires a version change, so you don’t need to touch package.json to iterate. If you find yourself bumping the version to test a local change, you’re using the release path when you want the dev loop.
Reading the sync output
Every sync prints the metadata changes it applied (or would apply, withplan), Terraform-style — one block per entity with its attributes, then a summary line:
to destroy) are listed with what they drop (e.g. objectMetadata "auditNote" — drops the table and all its rows) and require interactive confirmation, or --force in scripts.
A sync deletes every entity your app owns that your source no longer declares. When a plan contains destroys it says so and points at --no-delete, which makes the sync additive: creates and updates are applied, nothing missing from your source is deleted, and the settings component and uninstall hook bindings of the app stay as they are when your source does not declare them. Use it when your source is intentionally partial, for example while adopting an app that was built in the UI.
When a sync fails on a single entity, the error names the offending entity and its universalIdentifier, for example:
Previewing changes (plan)
yarn twenty plan builds your manifest, asks the server for the migration plan, and prints it — without applying anything. It’s the safe way to answer “what would this sync change?” before committing to it.
- Writes nothing — no metadata migration, no application record update, no default role/tab changes, and no API client generation.
- Returns the same diff a real sync would apply, so you can review created/updated/deleted entities up front.
- Is useful before a risky change, when reviewing an AI-generated change, or in a script that should fail if an unexpected change is about to land.
A plan only previews metadata changes. It also works for an app that was never synced: the server evaluates the manifest against an empty application, so the plan lists everything your source would create.
Pulling an installed app back to source
yarn twenty pull is the inverse of apply: it reads an application out of the workspace and writes it back as define files.
npx create-twenty-app@latest first, then pull into it. Without -u, pull targets the application your local defineApplication() file declares. Add -v to expand the coverage sections of the report, which then name up to 20 identifiers per metadata type instead of only the totals.
What it writes:
- the application config;
- objects, with their fields inline;
- fields your app added to objects it does not own;
- authored indexes.
- Not exported yet — roles and permissions, views, page layouts, navigation, command menu items, logic functions and front components, and the stored source of your functions.
- Derived by the engine — system fields, default relations, default views and backing indexes. The server rebuilds them on apply. An object may still point its label identifier at one of them, as junction objects created in the UI do; the pointer is written and the build resolves it without adding a field.
- Workspace runtime state — member and API-key role assignments, webhooks and per-user navigation, all excluded by design.
- Owned by another application — reported, never pulled.
yarn twenty apply --no-delete until the missing kinds are covered. A pruning yarn twenty apply would delete them, and yarn twenty plan lists exactly which.
The base file. Pull records what it pulled in .twenty/pull-base.json, which is gitignored and per checkout. That file is what a later pull compares against to leave untouched the files whose entity did not change, and to delete the file of an entity that is gone from the workspace. A checkout without it simply writes everything and deletes nothing.
Recovery ladder
When local metadata looks wrong, escalate in this order and stop as soon as you’re unblocked. Each step is more disruptive than the last.- Re-sync. Run
yarn twenty applyagain. Syncs are idempotent — re-running a clean manifest is safe and often resolves a transient hiccup. - Preview the plan. Run
yarn twenty planto see exactly what the next sync intends to change, without applying it. - Read the named error. If a sync fails, note the metadata type and
universalIdentifierin the message (see above) and locate that entity in your manifest. A conflict usually points to a duplicated or re-used identifier. - Uninstall and reinstall.
yarn twenty app:uninstall, then sync again (yarn twenty dev). This rebuilds the app’s metadata from a clean slate while keeping the rest of your workspace intact. - Full reset (last resort).
yarn twenty docker:reset, then re-seed and re-sync.
Hit a metadata error? Please open an issue and include the failing migration message (with its metadata type and
universalIdentifier), the Metadata changes output from the sync, and the commands you ran.Avoid concurrent syncs on one workspace
Syncing applies metadata migrations. Running several sync, deploy, or install operations against the same workspace at the same time — for example, multiple terminals or AI agents iterating in parallel — can interleave those migrations and leave metadata in a partially-applied state. The server serializes syncs per workspace to prevent this, but you should still funnel sensitive metadata operations through a single process rather than firing them concurrently. If you orchestrate development with multiple agents, route their sync/deploy/install calls through one queue so only one runs at a time.Telling failures apart
When something goes wrong, the metadata diff and named errors let you place the failure:- Manifest build error — the CLI fails before syncing (
MANIFEST_BUILD_FAILED,TYPECHECK_FAILED); fix your app source. - Registration ownership error — the sync is refused because the app’s
universalIdentifierbelongs to another workspace, or to no workspace at all; see Registration ownership. - Sync / migration error — the build succeeds but applying the diff fails, naming the entity and
universalIdentifier; fix the conflicting metadata. - Dependencies size error — the sync or install fails because the app’s production
dependenciesare too large to install as a runtime layer (LOGIC_FUNCTION_DEPENDENCIES_SIZE_EXCEEDED); move packages your logic functions do not import at runtime (UI libraries, dev tooling) todevDependencies. - App code runtime error — the sync succeeds but your logic functions or components misbehave at runtime; check function logs.
- Local instance state — none of the above and the workspace still looks wrong; work down the recovery ladder.