buildx-cli 1.8.19 → 1.8.20

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,65 @@ 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
+ ### New Project Maintenance
266
+
267
+ After `project:init`, use these commands to maintain local/remote artifact parity:
268
+
269
+ ```bash
270
+ # schema lifecycle
271
+ npx buildx-cli schema:pull --project-id <project-id>
272
+ npx buildx-cli schema:diff --project-id <project-id>
273
+ npx buildx-cli schema:push --project-id <project-id> --dry-run
274
+
275
+ # function lifecycle
276
+ npx buildx-cli function:pull --project-id <project-id>
277
+ npx buildx-cli function:diff --project-id <project-id>
278
+ npx buildx-cli function:push --project-id <project-id> --dry-run
279
+ ```
280
+
222
281
  ### Users
223
282
 
224
283
  #### `user:list`
package/dist/README.md CHANGED
@@ -219,6 +219,65 @@ 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
+ ### New Project Maintenance
266
+
267
+ After `project:init`, use these commands to maintain local/remote artifact parity:
268
+
269
+ ```bash
270
+ # schema lifecycle
271
+ npx buildx-cli schema:pull --project-id <project-id>
272
+ npx buildx-cli schema:diff --project-id <project-id>
273
+ npx buildx-cli schema:push --project-id <project-id> --dry-run
274
+
275
+ # function lifecycle
276
+ npx buildx-cli function:pull --project-id <project-id>
277
+ npx buildx-cli function:diff --project-id <project-id>
278
+ npx buildx-cli function:push --project-id <project-id> --dry-run
279
+ ```
280
+
222
281
  ### Users
223
282
 
224
283
  #### `user:list`