@creatorem/cli 1.0.4 → 1.0.5
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 +148 -0
- package/dist/cli.js +74992 -0
- package/dist/cli.js.map +1 -0
- package/package.json +1 -1
- package/src/shims/signal-exit.js +29 -6
package/README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Creatorem CLI
|
|
2
|
+
|
|
3
|
+
`@creatorem/cli` is the automation layer for shaping Creatorem projects fast.
|
|
4
|
+
|
|
5
|
+
It can:
|
|
6
|
+
- scaffold a full monorepo from template (`create`)
|
|
7
|
+
- add or edit a dashboard app (`create-dashboard`)
|
|
8
|
+
- add or edit a mobile app (`create-mobile`)
|
|
9
|
+
- strip unused features cleanly across app + repo scope
|
|
10
|
+
- generate SQL schema files from JSON (`generate-schemas`)
|
|
11
|
+
- generate a migration from schema folders (`generate-migration`)
|
|
12
|
+
|
|
13
|
+
## Why this CLI is powerful
|
|
14
|
+
|
|
15
|
+
- **Feature-driven architecture control**: keep only the modules you want.
|
|
16
|
+
- **Deep cleanup**: not just UI toggles; removes imports, routes, config, files, package deps, and (optionally) repo-level kit/supabase assets.
|
|
17
|
+
- **Template auto-selection**: automatically uses premium template when access exists, otherwise OSS.
|
|
18
|
+
- **Multi-app orchestration**: in one flow you can decide marketing/dashboard/mobile/example composition.
|
|
19
|
+
- **Language bootstrap**: manages locales and language config files.
|
|
20
|
+
- **Machine-readable metadata**: writes selection manifests to `.creatorem/`.
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
creatorem create
|
|
26
|
+
creatorem create-dashboard <name>
|
|
27
|
+
creatorem create-mobile <name>
|
|
28
|
+
creatorem generate-schemas [input] [output]
|
|
29
|
+
creatorem generate-migration
|
|
30
|
+
creatorem help
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Key options
|
|
34
|
+
|
|
35
|
+
These are primarily relevant for `create-dashboard` and `create-mobile`:
|
|
36
|
+
|
|
37
|
+
- `--features <comma-separated-keys>`: keep only these feature keys
|
|
38
|
+
- `--edit`: edit the current app in place (inside existing monorepo)
|
|
39
|
+
- `--repo-scope`: also remove repo-level feature assets (`kit/*`, supabase schemas, workspace deps)
|
|
40
|
+
|
|
41
|
+
Examples:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
creatorem create-dashboard my-dashboard --features ai,keybindings
|
|
45
|
+
creatorem create-dashboard --edit --features ai,analytics,monitoring --repo-scope
|
|
46
|
+
creatorem create-mobile my-mobile --features organization,onboarding
|
|
47
|
+
creatorem create-mobile --edit --features notification --repo-scope
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Selectable features
|
|
51
|
+
|
|
52
|
+
### Dashboard (`create-dashboard`)
|
|
53
|
+
|
|
54
|
+
Feature keys accepted by `--features`:
|
|
55
|
+
|
|
56
|
+
- `organization`
|
|
57
|
+
- `keybindings`
|
|
58
|
+
- `analytics`
|
|
59
|
+
- `monitoring`
|
|
60
|
+
- `ai`
|
|
61
|
+
- `notification`
|
|
62
|
+
- `billing`
|
|
63
|
+
- `content-type`
|
|
64
|
+
- `onboarding`
|
|
65
|
+
- `email-templates`
|
|
66
|
+
- `emailer`
|
|
67
|
+
|
|
68
|
+
What each feature includes:
|
|
69
|
+
|
|
70
|
+
- `organization`: org/member/role management and org-aware hooks/components
|
|
71
|
+
- `keybindings`: keyboard shortcut model + settings UI + hooks
|
|
72
|
+
- `analytics`: Google Analytics / Umami integration
|
|
73
|
+
- `monitoring`: Sentry instrumentation integration
|
|
74
|
+
- `ai`: AI chat UI, tools integration, usage/wallet tracking
|
|
75
|
+
- `notification`: notification UI + DB router integration
|
|
76
|
+
- `billing`: Stripe/Lemon Squeezy + billing settings + wallet/subscription flows
|
|
77
|
+
- `content-type`: premade table-oriented UI + command/search helpers
|
|
78
|
+
- `onboarding`: post-signup onboarding flow
|
|
79
|
+
- `email-templates`: React Email templates module
|
|
80
|
+
- `emailer`: transactional email providers (Nodemailer, Postmark, Resend, Sendgrid)
|
|
81
|
+
|
|
82
|
+
### Mobile (`create-mobile`)
|
|
83
|
+
|
|
84
|
+
Feature keys accepted by `--features`:
|
|
85
|
+
|
|
86
|
+
- `organization`
|
|
87
|
+
- `notification`
|
|
88
|
+
- `onboarding`
|
|
89
|
+
|
|
90
|
+
What each feature includes:
|
|
91
|
+
|
|
92
|
+
- `organization`: org/member/role management + org hooks
|
|
93
|
+
- `notification`: mobile notification UI + related backend router wiring
|
|
94
|
+
- `onboarding`: post-signup onboarding flow for mobile
|
|
95
|
+
|
|
96
|
+
## Customization matrix
|
|
97
|
+
|
|
98
|
+
### `create` (full monorepo wizard)
|
|
99
|
+
|
|
100
|
+
You can customize:
|
|
101
|
+
- project name
|
|
102
|
+
- git initialization
|
|
103
|
+
- include/exclude apps: marketing, dashboard, mobile
|
|
104
|
+
- per-app feature sets (dashboard + mobile)
|
|
105
|
+
- include example apps (detected from template repo)
|
|
106
|
+
- language set:
|
|
107
|
+
- English always included
|
|
108
|
+
- French selectable by default
|
|
109
|
+
- extra custom language codes (comma-separated)
|
|
110
|
+
|
|
111
|
+
It also:
|
|
112
|
+
- updates locale directories from `en` templates
|
|
113
|
+
- updates `packages/shared/src/config/defined-languages.ts`
|
|
114
|
+
- updates mobile i18n config based on selected languages/features
|
|
115
|
+
- writes root manifest at `.creatorem/monorepo.json`
|
|
116
|
+
|
|
117
|
+
### `create-dashboard` / `create-mobile`
|
|
118
|
+
|
|
119
|
+
Modes:
|
|
120
|
+
- **inside existing monorepo**: copies from `apps/dashboard` or `apps/mobile`, or edits in place with `--edit`
|
|
121
|
+
- **outside monorepo**: clones template, keeps relevant apps, applies cleanup, and outputs a trimmed monorepo
|
|
122
|
+
|
|
123
|
+
Additional behavior:
|
|
124
|
+
- generates `.env.template` (and `.env` when appropriate) from app `envs.ts`
|
|
125
|
+
- writes app-level manifest `.creatorem/features.json`
|
|
126
|
+
- with `--repo-scope`, also removes repo-level feature assets and uninstalls related workspace dependencies
|
|
127
|
+
|
|
128
|
+
## SQL generators
|
|
129
|
+
|
|
130
|
+
### `generate-schemas`
|
|
131
|
+
|
|
132
|
+
- Input:
|
|
133
|
+
- JSON string, or
|
|
134
|
+
- path to `setup.json`, or
|
|
135
|
+
- directory containing `setup.json` (default: `.creatorem`)
|
|
136
|
+
- Output directory:
|
|
137
|
+
- default: `supabase/app-schemas`
|
|
138
|
+
- optional second arg for custom output path
|
|
139
|
+
- Also copies extra SQL files from `<inputDir>/schemas` when present
|
|
140
|
+
|
|
141
|
+
### `generate-migration`
|
|
142
|
+
|
|
143
|
+
- Combines SQL from:
|
|
144
|
+
- `supabase/schemas`
|
|
145
|
+
- `supabase/app-schemas`
|
|
146
|
+
- Produces:
|
|
147
|
+
- `supabase/migrations/<timestamp>_generated_from_schemas.sql`
|
|
148
|
+
- Replaces previous generated migration files with fresh output.
|