Prerequisites
Before you begin, make sure the following is installed on your machine:- Node.js 24+ — Download here
- Yarn 4 — Comes with Node.js via Corepack. Enable it by running
corepack enable - Docker — Download here. Required to run a local Twenty instance. Not needed if you already have a Twenty server running.
Step 1: Scaffold your app
Open a terminal and run:my-twenty-app with everything you need.
The scaffolder supports these flags:
--minimal— scaffold only the essential files, no examples (default)--exhaustive— scaffold all example entities--name <name>— set the app name (skips the prompt)--display-name <displayName>— set the display name (skips the prompt)--description <description>— set the description (skips the prompt)--skip-local-instance— skip the local server setup prompt
Step 2: Set up a local Twenty instance
The scaffolder will ask:Would you like to set up a local Twenty instance?
- Type
yes(recommended) — This pulls thetwenty-app-devDocker image and starts a local Twenty server on port2020. Make sure Docker is running before you continue. - Type
no— Choose this if you already have a Twenty server running locally.

Step 3: Sign in to your workspace
Next, a browser window will open with the Twenty login page. Sign in with the pre-seeded demo account:- Email:
tim@apple.dev - Password:
tim@apple.dev

Step 4: Authorize the app
After you sign in, you will see an authorization screen. This lets your app interact with your workspace. Click Authorize to continue.

Step 5: Start developing
Go into your new app folder and start the development server:--verbose flag:

Step 6: See your app in Twenty
Open http://localhost:2020/settings/applications#developer in your browser. Navigate to Settings > Apps and select the Developer tab. You should see your app listed under Your Apps:



src/ and the changes will be picked up automatically.
Head over to Building Apps for a detailed guide on creating objects, logic functions, front components, skills, and more.
Project structure
The scaffolder generates the following file structure (shown with--exhaustive mode, which includes examples for every entity type):
--minimal), only the core files are created: application-config.ts, roles/default-role.ts, logic-functions/pre-install.ts, and logic-functions/post-install.ts. Use --exhaustive to include all the example files shown above.
Key files
| File / Folder | Purpose |
|---|---|
package.json | Declares your app name, version, and dependencies. Includes a twenty script so you can run yarn twenty help to see all commands. |
src/application-config.ts | Required. The main configuration file for your app. |
src/roles/ | Defines roles that control what your logic functions can access. |
src/logic-functions/ | Server-side functions triggered by routes, cron schedules, or database events. |
src/front-components/ | React components that render inside Twenty’s UI. |
src/objects/ | Custom object definitions to extend your data model. |
src/fields/ | Custom fields added to existing objects. |
src/views/ | Saved view configurations. |
src/navigation-menu-items/ | Custom links in the sidebar navigation. |
src/skills/ | Skills that extend Twenty’s AI agents. |
src/agents/ | AI agents with custom prompts. |
src/page-layouts/ | Custom page layouts for record views. |
src/__tests__/ | Integration tests (setup + example test). |
public/ | Static assets (images, fonts) served with your app. |
Managing remotes
A remote is a Twenty server that your app connects to. During setup, the scaffolder creates one for you automatically. You can add more remotes or switch between them at any time.~/.twenty/config.json.
Local development server (yarn twenty server)
The CLI can manage a local Twenty server running in Docker. This is the same server started automatically when you scaffold an app with create-twenty-app, but you can also manage it manually.
Starting the server
twentycrm/twenty-app-dev:latest Docker image (if not already present), creates a container named twenty-app-dev, and starts it on port 2020. The CLI waits until the server passes its health check before returning.
Two Docker volumes are created to persist data between restarts:
twenty-app-dev-data— PostgreSQL databasetwenty-app-dev-storage— file storage
NODE_PORT and SERVER_URL to match the chosen port, so logic functions, OAuth, and all other internal networking work correctly.
Once started, the server is automatically registered as the local remote in your CLI config.
Checking server status
tim@apple.dev / tim@apple.dev).
Viewing server logs
--lines to control how many recent lines to show:
Stopping the server
start picks up where you left off.
Resetting the server
start creates a fresh instance.
The server requires Docker to be running. If you see a “Docker not running” error, make sure Docker Desktop (or the Docker daemon) is started.
Command reference
| Command | Description |
|---|---|
yarn twenty server start | Start the local server (pulls image if needed) |
yarn twenty server start --port 3030 | Start on a custom port |
yarn twenty server stop | Stop the server (preserves data) |
yarn twenty server status | Show server status, URL, and credentials |
yarn twenty server logs | Stream server logs |
yarn twenty server logs --lines 100 | Show the last 100 log lines |
yarn twenty server reset | Delete all data and start fresh |
CI with GitHub Actions
The scaffolder generates a ready-to-use GitHub Actions workflow at.github/workflows/ci.yml. It runs your integration tests automatically on every push to main and on pull requests.
The workflow:
- Checks out your code
- Spins up a temporary Twenty server using the
twentyhq/twenty/.github/actions/spawn-twenty-docker-imageaction - Installs dependencies with
yarn install --immutable - Runs
yarn testwithTWENTY_API_URLandTWENTY_API_KEYinjected from the action outputs
.github/workflows/ci.yml
spawn-twenty-docker-image action starts an ephemeral Twenty server directly in the runner and outputs the connection details. The GITHUB_TOKEN secret is provided automatically by GitHub.
To pin a specific Twenty version instead of latest, change the TWENTY_VERSION environment variable at the top of the workflow.
Manual setup (without the scaffolder)
If you prefer to set things up yourself instead of usingcreate-twenty-app, you can do it in two steps.
1. Add twenty-sdk and twenty-client-sdk as dependencies:
twenty script to your package.json:
yarn twenty dev, yarn twenty help, and all other commands.
Do not install
twenty-sdk globally. Always use it as a local project dependency so that each project can pin its own version.Troubleshooting
If you run into issues:- Make sure Docker is running before starting the scaffolder with a local instance.
- Make sure you are using Node.js 24+ (
node -vto check). - Make sure Corepack is enabled (
corepack enable) so Yarn 4 is available. - Try deleting
node_modulesand runningyarn installagain if dependencies seem broken.