buildx-cli 1.8.19 → 1.8.21

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
@@ -219,6 +219,71 @@ Validate locale format before saving.
219
219
  npx buildx-cli projects:locale:validate --default-language en-US --timezone UTC
220
220
  ```
221
221
 
222
+ #### `project:init`
223
+ Initialize a new Buildx project and optional app scaffold.
224
+
225
+ Modes:
226
+ - `plain`: creates standalone project via `POST /projects`.
227
+ - `product`: tries `POST /product/:product_key/projects`, then falls back to `plain` when product creation is denied (for example non-root auth).
228
+
229
+ Key options:
230
+ - `--project-id <id>`: target project ID (required)
231
+ - `--name <name>`: project name (required)
232
+ - `--description <text>`: project description (optional)
233
+ - `--product-key <key>`: enable product mode first, with fallback to plain mode
234
+ - `--app <none|next|expo|react>`: app scaffold target (default `none`)
235
+ - `--react-stack <vite|next|expo-web>`: required when `--app react`
236
+ - `--out-dir <path>`: output workspace directory (default `./<project-id>`)
237
+ - `--overwrite`: allow writing into non-empty output directory
238
+ - `--dry-run`: compute output without writing files or calling APIs
239
+ - `--json`: print machine-readable result
240
+
241
+ Examples:
242
+
243
+ ```bash
244
+ # backend only (plain mode)
245
+ npx buildx-cli project:init --project-id hello-world --name "Hello World"
246
+
247
+ # product mode first, fallback to plain when not allowed
248
+ npx buildx-cli project:init --project-id hello-world --name "Hello World" --product-key approval
249
+
250
+ # backend + Next.js app
251
+ npx buildx-cli project:init --project-id hello-world --name "Hello World" --app next
252
+
253
+ # backend + Expo app
254
+ npx buildx-cli project:init --project-id hello-world --name "Hello World" --app expo
255
+ ```
256
+
257
+ Generated auth-aware structure:
258
+ - Next.js template uses route groups for separation:
259
+ - `app/(public)/...` (sign-in/sign-up/forgot-password)
260
+ - `app/(private)/...` (protected dashboard)
261
+ - Expo template uses auth-state route split in `App.tsx`:
262
+ - public screen tree for unauthenticated users
263
+ - private screen tree for authenticated users
264
+
265
+ UI package dependency resolution:
266
+ - generated apps depend on package from env `BUILDX_UI_PACKS_PACKAGE`
267
+ - default package name is `buildx-react-ui-packs`
268
+ - set a scoped package before seeding when unscoped npm name is unavailable:
269
+ - `BUILDX_UI_PACKS_PACKAGE=@your-scope/buildx-react-ui-packs npx buildx-cli project:init ...`
270
+
271
+ ### New Project Maintenance
272
+
273
+ After `project:init`, use these commands to maintain local/remote artifact parity:
274
+
275
+ ```bash
276
+ # schema lifecycle
277
+ npx buildx-cli schema:pull --project-id <project-id>
278
+ npx buildx-cli schema:diff --project-id <project-id>
279
+ npx buildx-cli schema:push --project-id <project-id> --dry-run
280
+
281
+ # function lifecycle
282
+ npx buildx-cli function:pull --project-id <project-id>
283
+ npx buildx-cli function:diff --project-id <project-id>
284
+ npx buildx-cli function:push --project-id <project-id> --dry-run
285
+ ```
286
+
222
287
  ### Users
223
288
 
224
289
  #### `user:list`
package/dist/README.md CHANGED
@@ -219,6 +219,71 @@ Validate locale format before saving.
219
219
  npx buildx-cli projects:locale:validate --default-language en-US --timezone UTC
220
220
  ```
221
221
 
222
+ #### `project:init`
223
+ Initialize a new Buildx project and optional app scaffold.
224
+
225
+ Modes:
226
+ - `plain`: creates standalone project via `POST /projects`.
227
+ - `product`: tries `POST /product/:product_key/projects`, then falls back to `plain` when product creation is denied (for example non-root auth).
228
+
229
+ Key options:
230
+ - `--project-id <id>`: target project ID (required)
231
+ - `--name <name>`: project name (required)
232
+ - `--description <text>`: project description (optional)
233
+ - `--product-key <key>`: enable product mode first, with fallback to plain mode
234
+ - `--app <none|next|expo|react>`: app scaffold target (default `none`)
235
+ - `--react-stack <vite|next|expo-web>`: required when `--app react`
236
+ - `--out-dir <path>`: output workspace directory (default `./<project-id>`)
237
+ - `--overwrite`: allow writing into non-empty output directory
238
+ - `--dry-run`: compute output without writing files or calling APIs
239
+ - `--json`: print machine-readable result
240
+
241
+ Examples:
242
+
243
+ ```bash
244
+ # backend only (plain mode)
245
+ npx buildx-cli project:init --project-id hello-world --name "Hello World"
246
+
247
+ # product mode first, fallback to plain when not allowed
248
+ npx buildx-cli project:init --project-id hello-world --name "Hello World" --product-key approval
249
+
250
+ # backend + Next.js app
251
+ npx buildx-cli project:init --project-id hello-world --name "Hello World" --app next
252
+
253
+ # backend + Expo app
254
+ npx buildx-cli project:init --project-id hello-world --name "Hello World" --app expo
255
+ ```
256
+
257
+ Generated auth-aware structure:
258
+ - Next.js template uses route groups for separation:
259
+ - `app/(public)/...` (sign-in/sign-up/forgot-password)
260
+ - `app/(private)/...` (protected dashboard)
261
+ - Expo template uses auth-state route split in `App.tsx`:
262
+ - public screen tree for unauthenticated users
263
+ - private screen tree for authenticated users
264
+
265
+ UI package dependency resolution:
266
+ - generated apps depend on package from env `BUILDX_UI_PACKS_PACKAGE`
267
+ - default package name is `buildx-react-ui-packs`
268
+ - set a scoped package before seeding when unscoped npm name is unavailable:
269
+ - `BUILDX_UI_PACKS_PACKAGE=@your-scope/buildx-react-ui-packs npx buildx-cli project:init ...`
270
+
271
+ ### New Project Maintenance
272
+
273
+ After `project:init`, use these commands to maintain local/remote artifact parity:
274
+
275
+ ```bash
276
+ # schema lifecycle
277
+ npx buildx-cli schema:pull --project-id <project-id>
278
+ npx buildx-cli schema:diff --project-id <project-id>
279
+ npx buildx-cli schema:push --project-id <project-id> --dry-run
280
+
281
+ # function lifecycle
282
+ npx buildx-cli function:pull --project-id <project-id>
283
+ npx buildx-cli function:diff --project-id <project-id>
284
+ npx buildx-cli function:push --project-id <project-id> --dry-run
285
+ ```
286
+
222
287
  ### Users
223
288
 
224
289
  #### `user:list`