Files
twenty/packages/twenty-sdk
Marie cdabef6429 fix(sdk): report the connected server's real version in dev version check (#22670)
## Summary

The `yarn twenty app dev` version row was reading the "local server"
version from the `twenty-app-dev` Docker container's baked-in
`APP_VERSION` env var. When the CLI is actually pointed at a separately
running instance (or a stale `twenty-app-dev` container is lying
around), this reported a version unrelated to the server serving
requests — e.g. showing `Server v2.5.3` and a bogus "days behind"
warning while the real instance was on `2.16.1`.

This changes the version resolution to ask the server the CLI is
connected to for its real version over HTTP, falling back to Docker
inspection only when the server can't be reached.

- Add `getServerVersionFromApi`, which reads the version from the
public, no-auth `/.well-known/mcp/server-card.json` endpoint (its
`version` is the server's `APP_VERSION`). Returns `null` gracefully on
timeout, non-OK responses, or missing/`0.0.0`/non-semver values.
- `getVersionInfo` now uses `getServerVersionFromApi() ??
getLocalServerVersion(containerName)`, running the API call in parallel
with the Docker Hub published-versions fetch. All downstream logic
(`isMinorOrMajorBehind`, `daysBehind`, the dev UI row, and the headless
warning) now operates on the real version.
2026-07-09 10:24:35 +02:00
..
2026-03-09 15:32:13 +00: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.

Quick start

The recommended way to start is with create-twenty-app:

npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
yarn twenty dev

Documentation

Full documentation is available at docs.twenty.com/developers/extend/apps:

  • Getting Started — scaffolding, local server, authentication, dev mode
  • Building Apps — entity definitions, API clients, testing, CLI reference
  • Publishing — deploy, npm publish, marketplace

Guides in this repository:

Manual installation

If you are adding twenty-sdk to an existing project instead of using create-twenty-app:

yarn add twenty-sdk twenty-client-sdk

Then add a twenty script to your package.json:

{
  "scripts": {
    "twenty": "twenty"
  }
}

Run yarn twenty help to see all available commands.

Configuration

The CLI stores credentials per remote in ~/.twenty/config.json. Run yarn twenty remote:add to configure a remote, or yarn twenty remote:list to see existing ones.

Troubleshooting

  • Auth errors: run yarn twenty remote:add to re-authenticate.
  • Typings out of date: restart yarn twenty dev to refresh the client and types.
  • Not seeing changes in dev: make sure dev mode is running (yarn twenty dev).

Contributing

Development setup

git clone https://github.com/twentyhq/twenty.git
cd twenty
yarn install

Development mode

npx nx run twenty-sdk:dev

Production build

npx nx run twenty-sdk:build

Running the CLI locally

npx nx run twenty-sdk:start -- <command>

Resources