6e259d3ded
## Summary - `twenty-shared` is private and never published to npm, so SDK consumers couldn't resolve type imports like `from 'twenty-shared/types'` in the generated `.d.ts` files - Replace `vite.config.sdk.ts` with `rollup-plugin-dts` which compiles `src/sdk/index.ts` directly into a self-contained `dist/sdk/index.d.ts` with all `twenty-shared` types inlined - The JS output from `vite.config.sdk.ts` (`dist/sdk/*.js`) was unused — the main export already maps to `dist/index.mjs` from the node Vite config ## Changes - **Deleted** `vite.config.sdk.ts` — its preserved-module JS output wasn't referenced by any `package.json` export - **Added** `rollup.config.dts.mjs` — uses `rollup-plugin-dts` to compile SDK types from source with `twenty-shared` inlined (~850ms) - **Updated** `project.json` — build/dev/build:sdk targets now use rollup instead of the removed vite config - **Updated** `tsconfig.json` — removed `vite.config.sdk.ts` from include ## Test plan - [ ] Run `npx nx build twenty-sdk` and verify `dist/sdk/index.d.ts` contains no `twenty-shared` references - [ ] Verify `dist/index.mjs` and `dist/index.cjs` are still produced correctly - [ ] Verify CLI (`dist/cli.cjs`) still works - [ ] Verify `npx nx build:sdk twenty-sdk` works standalone Made with [Cursor](https://cursor.com)
The official scaffolding CLI for building apps on top of Twenty CRM. Sets up a ready-to-run project with twenty-sdk.
Quick start
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
yarn twenty dev
The scaffolder will:
- Create a new project with TypeScript, linting, tests, and a preconfigured
twentyCLI - Optionally start a local Twenty server (Docker)
- Open the browser for OAuth authentication
Options
| Flag | Description |
|---|---|
--example <name> |
Initialize from an example |
--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 |
By default (no flags), a minimal app is generated with core files and an integration test. Use --example to start from a richer example:
npx create-twenty-app@latest my-twenty-app --example hello-world
Examples are sourced from twentyhq/twenty/packages/twenty-apps/examples.
Documentation
Full documentation is available at docs.twenty.com/developers/extend/apps:
- Getting Started — step-by-step setup, project structure, server management, CI
- Building Apps — entity definitions, API clients, testing
- Publishing — deploy, npm publish, marketplace
Troubleshooting
- Server not starting: check Docker is running (
docker info), then tryyarn twenty server logs. - Auth not working: make sure you are logged in to Twenty in the browser, then run
yarn twenty remote add. - Types not generated: ensure
yarn twenty devis running — it auto-generates the typed client.