create-twenty-app 0.3.1 → 0.4.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 CHANGED
@@ -15,9 +15,12 @@
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, generate, dev sync, one‑off sync, uninstall
18
+ - Preconfigured scripts for auth, dev mode (watch & sync), generate, uninstall, and function management
19
19
  - Strong TypeScript support and typed client generation
20
20
 
21
+ ## Documentation
22
+ See Twenty application documentation https://docs.twenty.com/developers/extend/capabilities/apps
23
+
21
24
  ## Prerequisites
22
25
  - Node.js 24+ (recommended) and Yarn 4
23
26
  - A Twenty workspace and an API key (create one at https://app.twenty.com/settings/api-webhooks)
@@ -28,41 +31,49 @@ Create Twenty App is the official scaffolding CLI for building apps on top of [T
28
31
  npx create-twenty-app@latest my-twenty-app
29
32
  cd my-twenty-app
30
33
 
34
+ # If you don't use yarn@4
35
+ corepack enable
36
+ yarn install
37
+
38
+ # Get help
39
+ yarn run help
40
+
31
41
  # Authenticate using your API key (you'll be prompted)
32
- yarn auth
42
+ yarn auth:login
33
43
 
34
44
  # Add a new entity to your application (guided)
35
- yarn create-entity
45
+ yarn entity:add
36
46
 
37
47
  # Generate a typed Twenty client and workspace entity types
38
- yarn generate
48
+ yarn app:generate
39
49
 
40
- # Start dev mode: automatically syncs local changes to your workspace
41
- yarn dev
50
+ # Start dev mode: watches, builds, and syncs local changes to your workspace
51
+ yarn app:dev
42
52
 
43
- # Or run a one‑time sync
44
- yarn sync
53
+ # Watch your application's function logs
54
+ yarn function:logs
45
55
 
46
- # Watch your application's functions logs
47
- yarn logs
56
+ # Execute a function with a JSON payload
57
+ yarn function:execute -n my-function -p '{"key": "value"}'
48
58
 
49
59
  # Uninstall the application from the current workspace
50
- yarn uninstall
51
-
52
- # Display commands' help
53
- yarn help
60
+ yarn app:uninstall
54
61
  ```
55
62
 
56
63
  ## What gets scaffolded
57
- - A minimal app structure ready for Twenty
64
+ - A minimal app structure ready for Twenty with example files:
65
+ - `application-config.ts` - Application metadata configuration
66
+ - `roles/default-role.ts` - Default role for logic functions
67
+ - `logic-functions/hello-world.ts` - Example logic function with HTTP trigger
68
+ - `front-components/hello-world.tsx` - Example front component
58
69
  - TypeScript configuration
59
70
  - Prewired scripts that wrap the `twenty` CLI from twenty-sdk
60
- - Example placeholders to help you add entities, actions, and sync logic
61
71
 
62
72
  ## Next steps
63
- - Explore the generated project and add your first entity with `yarn create-entity`.
64
- - Keep your types up‑to‑date using `yarn generate`.
65
- - Use `yarn dev` while you iterate to see changes instantly in your workspace.
73
+ - Use `yarn auth:login` to authenticate with your Twenty workspace.
74
+ - Explore the generated project and add your first entity with `yarn entity:add` (logic functions, front components, objects, roles).
75
+ - Use `yarn app:dev` while you iterate it watches, builds, and syncs changes to your workspace in real time.
76
+ - Keep your types up‑to‑date using `yarn app:generate`.
66
77
 
67
78
 
68
79
  ## Publish your application
@@ -90,8 +101,8 @@ git push
90
101
  Our team reviews contributions for quality, security, and reusability before merging.
91
102
 
92
103
  ## Troubleshooting
93
- - Auth prompts not appearing: run `yarn auth` again and verify the API key permissions.
94
- - Types not generated: ensure `yarn generate` runs without errors, then re‑start `yarn dev`.
104
+ - Auth prompts not appearing: run `yarn auth:login` again and verify the API key permissions.
105
+ - Types not generated: ensure `yarn app:generate` runs without errors, then re‑start `yarn app:dev`.
95
106
 
96
107
  ## Contributing
97
108
  - See our [GitHub](https://github.com/twentyhq/twenty)