Files
twenty/packages/twenty-cli
Paul RastoinandGitHub 7c661f47fd e2e test environment fortwenty-cli (#15123)
# Introduction
Defining very first basis of the twenty-cli e2e testing env.
Dynamically generating tests cases based on a list of applications names
that will be matched to stored twenty-apps and run install delete and
reinstall with their configuration on the same instance

We could use a glob pattern with a specific e2e configuration in every
apps but right now overkill

## Notes
- We should define typescript path aliasing to ease import devxp
- parse the config using a zod object

## Some vision on test granularity
Right now we only check that the server sent back success or failure on
below operation. In the future the synchronize will return a report of
what has been installed per entity exactly. We will be able to snapshot
everything in order to detect regressions

We should also be testing the cli directly for init and other stuff in
the end, we could get some inspiration from what's done in preconstruct
e2e tests with an on heap virtual file system

## Conclusion
Any suggestions are more than welcomed !
close https://github.com/twentyhq/core-team-issues/issues/1721
2025-10-16 12:43:43 +00:00
..
2025-10-02 22:50:37 +02:00

Why Twenty CLI?

A command-line interface to easily scaffold, develop, and publish applications that extend Twenty CRM

Installation

npm install -g twenty-cli

Requirements

  • yarn >= 4.9.2
  • an apiKey. Go to https://twenty.com/settings/api-webhooks to generate one

Quick example project

# Authenticate using your apiKey (CLI will prompt for your <apiKey>)
twenty auth login

# Init a new application called hello-world
twenty app init hello-world

# Go to your app
cd hello-world

# Add a serverless function to your application
twenty app add serverlessFunction

# Add a trigger to your serverless function
twenty app add trigger

# Add axios to your application
yarn add axios

# Start dev mode: automatically syncs changes to your Twenty workspace, so you can test new functions/objects instantly.
twenty app dev

# Or use one time sync
twenty app sync

# List all available commands
twenty help

Application Structure

Each application in this package follows the standard application structure:

app-name/
├── package.json
├── README.md
├── serverlessFunctions  # Custom backend logic (runs on demand)
└── ...

Publish your application

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

You can share your application with all twenty users.

# pull 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 before merging.

Contributing