create-twenty-app 0.6.0-alpha → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -13
- package/dist/cli.cjs +122 -30
- package/dist/cli.mjs +2110 -1853
- package/dist/constants/base-application/LLMS.md +9 -0
- package/dist/constants/base-application/README.md +6 -3
- package/dist/create-app.command.d.ts +3 -1
- package/dist/types/scaffolding-options.d.ts +10 -0
- package/dist/utils/app-template.d.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Create Twenty App is the official scaffolding CLI for building apps on top of [Twenty CRM](https://twenty.com). It sets up a ready‑to‑run project that works seamlessly with the [twenty-sdk](https://www.npmjs.com/package/twenty-sdk).
|
|
16
16
|
|
|
17
17
|
- Zero‑config project bootstrap
|
|
18
|
-
- Preconfigured scripts for auth, dev mode (watch & sync),
|
|
18
|
+
- Preconfigured scripts for auth, dev mode (watch & sync), uninstall, and function management
|
|
19
19
|
- Strong TypeScript support and typed client generation
|
|
20
20
|
|
|
21
21
|
## Documentation
|
|
@@ -44,10 +44,8 @@ yarn twenty auth:login
|
|
|
44
44
|
# Add a new entity to your application (guided)
|
|
45
45
|
yarn twenty entity:add
|
|
46
46
|
|
|
47
|
-
# Generate a typed Twenty client and workspace entity types
|
|
48
|
-
yarn twenty app:generate
|
|
49
|
-
|
|
50
47
|
# Start dev mode: watches, builds, and syncs local changes to your workspace
|
|
48
|
+
# (also auto-generates a typed API client in node_modules/twenty-sdk/generated)
|
|
51
49
|
yarn twenty app:dev
|
|
52
50
|
|
|
53
51
|
# Watch your application's function logs
|
|
@@ -56,25 +54,67 @@ yarn twenty function:logs
|
|
|
56
54
|
# Execute a function with a JSON payload
|
|
57
55
|
yarn twenty function:execute -n my-function -p '{"key": "value"}'
|
|
58
56
|
|
|
57
|
+
# Execute the post-install function
|
|
58
|
+
yarn twenty function:execute --postInstall
|
|
59
|
+
|
|
59
60
|
# Uninstall the application from the current workspace
|
|
60
61
|
yarn twenty app:uninstall
|
|
61
62
|
```
|
|
62
63
|
|
|
64
|
+
## Scaffolding modes
|
|
65
|
+
|
|
66
|
+
Control which example files are included when creating a new app:
|
|
67
|
+
|
|
68
|
+
| Flag | Behavior |
|
|
69
|
+
|------|----------|
|
|
70
|
+
| `-e, --exhaustive` | **(default)** Creates all example files without prompting |
|
|
71
|
+
| `-m, --minimal` | Creates only core files (`application-config.ts` and `default-role.ts`) |
|
|
72
|
+
| `-i, --interactive` | Prompts you to select which examples to include |
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Default: all examples included
|
|
76
|
+
npx create-twenty-app@latest my-app
|
|
77
|
+
|
|
78
|
+
# Minimal: only core files
|
|
79
|
+
npx create-twenty-app@latest my-app -m
|
|
80
|
+
|
|
81
|
+
# Interactive: choose which examples to include
|
|
82
|
+
npx create-twenty-app@latest my-app -i
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
In interactive mode, you can pick from:
|
|
86
|
+
- **Example object** — a custom CRM object definition (`objects/example-object.ts`)
|
|
87
|
+
- **Example field** — a custom field on the example object (`fields/example-field.ts`)
|
|
88
|
+
- **Example logic function** — a server-side handler with HTTP trigger (`logic-functions/hello-world.ts`)
|
|
89
|
+
- **Example front component** — a React UI component (`front-components/hello-world.tsx`)
|
|
90
|
+
- **Example view** — a saved view for the example object (`views/example-view.ts`)
|
|
91
|
+
- **Example navigation menu item** — a sidebar link (`navigation-menu-items/example-navigation-menu-item.ts`)
|
|
92
|
+
- **Example skill** — an AI agent skill definition (`skills/example-skill.ts`)
|
|
93
|
+
|
|
63
94
|
## What gets scaffolded
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- TypeScript configuration
|
|
95
|
+
|
|
96
|
+
**Core files (always created):**
|
|
97
|
+
- `application-config.ts` — Application metadata configuration
|
|
98
|
+
- `roles/default-role.ts` — Default role for logic functions
|
|
99
|
+
- `logic-functions/post-install.ts` — Post-install logic function (runs after app installation)
|
|
100
|
+
- TypeScript configuration, ESLint, package.json, .gitignore
|
|
70
101
|
- A prewired `twenty` script that delegates to the `twenty` CLI from twenty-sdk
|
|
71
102
|
|
|
103
|
+
**Example files (controlled by scaffolding mode):**
|
|
104
|
+
- `objects/example-object.ts` — Example custom object with a text field
|
|
105
|
+
- `fields/example-field.ts` — Example standalone field extending the example object
|
|
106
|
+
- `logic-functions/hello-world.ts` — Example logic function with HTTP trigger
|
|
107
|
+
- `front-components/hello-world.tsx` — Example front component
|
|
108
|
+
- `views/example-view.ts` — Example saved view for the example object
|
|
109
|
+
- `navigation-menu-items/example-navigation-menu-item.ts` — Example sidebar navigation link
|
|
110
|
+
- `skills/example-skill.ts` — Example AI agent skill definition
|
|
111
|
+
|
|
72
112
|
## Next steps
|
|
73
113
|
- Run `yarn twenty help` to see all available commands.
|
|
74
114
|
- Use `yarn twenty auth:login` to authenticate with your Twenty workspace.
|
|
75
|
-
- Explore the generated project and add your first entity with `yarn twenty entity:add` (logic functions, front components, objects, roles).
|
|
115
|
+
- Explore the generated project and add your first entity with `yarn twenty entity:add` (logic functions, front components, objects, roles, views, navigation menu items, skills).
|
|
76
116
|
- Use `yarn twenty app:dev` while you iterate — it watches, builds, and syncs changes to your workspace in real time.
|
|
77
|
-
-
|
|
117
|
+
- Types are auto‑generated by `yarn twenty app:dev` and stored in `node_modules/twenty-sdk/generated`.
|
|
78
118
|
|
|
79
119
|
|
|
80
120
|
## Publish your application
|
|
@@ -103,7 +143,7 @@ Our team reviews contributions for quality, security, and reusability before mer
|
|
|
103
143
|
|
|
104
144
|
## Troubleshooting
|
|
105
145
|
- Auth prompts not appearing: run `yarn twenty auth:login` again and verify the API key permissions.
|
|
106
|
-
- Types not generated: ensure `yarn twenty app:
|
|
146
|
+
- Types not generated: ensure `yarn twenty app:dev` is running — it auto‑generates the typed client.
|
|
107
147
|
|
|
108
148
|
## Contributing
|
|
109
149
|
- See our [GitHub](https://github.com/twentyhq/twenty)
|