buildx-cli 1.8.17 → 1.8.19
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 +196 -2
- package/dist/README.md +196 -2
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,6 +160,12 @@ Lists available projects for the authenticated account.
|
|
|
160
160
|
npx buildx-cli projects:list
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
+
Filter by product key (`project.product.key`):
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
npx buildx-cli projects:list --product-key approval
|
|
167
|
+
```
|
|
168
|
+
|
|
163
169
|
#### `projects:set-default <project-id>`
|
|
164
170
|
Sets default project used by commands when `--project-id` is not provided.
|
|
165
171
|
|
|
@@ -333,6 +339,7 @@ Behavior:
|
|
|
333
339
|
|
|
334
340
|
Key options:
|
|
335
341
|
- `-p, --project-id <id>`
|
|
342
|
+
- `--product-key <key>` push to all projects where `project.product.key` matches (cannot be used with `--project-id`)
|
|
336
343
|
- `-t, --target-dir <path>`
|
|
337
344
|
- `--collections-file <path>` (when no `--target-dir`)
|
|
338
345
|
- `--filter <pattern...>`
|
|
@@ -341,6 +348,7 @@ Key options:
|
|
|
341
348
|
|
|
342
349
|
```bash
|
|
343
350
|
npx buildx-cli schema:push --project-id hello-world --target-dir ./.sandbox/buildx-cli --dry-run
|
|
351
|
+
npx buildx-cli schema:push --product-key approval --target-dir ./.sandbox/buildx-cli --dry-run
|
|
344
352
|
```
|
|
345
353
|
|
|
346
354
|
#### `schema:types:convert`
|
|
@@ -478,6 +486,7 @@ Behavior:
|
|
|
478
486
|
|
|
479
487
|
Key options:
|
|
480
488
|
- `-p, --project-id <id>`
|
|
489
|
+
- `--product-key <key>` push to all projects where `project.product.key` matches (cannot be used with `--project-id`)
|
|
481
490
|
- `-t, --target-dir <path>`
|
|
482
491
|
- `--functions-dir <path>` (when no `--target-dir`)
|
|
483
492
|
- `-n, --name <function-name>` for a single function
|
|
@@ -489,6 +498,7 @@ Key options:
|
|
|
489
498
|
|
|
490
499
|
```bash
|
|
491
500
|
npx buildx-cli function:push --project-id hello-world --target-dir ./.sandbox/buildx-cli --dry-run
|
|
501
|
+
npx buildx-cli function:push --product-key approval --target-dir ./.sandbox/buildx-cli --dry-run
|
|
492
502
|
```
|
|
493
503
|
|
|
494
504
|
#### `function:list`
|
|
@@ -539,8 +549,8 @@ Key options:
|
|
|
539
549
|
npx buildx-cli function:revisions process-order --project-id hello-world
|
|
540
550
|
```
|
|
541
551
|
|
|
542
|
-
#### `function:publish <function-name>
|
|
543
|
-
Publishes a revision to
|
|
552
|
+
#### `function:publish <function-name> [revision]`
|
|
553
|
+
Publishes a revision to alias (default alias: `live`). If `revision` is omitted, CLI publishes the latest revision.
|
|
544
554
|
|
|
545
555
|
Key options:
|
|
546
556
|
- `-p, --project-id <id>`
|
|
@@ -548,10 +558,41 @@ Key options:
|
|
|
548
558
|
- `--alias <alias>` (default: `live`)
|
|
549
559
|
|
|
550
560
|
```bash
|
|
561
|
+
npx buildx-cli function:publish process-order --project-id hello-world
|
|
551
562
|
npx buildx-cli function:publish process-order r12 --project-id hello-world
|
|
552
563
|
npx buildx-cli function:publish process-order 12 --project-id hello-world --alias stable
|
|
553
564
|
```
|
|
554
565
|
|
|
566
|
+
Best practices:
|
|
567
|
+
- Use aliases as stable pointers for environments/traffic, not raw revision numbers in app code.
|
|
568
|
+
- Revision identifier is system-managed (`r1`, `r2`, ...). You cannot set revision id manually.
|
|
569
|
+
- If you want deployment traceability by git commit, use git hash as an alias (for example: `a1b2c3d4` -> `r42`).
|
|
570
|
+
- Recommended alias convention:
|
|
571
|
+
- `live`: production traffic
|
|
572
|
+
- `stable`: last known good release
|
|
573
|
+
- `canary`: limited rollout / verification
|
|
574
|
+
- Typical release flow:
|
|
575
|
+
1. Save function in Studio/CLI (creates new revision automatically)
|
|
576
|
+
2. Validate with `function:invoke --revision rN`
|
|
577
|
+
3. Promote by alias: `function:alias:set <fn> canary rN`
|
|
578
|
+
4. Promote to production: `function:publish <fn> rN --alias live`
|
|
579
|
+
5. Fast rollback: `function:alias:set <fn> live <previous-revision>`
|
|
580
|
+
- For routine publish operations, run `function:publish <fn>` without revision to move the latest revision to `live`.
|
|
581
|
+
- Keep revision IDs immutable and treat alias changes as deployment events (track in release notes/ops logs).
|
|
582
|
+
- Use `function:revisions <fn>` to list revision id, checksum (short), and alias mapping in one place.
|
|
583
|
+
|
|
584
|
+
Git-hash alias example:
|
|
585
|
+
```bash
|
|
586
|
+
# Point alias named by git hash to a revision
|
|
587
|
+
npx buildx-cli function:alias:set process-order a1b2c3d4 r42 --project-id hello-world
|
|
588
|
+
|
|
589
|
+
# Publish latest revision to a git-hash alias
|
|
590
|
+
npx buildx-cli function:publish process-order --project-id hello-world --alias a1b2c3d4
|
|
591
|
+
|
|
592
|
+
# Inspect mapping + checksum
|
|
593
|
+
npx buildx-cli function:revisions process-order --project-id hello-world
|
|
594
|
+
```
|
|
595
|
+
|
|
555
596
|
#### `function:alias:set <function-name> <alias> <revision>`
|
|
556
597
|
Sets alias pointer directly to a revision.
|
|
557
598
|
|
|
@@ -638,6 +679,159 @@ The CLI interacts with the following API endpoints:
|
|
|
638
679
|
- `GET /project/:project_id/functions` - List functions
|
|
639
680
|
- `GET /project/:project_id/functions/:function_name` - Fetch function source
|
|
640
681
|
- `POST /project/:project_id/functions/:function_name` - Upsert function source
|
|
682
|
+
- `GET /project/:project_id/functions/:function_name/revisions` - List function revisions
|
|
683
|
+
- `POST /project/:project_id/functions/:function_name/revisions/:revision/publish` - Publish function revision
|
|
684
|
+
- `PUT /project/:project_id/functions/:function_name/aliases/:alias` - Update function alias
|
|
685
|
+
- `POST /project/:project_id/functions/run/:function_name` - Invoke function
|
|
686
|
+
|
|
687
|
+
## CLI Output Formats (All Commands)
|
|
688
|
+
|
|
689
|
+
Detailed command-by-command examples (normal + `--json`): see [OUTPUT_EXAMPLES.md](./OUTPUT_EXAMPLES.md).
|
|
690
|
+
|
|
691
|
+
General rules:
|
|
692
|
+
- Success output is human-readable by default unless command has explicit JSON mode.
|
|
693
|
+
- Error output is plain text: `Error: <message>` and exits non-zero.
|
|
694
|
+
- Commands with `--json` print JSON to stdout for automation.
|
|
695
|
+
- Commands that return documents (`data:list/get/create/update/delete`) are already JSON by default.
|
|
696
|
+
|
|
697
|
+
### Authentication
|
|
698
|
+
- `auth:login`:
|
|
699
|
+
- default: human-readable status lines
|
|
700
|
+
- `--json`: `{ success, method, username, tokenMasked, expiresAt }`
|
|
701
|
+
- `auth:logout`:
|
|
702
|
+
- default: human-readable confirmation
|
|
703
|
+
- `--json`: `{ success, authenticated }`
|
|
704
|
+
- `auth:status`:
|
|
705
|
+
- default: human-readable session summary
|
|
706
|
+
- `--json`: `{ success, authenticated, user?, tokenMasked?, expiresAt? }`
|
|
707
|
+
|
|
708
|
+
### Projects
|
|
709
|
+
- `projects:list`:
|
|
710
|
+
- default: human-readable list
|
|
711
|
+
- `--json`: `{ success, projects[], total, defaultProjectId }`
|
|
712
|
+
- `projects:set-default`:
|
|
713
|
+
- default: human-readable confirmation
|
|
714
|
+
- `--json`: `{ success, defaultProjectId, project }`
|
|
715
|
+
- `projects:current`:
|
|
716
|
+
- default: human-readable summary
|
|
717
|
+
- `--json`: `{ success, defaultProject }`
|
|
718
|
+
- `projects:metadata:get`: prints pretty JSON for selected metadata path.
|
|
719
|
+
- `--output <file>` writes JSON file and prints success line.
|
|
720
|
+
- `projects:metadata:update`:
|
|
721
|
+
- default: human-readable summary (`default_language`, `timezone`, key count)
|
|
722
|
+
- `--json`: updated project payload JSON
|
|
723
|
+
- `--dry-run`: payload JSON only
|
|
724
|
+
- `projects:locale:validate`: success line + JSON validation result.
|
|
725
|
+
|
|
726
|
+
### Configuration
|
|
727
|
+
- `config:setup`:
|
|
728
|
+
- default: interactive + human-readable summary
|
|
729
|
+
- `--json`: `{ success, api: { endpoint, apiKeyMasked } }`
|
|
730
|
+
- `config:show`:
|
|
731
|
+
- default: human-readable configuration report
|
|
732
|
+
- `--json`: structured config payload (`api`, `auth`, `projects`, `sync`, `configPath`, `envSources`)
|
|
733
|
+
- `config:clear`:
|
|
734
|
+
- default: human-readable confirmation
|
|
735
|
+
- `--json`: `{ success, cleared }`
|
|
736
|
+
|
|
737
|
+
### Users
|
|
738
|
+
- `user:list`:
|
|
739
|
+
- default: tab-separated table (`id`, `username`, `name`, `email`) + total
|
|
740
|
+
- `--json`: raw users array JSON
|
|
741
|
+
- `user:create`:
|
|
742
|
+
- default: human-readable confirmation
|
|
743
|
+
- `--json`: created user JSON
|
|
744
|
+
|
|
745
|
+
### Schema
|
|
746
|
+
- `schema:pull` / `schema:sync`:
|
|
747
|
+
- default: file write summary
|
|
748
|
+
- `--dry-run`: file preview blocks (JSON/text)
|
|
749
|
+
- `--json`: `{ success, command, project_id, output, dryRun }`
|
|
750
|
+
- `schema:push`:
|
|
751
|
+
- default: per-collection lines + `pushed/skipped` summary
|
|
752
|
+
- `--json`: `{ success, pushed, skipped, results[] }`
|
|
753
|
+
- `schema:list`:
|
|
754
|
+
- default: one `collection_id` per line + total
|
|
755
|
+
- `--json`: `{ success, total, collections[] }`
|
|
756
|
+
- `schema:diff` markers:
|
|
757
|
+
- `= same`
|
|
758
|
+
- `~ changed`
|
|
759
|
+
- `+ local-only`
|
|
760
|
+
- `- remote-only`
|
|
761
|
+
- `--json`: `{ success, summary, results[] }`
|
|
762
|
+
- `schema:types:convert`:
|
|
763
|
+
- default: conversion summary + output path
|
|
764
|
+
- `--dry-run`: generated JSON preview
|
|
765
|
+
- `--json`: `{ success, dryRun, output, collections_count, warnings[] }`
|
|
766
|
+
|
|
767
|
+
### Functions
|
|
768
|
+
- `function:pull` / `function:sync`:
|
|
769
|
+
- default: file write summary
|
|
770
|
+
- `--dry-run`: context/source/manifest preview blocks
|
|
771
|
+
- `--json`: `{ success, command, project_id, output, dryRun }`
|
|
772
|
+
- `function:push`:
|
|
773
|
+
- default: per-function lines + `pushed/skipped` summary
|
|
774
|
+
- `--dry-run`: would-push + manifest preview
|
|
775
|
+
- `--json`: `{ success, pushed, skipped, results[] }`
|
|
776
|
+
- `function:list`:
|
|
777
|
+
- default: one function name per line + total
|
|
778
|
+
- `--json`: `{ success, total, functions[] }`
|
|
779
|
+
- `function:logs`:
|
|
780
|
+
- default: `timestamp status message` lines + shown count
|
|
781
|
+
- `--json`: raw log rows JSON
|
|
782
|
+
- `function:diff` markers:
|
|
783
|
+
- `= same`
|
|
784
|
+
- `~ changed`
|
|
785
|
+
- `+ local-missing`
|
|
786
|
+
- `- remote-missing`
|
|
787
|
+
- `! remote-drift`
|
|
788
|
+
- `--json`: `{ success, summary, results[] }`
|
|
789
|
+
- `function:revisions`:
|
|
790
|
+
- default: one line per revision with
|
|
791
|
+
- live marker (`[live]`)
|
|
792
|
+
- `revision` + `revision_id`
|
|
793
|
+
- short checksum (`source_checksum` first 12 chars)
|
|
794
|
+
- `createdAt`
|
|
795
|
+
- alias mapping (`aliases=...`)
|
|
796
|
+
- `--json`: array entries with keys:
|
|
797
|
+
- `revision`
|
|
798
|
+
- `revision_id`
|
|
799
|
+
- `checksum`
|
|
800
|
+
- `createdAt`
|
|
801
|
+
- `live`
|
|
802
|
+
- `aliases`
|
|
803
|
+
- `function:publish`:
|
|
804
|
+
- default: confirmation + live revision + aliases object
|
|
805
|
+
- `[revision]` omitted => auto uses latest revision
|
|
806
|
+
- `--json`: `{ success, function, publishedRevision, alias, live_revision_id, aliases }`
|
|
807
|
+
- `function:alias:set`:
|
|
808
|
+
- default: confirmation line with alias target
|
|
809
|
+
- `--json`: `{ success, function, alias, revision, aliases }`
|
|
810
|
+
- `function:invoke`:
|
|
811
|
+
- object/array response: pretty JSON
|
|
812
|
+
- text response: plain text
|
|
813
|
+
- `--raw`: raw response output
|
|
814
|
+
|
|
815
|
+
### Data
|
|
816
|
+
- `data:list`: pretty JSON response.
|
|
817
|
+
- `data:get`: pretty JSON response.
|
|
818
|
+
- `data:create`: pretty JSON response.
|
|
819
|
+
- `data:update`: pretty JSON response.
|
|
820
|
+
- `data:delete`: pretty JSON response.
|
|
821
|
+
- `data:export`: writes JSON file + summary line.
|
|
822
|
+
- `--json`: `{ success, collection_id, project_id, count, output }`
|
|
823
|
+
- `data:import`:
|
|
824
|
+
- default: summary (`created`, `updated`)
|
|
825
|
+
- `--dry-run`: simulated summary lines
|
|
826
|
+
- `--json`: structured import result (`success`, `collection_id`, `project_id`, `mode`, `batch`, `dryRun`, `created`, `updated`, `match?`)
|
|
827
|
+
|
|
828
|
+
### Revision/Alias Definition (Important)
|
|
829
|
+
- Function revision is system-managed and immutable (`r1`, `r2`, ...).
|
|
830
|
+
- You cannot set custom revision id (for example git hash) as revision.
|
|
831
|
+
- If you need git-traceable deployment labels, use alias names as git hash values.
|
|
832
|
+
- Example:
|
|
833
|
+
- `function:alias:set process-order a1b2c3d4 r42`
|
|
834
|
+
- `function:revisions process-order` (to inspect mapping + checksum)
|
|
641
835
|
|
|
642
836
|
## Development
|
|
643
837
|
|
package/dist/README.md
CHANGED
|
@@ -160,6 +160,12 @@ Lists available projects for the authenticated account.
|
|
|
160
160
|
npx buildx-cli projects:list
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
+
Filter by product key (`project.product.key`):
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
npx buildx-cli projects:list --product-key approval
|
|
167
|
+
```
|
|
168
|
+
|
|
163
169
|
#### `projects:set-default <project-id>`
|
|
164
170
|
Sets default project used by commands when `--project-id` is not provided.
|
|
165
171
|
|
|
@@ -333,6 +339,7 @@ Behavior:
|
|
|
333
339
|
|
|
334
340
|
Key options:
|
|
335
341
|
- `-p, --project-id <id>`
|
|
342
|
+
- `--product-key <key>` push to all projects where `project.product.key` matches (cannot be used with `--project-id`)
|
|
336
343
|
- `-t, --target-dir <path>`
|
|
337
344
|
- `--collections-file <path>` (when no `--target-dir`)
|
|
338
345
|
- `--filter <pattern...>`
|
|
@@ -341,6 +348,7 @@ Key options:
|
|
|
341
348
|
|
|
342
349
|
```bash
|
|
343
350
|
npx buildx-cli schema:push --project-id hello-world --target-dir ./.sandbox/buildx-cli --dry-run
|
|
351
|
+
npx buildx-cli schema:push --product-key approval --target-dir ./.sandbox/buildx-cli --dry-run
|
|
344
352
|
```
|
|
345
353
|
|
|
346
354
|
#### `schema:types:convert`
|
|
@@ -478,6 +486,7 @@ Behavior:
|
|
|
478
486
|
|
|
479
487
|
Key options:
|
|
480
488
|
- `-p, --project-id <id>`
|
|
489
|
+
- `--product-key <key>` push to all projects where `project.product.key` matches (cannot be used with `--project-id`)
|
|
481
490
|
- `-t, --target-dir <path>`
|
|
482
491
|
- `--functions-dir <path>` (when no `--target-dir`)
|
|
483
492
|
- `-n, --name <function-name>` for a single function
|
|
@@ -489,6 +498,7 @@ Key options:
|
|
|
489
498
|
|
|
490
499
|
```bash
|
|
491
500
|
npx buildx-cli function:push --project-id hello-world --target-dir ./.sandbox/buildx-cli --dry-run
|
|
501
|
+
npx buildx-cli function:push --product-key approval --target-dir ./.sandbox/buildx-cli --dry-run
|
|
492
502
|
```
|
|
493
503
|
|
|
494
504
|
#### `function:list`
|
|
@@ -539,8 +549,8 @@ Key options:
|
|
|
539
549
|
npx buildx-cli function:revisions process-order --project-id hello-world
|
|
540
550
|
```
|
|
541
551
|
|
|
542
|
-
#### `function:publish <function-name>
|
|
543
|
-
Publishes a revision to
|
|
552
|
+
#### `function:publish <function-name> [revision]`
|
|
553
|
+
Publishes a revision to alias (default alias: `live`). If `revision` is omitted, CLI publishes the latest revision.
|
|
544
554
|
|
|
545
555
|
Key options:
|
|
546
556
|
- `-p, --project-id <id>`
|
|
@@ -548,10 +558,41 @@ Key options:
|
|
|
548
558
|
- `--alias <alias>` (default: `live`)
|
|
549
559
|
|
|
550
560
|
```bash
|
|
561
|
+
npx buildx-cli function:publish process-order --project-id hello-world
|
|
551
562
|
npx buildx-cli function:publish process-order r12 --project-id hello-world
|
|
552
563
|
npx buildx-cli function:publish process-order 12 --project-id hello-world --alias stable
|
|
553
564
|
```
|
|
554
565
|
|
|
566
|
+
Best practices:
|
|
567
|
+
- Use aliases as stable pointers for environments/traffic, not raw revision numbers in app code.
|
|
568
|
+
- Revision identifier is system-managed (`r1`, `r2`, ...). You cannot set revision id manually.
|
|
569
|
+
- If you want deployment traceability by git commit, use git hash as an alias (for example: `a1b2c3d4` -> `r42`).
|
|
570
|
+
- Recommended alias convention:
|
|
571
|
+
- `live`: production traffic
|
|
572
|
+
- `stable`: last known good release
|
|
573
|
+
- `canary`: limited rollout / verification
|
|
574
|
+
- Typical release flow:
|
|
575
|
+
1. Save function in Studio/CLI (creates new revision automatically)
|
|
576
|
+
2. Validate with `function:invoke --revision rN`
|
|
577
|
+
3. Promote by alias: `function:alias:set <fn> canary rN`
|
|
578
|
+
4. Promote to production: `function:publish <fn> rN --alias live`
|
|
579
|
+
5. Fast rollback: `function:alias:set <fn> live <previous-revision>`
|
|
580
|
+
- For routine publish operations, run `function:publish <fn>` without revision to move the latest revision to `live`.
|
|
581
|
+
- Keep revision IDs immutable and treat alias changes as deployment events (track in release notes/ops logs).
|
|
582
|
+
- Use `function:revisions <fn>` to list revision id, checksum (short), and alias mapping in one place.
|
|
583
|
+
|
|
584
|
+
Git-hash alias example:
|
|
585
|
+
```bash
|
|
586
|
+
# Point alias named by git hash to a revision
|
|
587
|
+
npx buildx-cli function:alias:set process-order a1b2c3d4 r42 --project-id hello-world
|
|
588
|
+
|
|
589
|
+
# Publish latest revision to a git-hash alias
|
|
590
|
+
npx buildx-cli function:publish process-order --project-id hello-world --alias a1b2c3d4
|
|
591
|
+
|
|
592
|
+
# Inspect mapping + checksum
|
|
593
|
+
npx buildx-cli function:revisions process-order --project-id hello-world
|
|
594
|
+
```
|
|
595
|
+
|
|
555
596
|
#### `function:alias:set <function-name> <alias> <revision>`
|
|
556
597
|
Sets alias pointer directly to a revision.
|
|
557
598
|
|
|
@@ -638,6 +679,159 @@ The CLI interacts with the following API endpoints:
|
|
|
638
679
|
- `GET /project/:project_id/functions` - List functions
|
|
639
680
|
- `GET /project/:project_id/functions/:function_name` - Fetch function source
|
|
640
681
|
- `POST /project/:project_id/functions/:function_name` - Upsert function source
|
|
682
|
+
- `GET /project/:project_id/functions/:function_name/revisions` - List function revisions
|
|
683
|
+
- `POST /project/:project_id/functions/:function_name/revisions/:revision/publish` - Publish function revision
|
|
684
|
+
- `PUT /project/:project_id/functions/:function_name/aliases/:alias` - Update function alias
|
|
685
|
+
- `POST /project/:project_id/functions/run/:function_name` - Invoke function
|
|
686
|
+
|
|
687
|
+
## CLI Output Formats (All Commands)
|
|
688
|
+
|
|
689
|
+
Detailed command-by-command examples (normal + `--json`): see [OUTPUT_EXAMPLES.md](./OUTPUT_EXAMPLES.md).
|
|
690
|
+
|
|
691
|
+
General rules:
|
|
692
|
+
- Success output is human-readable by default unless command has explicit JSON mode.
|
|
693
|
+
- Error output is plain text: `Error: <message>` and exits non-zero.
|
|
694
|
+
- Commands with `--json` print JSON to stdout for automation.
|
|
695
|
+
- Commands that return documents (`data:list/get/create/update/delete`) are already JSON by default.
|
|
696
|
+
|
|
697
|
+
### Authentication
|
|
698
|
+
- `auth:login`:
|
|
699
|
+
- default: human-readable status lines
|
|
700
|
+
- `--json`: `{ success, method, username, tokenMasked, expiresAt }`
|
|
701
|
+
- `auth:logout`:
|
|
702
|
+
- default: human-readable confirmation
|
|
703
|
+
- `--json`: `{ success, authenticated }`
|
|
704
|
+
- `auth:status`:
|
|
705
|
+
- default: human-readable session summary
|
|
706
|
+
- `--json`: `{ success, authenticated, user?, tokenMasked?, expiresAt? }`
|
|
707
|
+
|
|
708
|
+
### Projects
|
|
709
|
+
- `projects:list`:
|
|
710
|
+
- default: human-readable list
|
|
711
|
+
- `--json`: `{ success, projects[], total, defaultProjectId }`
|
|
712
|
+
- `projects:set-default`:
|
|
713
|
+
- default: human-readable confirmation
|
|
714
|
+
- `--json`: `{ success, defaultProjectId, project }`
|
|
715
|
+
- `projects:current`:
|
|
716
|
+
- default: human-readable summary
|
|
717
|
+
- `--json`: `{ success, defaultProject }`
|
|
718
|
+
- `projects:metadata:get`: prints pretty JSON for selected metadata path.
|
|
719
|
+
- `--output <file>` writes JSON file and prints success line.
|
|
720
|
+
- `projects:metadata:update`:
|
|
721
|
+
- default: human-readable summary (`default_language`, `timezone`, key count)
|
|
722
|
+
- `--json`: updated project payload JSON
|
|
723
|
+
- `--dry-run`: payload JSON only
|
|
724
|
+
- `projects:locale:validate`: success line + JSON validation result.
|
|
725
|
+
|
|
726
|
+
### Configuration
|
|
727
|
+
- `config:setup`:
|
|
728
|
+
- default: interactive + human-readable summary
|
|
729
|
+
- `--json`: `{ success, api: { endpoint, apiKeyMasked } }`
|
|
730
|
+
- `config:show`:
|
|
731
|
+
- default: human-readable configuration report
|
|
732
|
+
- `--json`: structured config payload (`api`, `auth`, `projects`, `sync`, `configPath`, `envSources`)
|
|
733
|
+
- `config:clear`:
|
|
734
|
+
- default: human-readable confirmation
|
|
735
|
+
- `--json`: `{ success, cleared }`
|
|
736
|
+
|
|
737
|
+
### Users
|
|
738
|
+
- `user:list`:
|
|
739
|
+
- default: tab-separated table (`id`, `username`, `name`, `email`) + total
|
|
740
|
+
- `--json`: raw users array JSON
|
|
741
|
+
- `user:create`:
|
|
742
|
+
- default: human-readable confirmation
|
|
743
|
+
- `--json`: created user JSON
|
|
744
|
+
|
|
745
|
+
### Schema
|
|
746
|
+
- `schema:pull` / `schema:sync`:
|
|
747
|
+
- default: file write summary
|
|
748
|
+
- `--dry-run`: file preview blocks (JSON/text)
|
|
749
|
+
- `--json`: `{ success, command, project_id, output, dryRun }`
|
|
750
|
+
- `schema:push`:
|
|
751
|
+
- default: per-collection lines + `pushed/skipped` summary
|
|
752
|
+
- `--json`: `{ success, pushed, skipped, results[] }`
|
|
753
|
+
- `schema:list`:
|
|
754
|
+
- default: one `collection_id` per line + total
|
|
755
|
+
- `--json`: `{ success, total, collections[] }`
|
|
756
|
+
- `schema:diff` markers:
|
|
757
|
+
- `= same`
|
|
758
|
+
- `~ changed`
|
|
759
|
+
- `+ local-only`
|
|
760
|
+
- `- remote-only`
|
|
761
|
+
- `--json`: `{ success, summary, results[] }`
|
|
762
|
+
- `schema:types:convert`:
|
|
763
|
+
- default: conversion summary + output path
|
|
764
|
+
- `--dry-run`: generated JSON preview
|
|
765
|
+
- `--json`: `{ success, dryRun, output, collections_count, warnings[] }`
|
|
766
|
+
|
|
767
|
+
### Functions
|
|
768
|
+
- `function:pull` / `function:sync`:
|
|
769
|
+
- default: file write summary
|
|
770
|
+
- `--dry-run`: context/source/manifest preview blocks
|
|
771
|
+
- `--json`: `{ success, command, project_id, output, dryRun }`
|
|
772
|
+
- `function:push`:
|
|
773
|
+
- default: per-function lines + `pushed/skipped` summary
|
|
774
|
+
- `--dry-run`: would-push + manifest preview
|
|
775
|
+
- `--json`: `{ success, pushed, skipped, results[] }`
|
|
776
|
+
- `function:list`:
|
|
777
|
+
- default: one function name per line + total
|
|
778
|
+
- `--json`: `{ success, total, functions[] }`
|
|
779
|
+
- `function:logs`:
|
|
780
|
+
- default: `timestamp status message` lines + shown count
|
|
781
|
+
- `--json`: raw log rows JSON
|
|
782
|
+
- `function:diff` markers:
|
|
783
|
+
- `= same`
|
|
784
|
+
- `~ changed`
|
|
785
|
+
- `+ local-missing`
|
|
786
|
+
- `- remote-missing`
|
|
787
|
+
- `! remote-drift`
|
|
788
|
+
- `--json`: `{ success, summary, results[] }`
|
|
789
|
+
- `function:revisions`:
|
|
790
|
+
- default: one line per revision with
|
|
791
|
+
- live marker (`[live]`)
|
|
792
|
+
- `revision` + `revision_id`
|
|
793
|
+
- short checksum (`source_checksum` first 12 chars)
|
|
794
|
+
- `createdAt`
|
|
795
|
+
- alias mapping (`aliases=...`)
|
|
796
|
+
- `--json`: array entries with keys:
|
|
797
|
+
- `revision`
|
|
798
|
+
- `revision_id`
|
|
799
|
+
- `checksum`
|
|
800
|
+
- `createdAt`
|
|
801
|
+
- `live`
|
|
802
|
+
- `aliases`
|
|
803
|
+
- `function:publish`:
|
|
804
|
+
- default: confirmation + live revision + aliases object
|
|
805
|
+
- `[revision]` omitted => auto uses latest revision
|
|
806
|
+
- `--json`: `{ success, function, publishedRevision, alias, live_revision_id, aliases }`
|
|
807
|
+
- `function:alias:set`:
|
|
808
|
+
- default: confirmation line with alias target
|
|
809
|
+
- `--json`: `{ success, function, alias, revision, aliases }`
|
|
810
|
+
- `function:invoke`:
|
|
811
|
+
- object/array response: pretty JSON
|
|
812
|
+
- text response: plain text
|
|
813
|
+
- `--raw`: raw response output
|
|
814
|
+
|
|
815
|
+
### Data
|
|
816
|
+
- `data:list`: pretty JSON response.
|
|
817
|
+
- `data:get`: pretty JSON response.
|
|
818
|
+
- `data:create`: pretty JSON response.
|
|
819
|
+
- `data:update`: pretty JSON response.
|
|
820
|
+
- `data:delete`: pretty JSON response.
|
|
821
|
+
- `data:export`: writes JSON file + summary line.
|
|
822
|
+
- `--json`: `{ success, collection_id, project_id, count, output }`
|
|
823
|
+
- `data:import`:
|
|
824
|
+
- default: summary (`created`, `updated`)
|
|
825
|
+
- `--dry-run`: simulated summary lines
|
|
826
|
+
- `--json`: structured import result (`success`, `collection_id`, `project_id`, `mode`, `batch`, `dryRun`, `created`, `updated`, `match?`)
|
|
827
|
+
|
|
828
|
+
### Revision/Alias Definition (Important)
|
|
829
|
+
- Function revision is system-managed and immutable (`r1`, `r2`, ...).
|
|
830
|
+
- You cannot set custom revision id (for example git hash) as revision.
|
|
831
|
+
- If you need git-traceable deployment labels, use alias names as git hash values.
|
|
832
|
+
- Example:
|
|
833
|
+
- `function:alias:set process-order a1b2c3d4 r42`
|
|
834
|
+
- `function:revisions process-order` (to inspect mapping + checksum)
|
|
641
835
|
|
|
642
836
|
## Development
|
|
643
837
|
|