Files
twenty/packages/twenty-sdk
martmullandGitHub e498367e2f Merge twenty-cli into twenty-sdk (#16150)
- Moves twenty-cli content into twenty-sdk
- add a new twenty-sdk:0.1.0 version
- this new twenty-sdk exports a cli command called 'twenty' (like
twenty-cli before)
- deprecates twenty-cli
- simplify app init command base-project
- use `twenty-sdk:0.1.0` in base project
- move the "twenty-sdk/application" barrel to "twenty-sdk"
- add `create-twenty-app` package

<img width="1512" height="919" alt="image"
src="https://github.com/user-attachments/assets/007bef45-4e71-419a-9213-cebed376adbf"
/>

<img width="1506" height="929" alt="image"
src="https://github.com/user-attachments/assets/3de2fec6-1624-4923-ae13-f4e1cf165eb5"
/>
2025-12-01 11:44:35 +01:00
..

Twenty logo

Twenty SDK

NPM version License Join the community on Discord

A CLI and SDK to develop, build, and publish applications that extend Twenty CRM.

  • Typesafe client and workspace entity typings
  • Builtin CLI for auth, generate, dev sync, oneoff sync, and uninstall
  • Works great with the scaffolder: create-twenty-app

Prerequisites

Installation

npm install twenty-sdk
# or
yarn add twenty-sdk

Getting started

You can either scaffold a new app or add the SDK to an existing one.

  • Start new (recommended):
    npx create-twenty-app@latest my-twenty-app
    cd my-twenty-app
    
  • Existing project: install the SDK as shown above, then use the CLI below.

CLI quickstart

# Authenticate using your API key (CLI will prompt for it)
twenty auth login

# Add a new entity to your application (guided prompts)
twenty app add

# Generate a typed Twenty client and TypeScript definitions for your workspace entities
twenty app generate

# Start dev mode: automatically syncs changes to your workspace for instant testing
twenty app dev

# Onetime sync of local changes
twenty app sync

# Uninstall the application from the current workspace
twenty app uninstall

Usage (SDK)

// Example: import what you need from the SDK
import { /* your exports */ } from 'twenty-sdk';

Publish your application

Applications are currently stored in twenty/packages/twenty-apps.

You can share your application with all Twenty users:

# pull the Twenty project
git clone https://github.com/twentyhq/twenty.git
cd twenty

# create a new branch
git checkout -b feature/my-awesome-app
git commit -m "Add new application"
git push

Our team reviews contributions for quality, security, and reusability.

Troubleshooting

  • Auth errors: run twenty auth login again and ensure the API key has the required permissions.
  • Typings out of date: run twenty app generate to refresh the client and types.
  • Not seeing changes in dev: make sure dev mode is running (twenty app dev).

Contributing