## Simplify `create-twenty-app` for zero-interaction use Makes `npx create-twenty-app@latest my-app` a fully non-interactive, single-command experience suitable for automated environments (Codex, Claude plugins). ### Changes - **Remove all interactive prompts** — app name, display name, description, and scaffold confirmation are now derived from CLI args with sensible defaults. `inquirer` dependency removed entirely. - **Replace OAuth with API key auth** — use the seeded dev API key (`DEV_API_KEY`) to authenticate against the Docker instance as `tim@apple.dev`, eliminating the browser-based OAuth flow. - **Docker-first with early validation** — check Docker is installed before scaffolding; if missing, print the install URL and exit. Detect alternative runtimes (Podman, nerdctl). - **Parallel image pull** — `docker pull` runs in the background during scaffold + dependency install, saving 10-30s on typical runs. - **Always pull latest image** — ensures the dev server is up-to-date on every run. - **Stop detecting port 3000** — only check port 2020 (Docker instance). - **Update CLI flags** — remove `--skip-local-instance` and `--yes`; add `--skip-docker`. - **Update CI workflows and docs** — align e2e workflows, package README, and template README/cd.yml with the new flow.
68 lines
3.6 KiB
Markdown
68 lines
3.6 KiB
Markdown
<div align="center">
|
|
<a href="https://twenty.com">
|
|
<picture>
|
|
<img alt="Twenty logo" src="https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-website-new/public/images/core/logo.svg" height="128">
|
|
</picture>
|
|
</a>
|
|
<h1>Create Twenty App</h1>
|
|
|
|
<a href="https://www.npmjs.com/package/create-twenty-app"><img alt="NPM version" src="https://img.shields.io/npm/v/create-twenty-app.svg?style=for-the-badge&labelColor=000000"></a>
|
|
<a href="https://github.com/twentyhq/twenty/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/npm/l/next.svg?style=for-the-badge&labelColor=000000"></a>
|
|
<a href="https://discord.gg/cx5n4Jzs57"><img alt="Join the community on Discord" src="https://img.shields.io/badge/Join%20the%20community-blueviolet.svg?style=for-the-badge&logo=Twenty&labelColor=000000&logoWidth=20"></a>
|
|
|
|
</div>
|
|
|
|
The official scaffolding CLI for building apps on top of [Twenty CRM](https://twenty.com). Sets up a ready-to-run project with [twenty-sdk](https://www.npmjs.com/package/twenty-sdk).
|
|
|
|
## Quick start
|
|
|
|
```bash
|
|
npx create-twenty-app@latest my-twenty-app
|
|
cd my-twenty-app
|
|
yarn twenty dev
|
|
```
|
|
|
|
The scaffolder will:
|
|
|
|
1. Create a new project with TypeScript, linting, tests, and a preconfigured `twenty` CLI
|
|
2. Start a local Twenty server via Docker (pulls the latest image automatically)
|
|
3. Authenticate with the development API key
|
|
|
|
## Options
|
|
|
|
| Flag | Description |
|
|
| ---------------------------------- | --------------------------------------------------------------------- |
|
|
| `--example <name>` | Initialize from an example |
|
|
| `--name <name>` | Set the app name |
|
|
| `--display-name <displayName>` | Set the display name |
|
|
| `--description <description>` | Set the description |
|
|
| `--api-url <url>` | Twenty instance URL (default: `http://localhost:2020`) |
|
|
| `--authentication-method <method>` | `oauth` or `apiKey` (default: `apiKey` for local, `oauth` for remote) |
|
|
|
|
By default (no flags), a minimal app is generated with core files and an integration test. Use `--example` to start from a richer example:
|
|
|
|
```bash
|
|
npx create-twenty-app@latest my-twenty-app --example hello-world
|
|
```
|
|
|
|
Examples are sourced from [twentyhq/twenty/packages/twenty-apps/examples](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/examples).
|
|
|
|
## Documentation
|
|
|
|
Full documentation is available at **[docs.twenty.com/developers/extend/apps](https://docs.twenty.com/developers/extend/apps/getting-started/quick-start)**:
|
|
|
|
- [Quick Start](https://docs.twenty.com/developers/extend/apps/getting-started/quick-start) — scaffold, run a local server, sync your code
|
|
- [Concepts](https://docs.twenty.com/developers/extend/apps/getting-started/concepts) — how apps work: entity model, sandboxing, lifecycle
|
|
- [Operations](https://docs.twenty.com/developers/extend/apps/operations/overview) — CLI, testing, CI, deploy and publish
|
|
|
|
## Troubleshooting
|
|
|
|
- Server not starting: check Docker is running (`docker info`), then try `yarn twenty server logs`.
|
|
- Auth not working: run `yarn twenty remote add --local` to re-authenticate.
|
|
- Types not generated: ensure `yarn twenty dev` is running — it auto-generates the typed client.
|
|
|
|
## Contributing
|
|
|
|
- See our [GitHub](https://github.com/twentyhq/twenty)
|
|
- Join our [Discord](https://discord.gg/cx5n4Jzs57)
|