@seliseblocks/cli-os 0.2.2 → 0.2.3

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.
Files changed (37) hide show
  1. package/AI_USAGE_GUIDE.md +551 -546
  2. package/LICENSE +21 -21
  3. package/README.md +171 -171
  4. package/bin/run.js +2 -2
  5. package/dist/commands/data/files/delete.js +5 -4
  6. package/dist/commands/data/files/get-many.js +1 -1
  7. package/dist/commands/data/files/get.js +1 -1
  8. package/dist/commands/data/files/info.js +1 -1
  9. package/dist/commands/data/files/object-tree.d.ts +23 -0
  10. package/dist/commands/data/files/object-tree.js +238 -0
  11. package/dist/commands/data/files/presigned-upload-url.js +9 -2
  12. package/dist/commands/data/files/update-additional-info.js +2 -2
  13. package/dist/commands/data/files/upload-to-local-storage.js +2 -2
  14. package/dist/commands/data/files/upload.d.ts +2 -4
  15. package/dist/commands/data/files/upload.js +14 -28
  16. package/dist/index.js +685 -647
  17. package/dist/skills/blocks-data-gateway-configuration/SKILL.md +204 -204
  18. package/dist/skills/blocks-data-gateway-crud/SKILL.md +223 -223
  19. package/dist/skills/blocks-data-storage/SKILL.md +253 -161
  20. package/dist/skills/blocks-data-storage/flows/object-management.md +124 -0
  21. package/dist/skills/blocks-frontend-local-https/SKILL.md +100 -100
  22. package/dist/skills/blocks-iam-account/SKILL.md +169 -169
  23. package/dist/skills/blocks-iam-sso-oidc-implementation/SKILL.md +80 -80
  24. package/dist/skills/blocks-iam-users/SKILL.md +131 -131
  25. package/dist/skills/blocks-localization-configuration/SKILL.md +149 -149
  26. package/dist/skills/blocks-localization-implementation/SKILL.md +63 -63
  27. package/dist/skills/blocks-onboarding/SKILL.md +77 -77
  28. package/dist/skills/blocks-storage-configuration/SKILL.md +4 -4
  29. package/package.json +47 -47
  30. package/dist/commands/data/files/create-folder.d.ts +0 -1
  31. package/dist/commands/data/files/create-folder.js +0 -34
  32. package/dist/commands/data/files/delete-folder.d.ts +0 -1
  33. package/dist/commands/data/files/delete-folder.js +0 -25
  34. package/dist/commands/data/files/dms-list.d.ts +0 -1
  35. package/dist/commands/data/files/dms-list.js +0 -27
  36. package/dist/commands/data/files/dms-upload.d.ts +0 -6
  37. package/dist/commands/data/files/dms-upload.js +0 -41
package/dist/index.js CHANGED
@@ -31,11 +31,7 @@ import { dataValidationDelete } from "./commands/data/validation/delete.js";
31
31
  import { dataValidationGet } from "./commands/data/validation/get.js";
32
32
  import { dataValidationList } from "./commands/data/validation/list.js";
33
33
  import { dataValidationSave } from "./commands/data/validation/save.js";
34
- import { dataFilesCreateFolder } from "./commands/data/files/create-folder.js";
35
34
  import { dataFilesDelete } from "./commands/data/files/delete.js";
36
- import { dataFilesDeleteFolder } from "./commands/data/files/delete-folder.js";
37
- import { dataFilesDmsList } from "./commands/data/files/dms-list.js";
38
- import { dataFilesDmsUpload } from "./commands/data/files/dms-upload.js";
39
35
  import { dataFilesGet } from "./commands/data/files/get.js";
40
36
  import { dataFilesGetMany } from "./commands/data/files/get-many.js";
41
37
  import { dataFilesInfo } from "./commands/data/files/info.js";
@@ -44,6 +40,7 @@ import { dataFilesUpdateAdditionalInfo } from "./commands/data/files/update-addi
44
40
  import { dataFilesUpload } from "./commands/data/files/upload.js";
45
41
  import { dataFilesUploadToLocalStorage } from "./commands/data/files/upload-to-local-storage.js";
46
42
  import { dataFilesUploadToUrl } from "./commands/data/files/upload-to-url.js";
43
+ import { dataFilesAccessGrant, dataFilesAccessList, dataFilesAccessResolve, dataFilesAccessRevoke, dataFilesAccessUpdate, dataFilesCopy, dataFilesCreateVersion, dataFilesDirectoryCreate, dataFilesDirectoryDelete, dataFilesDirectoryGet, dataFilesDirectoryMove, dataFilesDirectoryUpdate, dataFilesInheritance, dataFilesList, dataFilesMove, dataFilesPurge, dataFilesRename, dataFilesRestore, dataFilesSearch, dataFilesShare, dataFilesShared, dataFilesTrash, dataFilesVersions } from "./commands/data/files/object-tree.js";
47
44
  import { iamMe } from "./commands/iam/me.js";
48
45
  import { init } from "./commands/init.js";
49
46
  import { localizationAssistantTranslationSuggestion } from "./commands/localization/assistant/translation-suggestion.js";
@@ -243,10 +240,29 @@ const commands = {
243
240
  "data:files:upload-to-local-storage": dataFilesUploadToLocalStorage,
244
241
  "data:files:update-additional-info": dataFilesUpdateAdditionalInfo,
245
242
  "data:files:delete": dataFilesDelete,
246
- "data:files:dms-list": dataFilesDmsList,
247
- "data:files:dms-upload": dataFilesDmsUpload,
248
- "data:files:create-folder": dataFilesCreateFolder,
249
- "data:files:delete-folder": dataFilesDeleteFolder,
243
+ "data:files:list": dataFilesList,
244
+ "data:files:search": dataFilesSearch,
245
+ "data:files:trash": dataFilesTrash,
246
+ "data:files:shared": dataFilesShared,
247
+ "data:files:restore": dataFilesRestore,
248
+ "data:files:purge": dataFilesPurge,
249
+ "data:files:directory-create": dataFilesDirectoryCreate,
250
+ "data:files:directory-get": dataFilesDirectoryGet,
251
+ "data:files:directory-update": dataFilesDirectoryUpdate,
252
+ "data:files:directory-delete": dataFilesDirectoryDelete,
253
+ "data:files:directory-move": dataFilesDirectoryMove,
254
+ "data:files:versions": dataFilesVersions,
255
+ "data:files:create-version": dataFilesCreateVersion,
256
+ "data:files:copy": dataFilesCopy,
257
+ "data:files:move": dataFilesMove,
258
+ "data:files:rename": dataFilesRename,
259
+ "data:files:access-list": dataFilesAccessList,
260
+ "data:files:access-grant": dataFilesAccessGrant,
261
+ "data:files:access-update": dataFilesAccessUpdate,
262
+ "data:files:access-revoke": dataFilesAccessRevoke,
263
+ "data:files:access-resolve": dataFilesAccessResolve,
264
+ "data:files:inheritance": dataFilesInheritance,
265
+ "data:files:share": dataFilesShare,
250
266
  "localization:validate": localizationValidate,
251
267
  "localization:push": localizationPush,
252
268
  "localization:pull": localizationPull,
@@ -469,655 +485,677 @@ function toCliError(error) {
469
485
  return { code: "command_failed", message };
470
486
  }
471
487
  function printHelp() {
472
- console.log(`Blocks CLI
473
-
474
- Usage:
475
- blocks <command> [options]
476
-
477
- Namespaced commands use spaces, e.g. 'blocks data schema list'.
478
- ':' also works if you prefer it: 'blocks data:schema:list'.
479
-
480
- Global options:
481
- --version Print CLI version.
482
- --json Print machine-readable JSON where supported.
483
- --api-url <url> Override Blocks API URL for this command.
484
- --account <name> Use a named account profile; default is implicit.
485
- --project <tenantId> Use a project tenant for project-scoped commands.
486
- --dry-run Show planned mutation without calling the API.
487
- --yes Skip mutation confirmation after explicit approval.
488
-
489
- Setup and health:
490
- blocks init
491
- Create local Blocks workspace files: blocks.json, data schema/rules folders,
492
- and .env.example.
493
-
494
- blocks doctor [--json]
495
- Check local Node.js, OIDC config, token cache, selected project, and config
496
- file locations. Does not mutate cloud resources.
497
-
498
- Auth:
499
- blocks login
500
- Device-code login. Prints a verification URL and user code, opens the
501
- browser to the verification page when possible so you only need to click
502
- approve, then polls until the device is authorized; stores account access
503
- and refresh tokens and auto-refreshes later. If a project was previously
504
- selected, re-impersonates it automatically; otherwise lists projects and
505
- prompts you to run 'blocks use <tenantId>'.
506
-
507
- blocks auth status [--json]
508
- Show only whether account/project access and refresh tokens are missing,
509
- valid, expired, or available. Does not print account config values.
510
-
511
- blocks auth refresh [--project] [--json]
512
- Force account token refresh, or project token refresh with --project.
513
-
514
- blocks auth remove <account>
515
- Clear cached tokens and stored local credentials for that account. The
516
- packaged default OS account is restored from package defaults.
517
-
518
- blocks logout
519
- Revoke the current refresh token when possible and remove local session data.
520
-
521
- Projects:
522
- blocks projects list [--json]
523
- List accessible Blocks projects via /os/v4/Project/Gets. Uses the
524
- impersonated project session when a project is selected, otherwise the
525
- account token. Read-only.
526
-
527
- blocks projects get [tenantId] [--deployment] [--json]
528
- Read one project from Project/Gets. Uses selected project when tenantId is
529
- omitted. Pass --deployment to also include the environment, tenantGroupId,
530
- and linked repo assets (from Project/GetAsset) that 'release deploy' uses
531
- to resolve its target. Read-only.
532
-
533
- blocks use <project-tenant-id>
534
- Save the selected project tenant globally and in blocks.json when present,
535
- then immediately impersonate it. If a different project was selected,
536
- stops that impersonation first to reclaim a fresh account refresh token
537
- before starting the new one.
538
-
539
- blocks deselect
540
- Stop the active impersonation (restoring a fresh account refresh token),
541
- then clear the selected project tenant (globally and in blocks.json) and
542
- drop its cached impersonation token. Run 'blocks use <tenantId>' again to
543
- reselect and re-impersonate.
544
-
545
- IAM:
546
- blocks iam me [--json]
547
- Read the current user from IAM (bootstrapping/CLI operator identity, not
548
- a project resource). Uses the impersonated project session when a project
549
- is selected, otherwise the account token -- the server always resolves
550
- this to the root identity either way. Every other iam * command below is
551
- project-scoped: it requires a selected project and calls IAM using an
552
- impersonated project token only, never the account token.
553
-
554
- Users (/iam/v4/iam/users*):
555
- blocks iam users list [--page 1] [--page-size 20] [--email <e>] [--name <n>]
556
- [--organization-id <id>] [--sort-by <field>] [--sort-desc]
557
- [--filter '<json>'] [--json]
558
- Query users. --filter merges a raw JSON filter object over the convenience flags.
559
- blocks iam users get <id> [--organization-id <id>] [--json]
560
- blocks iam users create --email <e>|--user-name <n> [--first-name] [--last-name]
561
- [--password] [--phone-number] [--organization-id]
562
- [--roles a,b] [--permissions a,b] [--body '<json>'|--file <path>]
563
- [--dry-run] [--yes] [--json]
564
- blocks iam users update <id> [--first-name] [--last-name] [--phone-number]
565
- [--organization-id] [--roles a,b] [--permissions a,b]
566
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
567
- blocks iam users activate <userId> [--reason <text>] [--dry-run] [--yes] [--json]
568
- blocks iam users deactivate <userId> [--dry-run] [--yes] [--json]
569
- blocks iam users access grant <userId> [--roles a,b] [--permissions a,b]
570
- [--organization-id] [--dry-run] [--yes] [--json]
571
- blocks iam users access revoke <userId> [--organization-id] [--dry-run] [--yes] [--json]
572
- blocks iam users exists <email> [--json]
573
- blocks iam email available <email> [--json]
574
-
575
- Roles (/iam/v4/iam/roles*):
576
- blocks iam roles list [--page] [--page-size] [--search] [--slugs a,b]
577
- [--organization-id] [--filter '<json>'] [--json]
578
- blocks iam roles get <id> [--json]
579
- blocks iam roles create --name <n> [--slug] [--description] [--parent-role-slug]
580
- [--can-create-own] [--body '<json>'|--file <path>]
581
- [--dry-run] [--yes] [--json]
582
- blocks iam roles update <itemId> [--name] [--description] [--parent-role-slug]
583
- [--propagate-to-other-org] [--can-create-own]
584
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
585
- blocks iam roles assign-permissions <slug> [--add-permissions a,b]
586
- [--remove-permissions a,b] [--organization-id]
587
- [--dry-run] [--yes] [--json]
588
- blocks iam roles assignable [--json]
589
-
590
- Permissions (/iam/v4/iam/permissions*):
591
- blocks iam permissions list [--page] [--page-size] [--search] [--type <0-3>]
592
- [--severity <0-4>] [--resource-group] [--tags a,b]
593
- [--resources a,b] [--is-built-in] [--is-archived]
594
- [--roles a,b] [--organization-id] [--filter '<json>'] [--json]
595
- blocks iam permissions get <id> [--json]
596
- blocks iam permissions create --name <n> [--type] [--description] [--resource]
597
- [--resource-group] [--tags a,b] [--severity] [--is-built-in]
598
- [--dependent-permissions a,b] [--body '<json>'|--file <path>]
599
- [--dry-run] [--yes] [--json]
600
- blocks iam permissions update <id> [same flags as create, plus --is-archived]
601
- [--dry-run] [--yes] [--json]
602
- blocks iam permissions by-severity [--json]
603
-
604
- Resources (/iam/v4/iam/resource*):
605
- blocks iam resources groups [--json]
606
- blocks iam resources features [--search <text>] [--is-built-in] [--json]
607
-
608
- Organizations (/iam/v4/iam/organizations*):
609
- blocks iam organizations list [--page] [--page-size] [--search] [--ids a,b]
610
- [--is-disabled] [--parent-organization-id] [--json]
611
- blocks iam organizations get <id> [--json]
612
- blocks iam organizations create --name <n> [--description] [--email] [--phone-number]
613
- [--website-url] [--default-roles a,b] [--default-permissions a,b]
614
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
615
- blocks iam organizations update <id> [--name] [--description] [--email]
616
- [--phone-number] [--website-url] [--industry] [--time-zone]
617
- [--currency] [--locale] [--is-enabled]
618
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
619
- blocks iam organizations my [--json]
620
- blocks iam organizations config get [--json]
621
- blocks iam organizations config save [--allow-org-creation-from-cloud]
622
- [--allow-org-creation-from-construct] [--allow-org-creation-from-signup]
623
- [--allow-org-creation-from-portal] [--multi-org-enabled]
624
- [--consent-for-multi-org-enable] [--body '<json>'|--file <path>]
625
- [--dry-run] [--yes] [--json]
626
-
627
- Signup settings (/iam/v4/iam/signup-settings):
628
- blocks iam signup-settings get [--json]
629
- blocks iam signup-settings save [--email-password-signup] [--sso-signup]
630
- [--default-roles a,b] [--default-permissions a,b]
631
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
632
-
633
- MFA (/iam/v4/mfa*, project-scoped: requires a selected project, impersonated project token only):
634
- blocks mfa config get [--json]
635
- Read the tenant's MFA policy.
636
- blocks mfa config save [--enable] [--require-for-all-users] [--allow-user-opt-out]
637
- [--allow-backup-codes] [--backup-codes-count <n>]
638
- [--user-mfa-type 0,1] [--required-roles a,b] [--exempt-roles a,b]
639
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
640
- Save the tenant's MFA policy.
641
- blocks mfa totp setup [--json]
642
- Start TOTP enrollment for the impersonated user.
643
- blocks mfa totp verify-setup <code> [--json]
644
- Confirm TOTP enrollment.
645
- blocks mfa totp enable --mfa-type <n> [--code <c>] [--dry-run] [--yes] [--json]
646
- Composed enrollment: totp setup -> (scan the printed QR/secret, enter the code --
647
- interactively prompted if --code is omitted) -> totp verify-setup -> method set
648
- --mfa-type <n> -> backup-codes generate. One sitting, one confirmation.
649
- --mfa-type is required and not defaulted: the numeric value meaning "TOTP" is
650
- tenant-defined and undocumented here (same value plain mfa method set expects) --
651
- look it up rather than guessing.
652
- blocks mfa generate --mfa-type <n> [--send-phone-number-as-email-domain <domain>] [--json]
653
- Send an OTP challenge; returns an mfaId to pass to resend/verify.
654
- blocks mfa resend <mfaId> [--send-phone-number-as-email-domain <domain>] [--json]
655
- blocks mfa verify <mfaId> <code> --auth-type <n> [--from-token-call] [--json]
656
- blocks mfa method set --mfa-type <n> [--json]
657
- Switch the impersonated user's active MFA method.
658
- blocks mfa disable [--dry-run] [--yes] [--json]
659
- blocks mfa backup-codes list [--json]
660
- blocks mfa backup-codes generate [--dry-run] [--yes] [--json]
661
- blocks mfa backup-codes use <userId> <code> [--json]
662
-
663
- Mail (/os/v4/Mail/* — project-scoped: requires a selected project, impersonated project token only):
664
- blocks mail config list [--json]
665
- List SMTP/inbound mail configurations for the selected project.
666
- blocks mail config get <name> [--json]
667
- blocks mail config save [--configuration-id <id>] [--name <n>] [--host <h>] [--port <n>]
668
- [--enable-ssl] [--sender-name] [--sender-address] [--sender-username]
669
- [--account-password] [--inbound] [--provider <0|1>]
670
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
671
- Upsert: omit --configuration-id to create; pass it to update.
672
- blocks mail config delete <configurationId> [--dry-run] [--yes] [--json]
673
- blocks mail config duplicate <configurationId> [--dry-run] [--yes] [--json]
674
- blocks mail template list [--page-number] [--page-size] [--search] [--sort-by] [--sort-desc]
675
- [--configuration-id] [--language] [--json]
676
- blocks mail template get <itemId> [--json]
677
- blocks mail template save [--item-id <id>] [--configuration-id] [--name] [--language]
678
- [--subject] [--template-body] [--json-content] [--image-id]
679
- [--image-url] [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
680
- Upsert: omit --item-id to create; pass it to update.
681
- blocks mail template delete <itemId> [--dry-run] [--yes] [--json]
682
- blocks mail template clone <itemId> [--configuration-id] [--language] [--name] [--subject]
683
- [--dry-run] [--yes] [--json]
684
- blocks mail mailbox list [--page-number] [--page-size] [--status] [--search]
685
- [--start-date] [--end-date] [--inbound] [--json]
686
- blocks mail mailbox get <messageId> [--json]
687
- blocks mail send [--to a,b] [--cc a,b] [--bcc a,b] [--reply-to a,b] [--purpose <p>]
688
- [--language <culture>] [--subject-data-context '<json>']
689
- [--body-data-context '<json>'] [--attachments '<json>']
690
- [--send-phone-number-as-email] [--project-key <key>]
691
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
692
- Send an email through the tenant's default mail configuration
693
- (/logic/v4/Mail/Send). --project-key defaults to the selected project.
694
- blocks mail sendtoany [same flags as mail send, plus --is-test-mail]
695
- [--dry-run] [--yes] [--json]
696
- Same as mail send but via /logic/v4/Mail/SendToAny, which lets the mail
697
- provider route the send (e.g. mark it --is-test-mail).
698
-
699
- Notification (/os/v4/Notification/* — project-scoped: requires a selected project, impersonated project token only):
700
- blocks notification list [--page] [--page-size] [--sort-by] [--sort-desc] [--filter] [--json]
701
- blocks notification get <itemId> [--json]
702
- blocks notification save [--name <n>] [--channel <0|1>] [--type <0-3>] [--enable-persistence]
703
- [--notify-method] [--update] [--body '<json>'|--file <path>]
704
- [--dry-run] [--yes] [--json]
705
- Pass --update when saving over an existing notification configuration.
706
- blocks notification delete <itemId> [--dry-run] [--yes] [--json]
707
-
708
- Notifier (/logic/v4/Notifier/* — real-time/offline notification sends and inbox reads;
709
- project-scoped: requires a selected project, impersonated project token only.
710
- Distinct from 'notification' above, which manages notification channel
711
- configuration, not sending):
712
- blocks notifier notify [--user-ids a,b] [--roles a,b] [--connection-id <id>]
713
- [--subscription-filters '<json>'] [--denormalized-payload <text>]
714
- [--save-denormalized-payload-as-object] [--response-key]
715
- [--response-value] [--content-available] [--configuration-name]
716
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
717
- Push a notification to specific users/roles, or everyone matching a subscription
718
- filter. Target with at least one of --user-ids/--roles/--subscription-filters.
719
- blocks notifier list [--unread-only] [--page] [--page-size] [--sort-by] [--sort-desc]
720
- [--filter] [--json]
721
- List the signed-in user's notifications (GetNotifications). Read-only.
722
- blocks notifier unread [--user-id <id>] [--context <c>] [--action-name <a>] [--value <v>]
723
- [--order-by <1|2>] [--json]
724
- Read unread notifications matching a subscription filter. Sent as query
725
- parameters even though swagger documents this endpoint as GET with a JSON
726
- body -- the Fetch spec forbids a body on GET. Read-only.
727
- blocks notifier mark-read <id> [--dry-run] [--yes] [--json]
728
- blocks notifier mark-all-read [--dry-run] [--yes] [--json]
729
-
730
- Secrets (/os/v4/Secrets/* — project-scoped: requires a selected project, impersonated project
731
- token only; generic tenant secret storage, e.g. captcha provider config):
732
- blocks secrets get <secretKey> [--page-number 0] [--page-size 10] [--json]
733
- blocks secrets save --secret-key <key> [--item-id <id>] --key-value-pairs '<json>'
734
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
735
- Upsert: omit --item-id to create, pass it to update. --key-value-pairs is a flat
736
- JSON object of provider-specific fields, e.g.
737
- --key-value-pairs '{"isEnable":"true","provider":"recaptcha","captchaKey":"...","captchaSecret":"..."}'.
738
-
739
- Storage (/os/v4/Storage/* — project-scoped: requires a selected project, impersonated project token only):
740
- blocks storage config list [--json]
741
- blocks storage config get <name> [--json]
742
- blocks storage config save [--item-id <id>] [--name <n>] [--strategy] [--connection-string]
743
- [--secret-key] [--access-key] [--region-endpoint] [--host] [--port]
744
- [--username] [--password] [--remote-base-path] [--update]
745
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
746
- Upsert: omit --item-id to create; pass --update to update.
747
- blocks storage config delete <name> [--dry-run] [--yes] [--json]
748
-
749
- Auth Admin (/iam/v4/auth/identity-providers*, /config, /client-credentials, /oidc-clients —
750
- project-scoped: requires a selected project, impersonated project token only):
751
- blocks auth idp list [--json]
752
- blocks auth idp get <id> [--json]
753
- blocks auth idp create --provider <p> --provider-type <t> --protocol <proto>
754
- --client-id <id> [--client-secret] [--display-name] [--issuer]
755
- [--scope] [--redirect-uris a,b] [--active]
756
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
757
- Rich provider configs (JWKS, private keys, initial roles, etc.) go in --body/--file;
758
- the flags above cover the common OAuth/OIDC fields.
759
- blocks auth idp update <id> [same flags as create, all optional] [--dry-run] [--yes] [--json]
760
- provider/providerType/protocol/clientId are immutable: omit them, or echo the
761
- existing values exactly if you also pass --body/--file.
762
- blocks auth idp delete <id> [--dry-run] [--yes] [--json]
763
- Irreversible; also deletes the related OIDC client registration.
764
- blocks auth idp status <id> --active|--active=false [--dry-run] [--yes] [--json]
765
- Enable/disable a provider without deleting its configuration.
766
- blocks auth config get [--json]
767
- blocks auth config save [--refresh-token-minutes] [--absolute-refresh-token-minutes]
768
- [--access-token-minutes] [--remember-me-refresh-token-minutes]
769
- [--wrong-attempts-to-lock] [--account-lock-duration-minutes]
770
- [--oidc-enabled] [--logout-on-password-change]
771
- [--password-strength-regex] [--body '<json>'|--file <path>]
772
- [--dry-run] [--yes] [--json]
773
- blocks auth client-credentials list [--json]
774
- clientSecret is included in list responses; treat CLI output as sensitive.
775
- blocks auth client-credentials save --name <n> [--item-id <id>] [--roles a,b]
776
- [--permissions a,b] [--access-token-valid-minutes] [--active]
777
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
778
- Omit --item-id to create; pass it to update. The response's clientSecret is
779
- shown once and is not retrievable again afterward.
780
- blocks auth client-credentials delete <id> [--dry-run] [--yes] [--json]
781
-
782
- blocks auth oidc-clients list [--json]
783
- List registered OAuth 2.0 / OIDC client applications for the tenant. client_secret
784
- is excluded from list/get responses.
785
- blocks auth oidc-clients get <clientId> [--json]
786
- blocks auth oidc-clients save [--item-id <id>] [--client-display-name] [--client-type]
787
- [--redirect-uris a,b] [--post-logout-redirect-uris a,b]
788
- [--scope] [--allowed-scopes a,b] [--allowed-response-types a,b]
789
- [--require-pkce] [--require-consent] [--require-mfa]
790
- [--allowed-mfa-methods 0,1] [--front-channel-logout-uri]
791
- [--back-channel-logout-uri] [--auto-redirect]
792
- [--external-discovery-endpoint] [--active] [--login-mode]
793
- [--client-logo-url] [--client-brand-color] [--use-tokens-cookie]
794
- [--register-as-identity-provider] [--device-flow-client]
795
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
796
- Upsert: omit --item-id to register a new client, pass it to update an existing one.
797
- The response's client_secret is shown once and is not retrievable again afterward.
798
- blocks auth oidc-clients delete <clientId> [--dry-run] [--yes] [--json]
799
- Irreversible; revokes all tokens issued to the client.
800
- blocks auth oidc-clients rotate-secret <clientId> [--dry-run] [--yes] [--json]
801
- Generates a new client_secret, shown once; the old secret stops working immediately.
802
-
803
- Data:
804
- blocks data validate [--json]
805
- Validate local blocks/data/schemas/*.json and blocks/data/rules.json before
806
- pushing. Local-only.
807
-
808
- blocks data schema list [--json]
809
- List project schemas via /data/v4/schemas using an impersonated project
810
- token. Read-only.
811
-
812
- blocks data schema pull [--json]
813
- Download project schemas into blocks/data/schemas/*.json. Writes local files
814
- only.
815
-
816
- blocks data schema push [--dry-run] [--yes] [--json]
817
- Create or update project schemas via /data/v4/schemas/define. Mutating;
818
- uses POST for create and PUT for update.
819
-
820
- blocks data rules pull [--json]
821
- Download data-access policies into blocks/data/rules.json. Writes local
822
- files only.
823
-
824
- blocks data rules deploy [--dry-run] [--yes] [--json]
825
- Apply schema security and data-access policies. Mutating; supports dry-run
826
- and confirmation.
827
-
828
- blocks data reload [--dry-run] [--yes] [--json]
829
- Reload Data schema configuration so staged schema/rule changes become live.
830
- Mutating; calls POST /data/v4/schema-configurations/reload.
831
-
832
- blocks data sync [--dry-run] [--yes] [--json]
833
- Composed flow: validate local schemas/rules, then data schema push ->
834
- data rules deploy -> data reload, so pushed changes actually go live in one
835
- step. Validation runs first and hard-fails before anything is sent if it
836
- finds errors. Prints 3 separate step outputs (one per underlying command),
837
- not one combined document. One confirmation covers the whole flow.
838
-
839
- Data source configuration (/data/v4/configurations) - check this first; by default a
840
- project's Data Gateway runs on Blocks-managed storage and data config get is all you need.
841
- Only create/update a configuration if you're pointing the gateway at your own database.
842
- blocks data config get [--json]
843
- blocks data config create --connection-string <cs> [--database-name <name>]
844
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
845
- blocks data config update --item-id <id> [--connection-string] [--database-name]
846
- [--collection-name-editable] [--collection-name-pattern]
847
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
848
-
849
- Raw Schema API (/data/v4/schemas* - beyond the file-oriented list/pull/push above):
850
- blocks data schema get <id> [--json]
851
- blocks data schema get-by-name <schemaName> [--json]
852
- Full field-level detail by collection name (info-by-name).
853
- blocks data schema aggregation [--keyword] [--schema-name] [--collection-name]
854
- [--schema-type <1|2>] [--page] [--page-size] [--sort-by]
855
- [--sort-desc] [--json]
856
- Schemas plus an access-level summary (Public/User/Custom x Read/Write/Edit/Delete).
857
- blocks data schema change-logs [--json]
858
- Unadapted schema change logs; data reload clears these.
859
- blocks data schema delete <id> [--dry-run] [--yes] [--json]
860
- Irreversible.
861
- blocks data schema info list [--json]
862
- Entity-type schema collections with basic info.
863
- blocks data schema info save --schema-name <n> [--collection-name] [--schema-type <1|2>]
864
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
865
- Create schema metadata only (no fields yet) - pair with data schema fields.
866
- blocks data schema info update --item-id <id> [--schema-name] [--collection-name]
867
- [--schema-type <1|2>] [--body '<json>'|--file <path>]
868
- [--dry-run] [--yes] [--json]
869
- blocks data schema fields --schema-id <schemaDefinitionItemId> [--deletable-fields a,b]
870
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
871
- Add/update field definitions; the 'fields' array (name/type/isArray/isPIIData/
872
- isUniqueData/description) goes in --body/--file, e.g.
873
- --body '{"fields":[{"name":"email","type":"string"}]}'.
874
-
875
- Data-access policies, single-item ops (beyond the file-oriented rules pull/deploy above):
876
- blocks data rules policy get <schemaName> [--json]
877
- blocks data rules policy delete <itemId> [--dry-run] [--yes] [--json]
878
-
879
- Data validation (/data/v4/data-validations* - field-level validation rules; no file-oriented
880
- workflow exists for this yet, use these directly):
881
- blocks data validation list [--schema-id] [--field-name] [--keyword] [--page]
882
- [--page-size] [--sort-by] [--sort-desc] [--json]
883
- blocks data validation get <validationId> [--json]
884
- blocks data validation by-schema <schemaId> [--json]
885
- blocks data validation by-schema-field <schemaId> <fieldName> [--json]
886
- blocks data validation save --schema-id <id> --field-name <name> [--item-id]
887
- --body '<json>' (must include a "validations" array, e.g.
888
- '{"validations":[{"type":1,"value":"^[0-9]+$","isActive":true}]}')
889
- [--dry-run] [--yes] [--json]
890
- Upsert: omit --item-id to create, pass it to update.
891
- blocks data validation delete <validationId> [--dry-run] [--yes] [--json]
892
-
893
- Files / DMS (/data/v4/Files/* - storage and document management; no SDK required, but see
894
- the blocks-data-storage skill if writing this into app code instead of scripting it):
895
- blocks data files get <fileId> [--version] [--configuration-name] [--json]
896
- blocks data files get-many <fileId...>|--file-ids a,b [--configuration-name] [--json]
897
- blocks data files info [--name] [--tenant-id] [--page] [--page-size] [--sort-by]
898
- [--sort-desc] [--json]
899
- blocks data files upload --file <localPath> [--name] [--parent-id] [--tags]
900
- [--access-modifier Public|Private] [--content-type]
901
- [--configuration-name] [--module-name <1-11>] [--local-storage]
902
- [--dry-run] [--yes] [--json]
903
- Composed flow: presigned-upload-url -> PUT the file -> dms-upload, threading the
904
- returned uploadUrl/fileId automatically (content-type is inferred from the file
905
- extension if omitted). Pass --local-storage to use the one-call
906
- upload-to-local-storage path instead, for local-storage-backed projects.
907
- blocks data files presigned-upload-url --name <fileName> [--parent-directory-id]
908
- [--access-modifier Public|Private] [--configuration-name]
909
- [--module-name <1-11>] [--meta-data] [--tags]
910
- [--body '<json>'|--file <path>] [--json]
911
- Cloud-storage upload, step 1 of 2. Returns an uploadUrl and fileId; PUT the bytes next
912
- with data files upload-to-url.
913
- blocks data files upload-to-url --url <presignedUrl> --file <localPath>
914
- --content-type <type> [--blob-type BlockBlob] [--no-blob-type-header]
915
- [--dry-run] [--yes] [--json]
916
- Step 2. Provider-direct PUT - no Blocks auth headers by design.
917
- blocks data files upload-to-local-storage --file <localPath> [--name] [--item-id]
918
- [--parent-directory-id] [--tags] [--access-modifier Public|Private]
919
- [--configuration-name] [--meta-data] [--additional-properties '<json>']
920
- [--dry-run] [--yes] [--json]
921
- One-call alternative to the two commands above, for local-storage-backed projects.
922
- blocks data files update-additional-info <itemId> --additional-properties '<json>'
923
- [--dry-run] [--yes] [--json]
924
- blocks data files delete <fileId> [--configuration-name] [--event-queue-name]
925
- [--dry-run] [--yes] [--json]
926
- blocks data files dms-list [--parent-id] [--search] [--configuration-name] [--take]
927
- [--skip] [--json]
928
- Combined folder+file listing for a DMS parent ("" = root).
929
- blocks data files dms-upload --file-storage-id <id> --artifact-name <name>
930
- [--parent-id] [--tags a,b] [--body '<json>'|--file <path>]
931
- [--dry-run] [--yes] [--json]
932
- Registers an uploaded file (fileId from presigned-upload-url/upload-to-local-storage)
933
- so it appears in a DMS folder. Upload alone does not make a file visible in a folder.
934
- blocks data files create-folder <name> [--parent-id] [--description] [--tags a,b]
935
- [--configuration-name] [--dry-run] [--yes] [--json]
936
- blocks data files delete-folder <folderId> [--configuration-name]
937
- [--dry-run] [--yes] [--json]
938
-
939
- Localization:
940
- blocks localization validate --module <name> --language <culture> [--file <path>] [--json]
941
- Validate a local i18n JSON dictionary. Supports nested JSON input and
942
- validates the flattened key/value set locally.
943
-
944
- blocks localization push --module <name> --language <culture> [--file <path>] [--route <route>] [--context <text>] [--dry-run] [--yes] [--json]
945
- Create or update Localization keys from a local i18n JSON dictionary via
946
- /localization/v4/Key/SaveKeys. Creates the module first when it is missing.
947
-
948
- blocks localization pull --module <name> --language <culture> [--out <path>] [--json]
949
- Download published cloud localization via
950
- /localization/v4/Key/GetCloudUilmFile and write a local JSON dictionary.
951
-
952
- Raw API (/localization/v4/* — project-scoped: requires a selected project, impersonated
953
- project token only). These call the Localization service endpoints directly,
954
- in addition to the file-oriented validate/push/pull commands above.
955
-
956
- blocks localization assistant translation-suggestion --source-text <text>
957
- --destination-language <culture> [--current-language]
958
- [--element-type] [--element-application-context]
959
- [--element-detail-context] [--temperature] [--max-character-length]
960
- [--glossary-ids a,b] [--module-id] [--destination-language-code]
961
- [--body '<json>'|--file <path>] [--json]
962
-
963
- blocks localization config get-webhook [--json]
964
- blocks localization config save-webhook --url <url> --content-type <type>
965
- --secret <s> --header-key <k> [--item-id <id>] [--is-disabled]
966
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
967
-
968
- blocks localization glossary save --name <n> [--item-id] [--language] [--type]
969
- [--context] [--additional-note] [--is-global] [--module-ids a,b]
970
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
971
- blocks localization glossary list [--search] [--page-number] [--page-size]
972
- [--is-global] [--module-id] [--json]
973
- blocks localization glossary get <itemId> [--json]
974
- blocks localization glossary suggested <itemId> [--max-results <n>] [--json]
975
- blocks localization glossary delete <itemId> [--dry-run] [--yes] [--json]
976
-
977
- blocks localization key save --key-name <n> --module-id <id> [--item-id] [--value]
978
- [--culture] [--routes a,b] [--glossary-ids a,b] [--context]
979
- [--is-new-key] [--is-partially-translated] [--should-publish]
980
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
981
- blocks localization key list [--key-search-text] [--search-key] [--module-ids a,b]
982
- [--page-number] [--page-size] [--sort-by] [--sort-desc]
983
- [--is-partially-translated] [--missing-languages a,b]
984
- [--create-date-start] [--create-date-end]
985
- [--last-update-date-start] [--last-update-date-end]
986
- [--glossary-id] [--body '<json>'|--file <path>] [--json]
987
- blocks localization key get-by-names <keyName...>|--key-names a,b [--module-id] [--json]
988
- blocks localization key get <itemId> [--json]
989
- blocks localization key delete <itemId> [--dry-run] [--yes] [--json]
990
- blocks localization key delete-keys <itemId...>|--item-ids a,b [--dry-run] [--yes] [--json]
991
- blocks localization key get-timeline [--entity-id] [--user-id] [--page-number]
992
- [--page-size] [--sort-by] [--sort-desc] [--create-date-start]
993
- [--create-date-end] [--json]
994
- blocks localization key get-localization-timeline [--user-id] [--log-from]
995
- [--log-from-values a,b] [--exclude-log-from-values a,b]
996
- [--page-number] [--page-size] [--sort-by] [--sort-desc]
997
- [--create-date-start] [--create-date-end] [--json]
998
- blocks localization key get-timeline-by-operation-id <operationId> [--page-number]
999
- [--page-size] [--json]
1000
- blocks localization key get-uilm-file --module <name> --language <culture> [--json]
1001
- blocks localization key generate-uilm-file --module-id <id> [--guid]
1002
- [--dry-run] [--yes] [--json]
1003
- blocks localization key translate-all --module-id <id> [--default-language]
1004
- [--message-co-relation-id] [--dry-run] [--yes] [--json]
1005
- blocks localization key translate-key <keyId> --default-language <culture>
1006
- [--message-co-relation-id] [--dry-run] [--yes] [--json]
1007
- blocks localization key translate-keys <keyId...>|--key-ids a,b --default-language <culture>
1008
- [--message-co-relation-id] [--project-key]
1009
- [--dry-run] [--yes] [--json]
1010
- blocks localization key translate-and-export --module-id <id> [--default-language]
1011
- [--wait] [--poll-interval <seconds>] [--timeout <seconds>]
1012
- [--guid] [--output-type <0-5>] [--app-ids a,b] [--languages a,b]
1013
- [--reference-file-id] [--caller-tenant-id] [--start-date]
1014
- [--end-date] [--dry-run] [--yes] [--json]
1015
- Composed flow: translate-all -> generate-uilm-file -> uilm-export. Without --wait,
1016
- fires all 3 back to back (same as running them by hand). With --wait, polls
1017
- GetTimelineByOperationId (using a generated messageCoRelationId) between translate
1018
- and generate, since translation runs async and there's no documented explicit
1019
- "done" field to check -- it stops once the timeline entry count settles across 2
1020
- polls, or times out with a clear next-step message. Prints one output block per
1021
- step, not a single combined document.
1022
- blocks localization key uilm-import <fileId> [--message-co-relation-id]
1023
- [--dry-run] [--yes] [--json]
1024
- blocks localization key uilm-export [--output-type <0-5>] [--app-ids a,b] [--languages a,b]
1025
- [--reference-file-id] [--caller-tenant-id] [--start-date]
1026
- [--end-date] [--message-co-relation-id] [--dry-run] [--yes] [--json]
1027
- blocks localization key get-uilm-exported-files [--search] [--page-number] [--page-size]
1028
- [--create-date-start] [--create-date-end] [--json]
1029
- blocks localization key get-language-file-generation-history [--page-number]
1030
- [--page-size] [--json]
1031
- blocks localization key rollback <itemId> [--dry-run] [--yes] [--json]
1032
-
1033
- blocks localization language save --language-name <n> --language-code <c> [--item-id]
1034
- [--is-default] [--body '<json>'|--file <path>]
1035
- [--dry-run] [--yes] [--json]
1036
- blocks localization language list [--json]
1037
- blocks localization language list-for-tenant [--json]
1038
- blocks localization language delete <languageName> [--dry-run] [--yes] [--json]
1039
- blocks localization language set-default <languageName> [--dry-run] [--yes] [--json]
1040
-
1041
- blocks localization module save --module-name <n> [--item-id]
1042
- [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
1043
- blocks localization module list [--json]
1044
- blocks localization module list-for-tenant [--json]
1045
- blocks localization module tag-glossary <moduleId> --glossary-ids a,b
1046
- [--dry-run] [--yes] [--json]
1047
-
1048
- Release:
1049
- blocks release deploy [--domain <customDomain>] [--wait] [--poll-interval <seconds>]
1050
- [--timeout <seconds>] [--dry-run] [--yes] [--json]
1051
- Deploy the selected project's environment. Resolves everything from state
1052
- you already have: the repo linked to this project (Project/GetAsset) and
1053
- that repo's connected branch (Build/repo-details) -- no --repo-id needed.
1054
- Aborts if the connected branch doesn't match this environment's name.
1055
- Pass --domain to also set the custom deployment domain before deploying.
1056
- Pass --wait to poll release status on the resulting build until it reaches
1057
- a terminal state (or --timeout elapses, default 900s) instead of returning
1058
- immediately with just a build id.
1059
- Mutating; no artifact upload is performed by this CLI.
1060
-
1061
- blocks release status <buildId> [--json]
1062
- Read Release build status by build id using an impersonated project
1063
- token. Read-only.
1064
-
1065
- blocks release builds list [repoId] [--repo-id <repoId>] [--json]
1066
- List Release build details for a repository using an impersonated project
1067
- token. When repoId is omitted, resolves it from the selected project's
1068
- linked repo assets (Project/GetAsset, account token) -- auto-picked if
1069
- there's exactly one, otherwise you're prompted to choose. Read-only.
1070
-
1071
- blocks release builds get <buildId> [--json]
1072
- Alias for release status. Read-only.
1073
-
1074
- Scaffold:
1075
- blocks new web <name> [--app-domain <domain>] [--client-id <oidcClientId>]
1076
- [--x-blocks-key <tenantId>] [--blocks-api-url <url>] [--oidc-url <url>]
1077
- Create a Vite React starter app that talks to Blocks exclusively through
1078
- @seliseblocks/client (a single createBlocksClient() instance) using the SDK
1079
- hosted IdP flow: blocksClient.auth.idp.redirectToProvider() on login click
1080
- and blocksClient.auth.idp.callback() on /login/callback. Includes route
1081
- guards, auto-refresh through auth.oidc.refreshToken(), live
1082
- auth/iam/data/localization SDK examples, environment config, and safe
1083
- .gitignore defaults.
1084
- Uses the selected project (see 'use') unless --x-blocks-key overrides it.
1085
- --app-domain and --client-id are resolved from the project when omitted:
1086
- if the project has one domain it's used automatically, otherwise you're
1087
- prompted to choose; the OIDC client is picked from a list of the
1088
- project's existing clients, or you can create a minimal one (display
1089
- name + redirect URI, active, registered as a Blocks OIDC identity
1090
- provider) on the spot, or skip and register one later from the portal or
1091
- 'auth oidc-clients save'.
488
+ console.log(`Blocks CLI
489
+
490
+ Usage:
491
+ blocks <command> [options]
492
+
493
+ Namespaced commands use spaces, e.g. 'blocks data schema list'.
494
+ ':' also works if you prefer it: 'blocks data:schema:list'.
495
+
496
+ Global options:
497
+ --version Print CLI version.
498
+ --json Print machine-readable JSON where supported.
499
+ --api-url <url> Override Blocks API URL for this command.
500
+ --account <name> Use a named account profile; default is implicit.
501
+ --project <tenantId> Use a project tenant for project-scoped commands.
502
+ --dry-run Show planned mutation without calling the API.
503
+ --yes Skip mutation confirmation after explicit approval.
504
+
505
+ Setup and health:
506
+ blocks init
507
+ Create local Blocks workspace files: blocks.json, data schema/rules folders,
508
+ and .env.example.
509
+
510
+ blocks doctor [--json]
511
+ Check local Node.js, OIDC config, token cache, selected project, and config
512
+ file locations. Does not mutate cloud resources.
513
+
514
+ Auth:
515
+ blocks login
516
+ Device-code login. Prints a verification URL and user code, opens the
517
+ browser to the verification page when possible so you only need to click
518
+ approve, then polls until the device is authorized; stores account access
519
+ and refresh tokens and auto-refreshes later. If a project was previously
520
+ selected, re-impersonates it automatically; otherwise lists projects and
521
+ prompts you to run 'blocks use <tenantId>'.
522
+
523
+ blocks auth status [--json]
524
+ Show only whether account/project access and refresh tokens are missing,
525
+ valid, expired, or available. Does not print account config values.
526
+
527
+ blocks auth refresh [--project] [--json]
528
+ Force account token refresh, or project token refresh with --project.
529
+
530
+ blocks auth remove <account>
531
+ Clear cached tokens and stored local credentials for that account. The
532
+ packaged default OS account is restored from package defaults.
533
+
534
+ blocks logout
535
+ Revoke the current refresh token when possible and remove local session data.
536
+
537
+ Projects:
538
+ blocks projects list [--json]
539
+ List accessible Blocks projects via /os/v4/Project/Gets. Uses the
540
+ impersonated project session when a project is selected, otherwise the
541
+ account token. Read-only.
542
+
543
+ blocks projects get [tenantId] [--deployment] [--json]
544
+ Read one project from Project/Gets. Uses selected project when tenantId is
545
+ omitted. Pass --deployment to also include the environment, tenantGroupId,
546
+ and linked repo assets (from Project/GetAsset) that 'release deploy' uses
547
+ to resolve its target. Read-only.
548
+
549
+ blocks use <project-tenant-id>
550
+ Save the selected project tenant globally and in blocks.json when present,
551
+ then immediately impersonate it. If a different project was selected,
552
+ stops that impersonation first to reclaim a fresh account refresh token
553
+ before starting the new one.
554
+
555
+ blocks deselect
556
+ Stop the active impersonation (restoring a fresh account refresh token),
557
+ then clear the selected project tenant (globally and in blocks.json) and
558
+ drop its cached impersonation token. Run 'blocks use <tenantId>' again to
559
+ reselect and re-impersonate.
560
+
561
+ IAM:
562
+ blocks iam me [--json]
563
+ Read the current user from IAM (bootstrapping/CLI operator identity, not
564
+ a project resource). Uses the impersonated project session when a project
565
+ is selected, otherwise the account token -- the server always resolves
566
+ this to the root identity either way. Every other iam * command below is
567
+ project-scoped: it requires a selected project and calls IAM using an
568
+ impersonated project token only, never the account token.
569
+
570
+ Users (/iam/v4/iam/users*):
571
+ blocks iam users list [--page 1] [--page-size 20] [--email <e>] [--name <n>]
572
+ [--organization-id <id>] [--sort-by <field>] [--sort-desc]
573
+ [--filter '<json>'] [--json]
574
+ Query users. --filter merges a raw JSON filter object over the convenience flags.
575
+ blocks iam users get <id> [--organization-id <id>] [--json]
576
+ blocks iam users create --email <e>|--user-name <n> [--first-name] [--last-name]
577
+ [--password] [--phone-number] [--organization-id]
578
+ [--roles a,b] [--permissions a,b] [--body '<json>'|--file <path>]
579
+ [--dry-run] [--yes] [--json]
580
+ blocks iam users update <id> [--first-name] [--last-name] [--phone-number]
581
+ [--organization-id] [--roles a,b] [--permissions a,b]
582
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
583
+ blocks iam users activate <userId> [--reason <text>] [--dry-run] [--yes] [--json]
584
+ blocks iam users deactivate <userId> [--dry-run] [--yes] [--json]
585
+ blocks iam users access grant <userId> [--roles a,b] [--permissions a,b]
586
+ [--organization-id] [--dry-run] [--yes] [--json]
587
+ blocks iam users access revoke <userId> [--organization-id] [--dry-run] [--yes] [--json]
588
+ blocks iam users exists <email> [--json]
589
+ blocks iam email available <email> [--json]
590
+
591
+ Roles (/iam/v4/iam/roles*):
592
+ blocks iam roles list [--page] [--page-size] [--search] [--slugs a,b]
593
+ [--organization-id] [--filter '<json>'] [--json]
594
+ blocks iam roles get <id> [--json]
595
+ blocks iam roles create --name <n> [--slug] [--description] [--parent-role-slug]
596
+ [--can-create-own] [--body '<json>'|--file <path>]
597
+ [--dry-run] [--yes] [--json]
598
+ blocks iam roles update <itemId> [--name] [--description] [--parent-role-slug]
599
+ [--propagate-to-other-org] [--can-create-own]
600
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
601
+ blocks iam roles assign-permissions <slug> [--add-permissions a,b]
602
+ [--remove-permissions a,b] [--organization-id]
603
+ [--dry-run] [--yes] [--json]
604
+ blocks iam roles assignable [--json]
605
+
606
+ Permissions (/iam/v4/iam/permissions*):
607
+ blocks iam permissions list [--page] [--page-size] [--search] [--type <0-3>]
608
+ [--severity <0-4>] [--resource-group] [--tags a,b]
609
+ [--resources a,b] [--is-built-in] [--is-archived]
610
+ [--roles a,b] [--organization-id] [--filter '<json>'] [--json]
611
+ blocks iam permissions get <id> [--json]
612
+ blocks iam permissions create --name <n> [--type] [--description] [--resource]
613
+ [--resource-group] [--tags a,b] [--severity] [--is-built-in]
614
+ [--dependent-permissions a,b] [--body '<json>'|--file <path>]
615
+ [--dry-run] [--yes] [--json]
616
+ blocks iam permissions update <id> [same flags as create, plus --is-archived]
617
+ [--dry-run] [--yes] [--json]
618
+ blocks iam permissions by-severity [--json]
619
+
620
+ Resources (/iam/v4/iam/resource*):
621
+ blocks iam resources groups [--json]
622
+ blocks iam resources features [--search <text>] [--is-built-in] [--json]
623
+
624
+ Organizations (/iam/v4/iam/organizations*):
625
+ blocks iam organizations list [--page] [--page-size] [--search] [--ids a,b]
626
+ [--is-disabled] [--parent-organization-id] [--json]
627
+ blocks iam organizations get <id> [--json]
628
+ blocks iam organizations create --name <n> [--description] [--email] [--phone-number]
629
+ [--website-url] [--default-roles a,b] [--default-permissions a,b]
630
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
631
+ blocks iam organizations update <id> [--name] [--description] [--email]
632
+ [--phone-number] [--website-url] [--industry] [--time-zone]
633
+ [--currency] [--locale] [--is-enabled]
634
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
635
+ blocks iam organizations my [--json]
636
+ blocks iam organizations config get [--json]
637
+ blocks iam organizations config save [--allow-org-creation-from-cloud]
638
+ [--allow-org-creation-from-construct] [--allow-org-creation-from-signup]
639
+ [--allow-org-creation-from-portal] [--multi-org-enabled]
640
+ [--consent-for-multi-org-enable] [--body '<json>'|--file <path>]
641
+ [--dry-run] [--yes] [--json]
642
+
643
+ Signup settings (/iam/v4/iam/signup-settings):
644
+ blocks iam signup-settings get [--json]
645
+ blocks iam signup-settings save [--email-password-signup] [--sso-signup]
646
+ [--default-roles a,b] [--default-permissions a,b]
647
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
648
+
649
+ MFA (/iam/v4/mfa*, project-scoped: requires a selected project, impersonated project token only):
650
+ blocks mfa config get [--json]
651
+ Read the tenant's MFA policy.
652
+ blocks mfa config save [--enable] [--require-for-all-users] [--allow-user-opt-out]
653
+ [--allow-backup-codes] [--backup-codes-count <n>]
654
+ [--user-mfa-type 0,1] [--required-roles a,b] [--exempt-roles a,b]
655
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
656
+ Save the tenant's MFA policy.
657
+ blocks mfa totp setup [--json]
658
+ Start TOTP enrollment for the impersonated user.
659
+ blocks mfa totp verify-setup <code> [--json]
660
+ Confirm TOTP enrollment.
661
+ blocks mfa totp enable --mfa-type <n> [--code <c>] [--dry-run] [--yes] [--json]
662
+ Composed enrollment: totp setup -> (scan the printed QR/secret, enter the code --
663
+ interactively prompted if --code is omitted) -> totp verify-setup -> method set
664
+ --mfa-type <n> -> backup-codes generate. One sitting, one confirmation.
665
+ --mfa-type is required and not defaulted: the numeric value meaning "TOTP" is
666
+ tenant-defined and undocumented here (same value plain mfa method set expects) --
667
+ look it up rather than guessing.
668
+ blocks mfa generate --mfa-type <n> [--send-phone-number-as-email-domain <domain>] [--json]
669
+ Send an OTP challenge; returns an mfaId to pass to resend/verify.
670
+ blocks mfa resend <mfaId> [--send-phone-number-as-email-domain <domain>] [--json]
671
+ blocks mfa verify <mfaId> <code> --auth-type <n> [--from-token-call] [--json]
672
+ blocks mfa method set --mfa-type <n> [--json]
673
+ Switch the impersonated user's active MFA method.
674
+ blocks mfa disable [--dry-run] [--yes] [--json]
675
+ blocks mfa backup-codes list [--json]
676
+ blocks mfa backup-codes generate [--dry-run] [--yes] [--json]
677
+ blocks mfa backup-codes use <userId> <code> [--json]
678
+
679
+ Mail (/os/v4/Mail/* — project-scoped: requires a selected project, impersonated project token only):
680
+ blocks mail config list [--json]
681
+ List SMTP/inbound mail configurations for the selected project.
682
+ blocks mail config get <name> [--json]
683
+ blocks mail config save [--configuration-id <id>] [--name <n>] [--host <h>] [--port <n>]
684
+ [--enable-ssl] [--sender-name] [--sender-address] [--sender-username]
685
+ [--account-password] [--inbound] [--provider <0|1>]
686
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
687
+ Upsert: omit --configuration-id to create; pass it to update.
688
+ blocks mail config delete <configurationId> [--dry-run] [--yes] [--json]
689
+ blocks mail config duplicate <configurationId> [--dry-run] [--yes] [--json]
690
+ blocks mail template list [--page-number] [--page-size] [--search] [--sort-by] [--sort-desc]
691
+ [--configuration-id] [--language] [--json]
692
+ blocks mail template get <itemId> [--json]
693
+ blocks mail template save [--item-id <id>] [--configuration-id] [--name] [--language]
694
+ [--subject] [--template-body] [--json-content] [--image-id]
695
+ [--image-url] [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
696
+ Upsert: omit --item-id to create; pass it to update.
697
+ blocks mail template delete <itemId> [--dry-run] [--yes] [--json]
698
+ blocks mail template clone <itemId> [--configuration-id] [--language] [--name] [--subject]
699
+ [--dry-run] [--yes] [--json]
700
+ blocks mail mailbox list [--page-number] [--page-size] [--status] [--search]
701
+ [--start-date] [--end-date] [--inbound] [--json]
702
+ blocks mail mailbox get <messageId> [--json]
703
+ blocks mail send [--to a,b] [--cc a,b] [--bcc a,b] [--reply-to a,b] [--purpose <p>]
704
+ [--language <culture>] [--subject-data-context '<json>']
705
+ [--body-data-context '<json>'] [--attachments '<json>']
706
+ [--send-phone-number-as-email] [--project-key <key>]
707
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
708
+ Send an email through the tenant's default mail configuration
709
+ (/logic/v4/Mail/Send). --project-key defaults to the selected project.
710
+ blocks mail sendtoany [same flags as mail send, plus --is-test-mail]
711
+ [--dry-run] [--yes] [--json]
712
+ Same as mail send but via /logic/v4/Mail/SendToAny, which lets the mail
713
+ provider route the send (e.g. mark it --is-test-mail).
714
+
715
+ Notification (/os/v4/Notification/* — project-scoped: requires a selected project, impersonated project token only):
716
+ blocks notification list [--page] [--page-size] [--sort-by] [--sort-desc] [--filter] [--json]
717
+ blocks notification get <itemId> [--json]
718
+ blocks notification save [--name <n>] [--channel <0|1>] [--type <0-3>] [--enable-persistence]
719
+ [--notify-method] [--update] [--body '<json>'|--file <path>]
720
+ [--dry-run] [--yes] [--json]
721
+ Pass --update when saving over an existing notification configuration.
722
+ blocks notification delete <itemId> [--dry-run] [--yes] [--json]
723
+
724
+ Notifier (/logic/v4/Notifier/* — real-time/offline notification sends and inbox reads;
725
+ project-scoped: requires a selected project, impersonated project token only.
726
+ Distinct from 'notification' above, which manages notification channel
727
+ configuration, not sending):
728
+ blocks notifier notify [--user-ids a,b] [--roles a,b] [--connection-id <id>]
729
+ [--subscription-filters '<json>'] [--denormalized-payload <text>]
730
+ [--save-denormalized-payload-as-object] [--response-key]
731
+ [--response-value] [--content-available] [--configuration-name]
732
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
733
+ Push a notification to specific users/roles, or everyone matching a subscription
734
+ filter. Target with at least one of --user-ids/--roles/--subscription-filters.
735
+ blocks notifier list [--unread-only] [--page] [--page-size] [--sort-by] [--sort-desc]
736
+ [--filter] [--json]
737
+ List the signed-in user's notifications (GetNotifications). Read-only.
738
+ blocks notifier unread [--user-id <id>] [--context <c>] [--action-name <a>] [--value <v>]
739
+ [--order-by <1|2>] [--json]
740
+ Read unread notifications matching a subscription filter. Sent as query
741
+ parameters even though swagger documents this endpoint as GET with a JSON
742
+ body -- the Fetch spec forbids a body on GET. Read-only.
743
+ blocks notifier mark-read <id> [--dry-run] [--yes] [--json]
744
+ blocks notifier mark-all-read [--dry-run] [--yes] [--json]
745
+
746
+ Secrets (/os/v4/Secrets/* — project-scoped: requires a selected project, impersonated project
747
+ token only; generic tenant secret storage, e.g. captcha provider config):
748
+ blocks secrets get <secretKey> [--page-number 0] [--page-size 10] [--json]
749
+ blocks secrets save --secret-key <key> [--item-id <id>] --key-value-pairs '<json>'
750
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
751
+ Upsert: omit --item-id to create, pass it to update. --key-value-pairs is a flat
752
+ JSON object of provider-specific fields, e.g.
753
+ --key-value-pairs '{"isEnable":"true","provider":"recaptcha","captchaKey":"...","captchaSecret":"..."}'.
754
+
755
+ Storage (/os/v4/Storage/* — project-scoped: requires a selected project, impersonated project token only):
756
+ blocks storage config list [--json]
757
+ blocks storage config get <name> [--json]
758
+ blocks storage config save [--item-id <id>] [--name <n>] [--strategy] [--connection-string]
759
+ [--secret-key] [--access-key] [--region-endpoint] [--host] [--port]
760
+ [--username] [--password] [--remote-base-path] [--update]
761
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
762
+ Upsert: omit --item-id to create; pass --update to update.
763
+ blocks storage config delete <name> [--dry-run] [--yes] [--json]
764
+
765
+ Auth Admin (/iam/v4/auth/identity-providers*, /config, /client-credentials, /oidc-clients —
766
+ project-scoped: requires a selected project, impersonated project token only):
767
+ blocks auth idp list [--json]
768
+ blocks auth idp get <id> [--json]
769
+ blocks auth idp create --provider <p> --provider-type <t> --protocol <proto>
770
+ --client-id <id> [--client-secret] [--display-name] [--issuer]
771
+ [--scope] [--redirect-uris a,b] [--active]
772
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
773
+ Rich provider configs (JWKS, private keys, initial roles, etc.) go in --body/--file;
774
+ the flags above cover the common OAuth/OIDC fields.
775
+ blocks auth idp update <id> [same flags as create, all optional] [--dry-run] [--yes] [--json]
776
+ provider/providerType/protocol/clientId are immutable: omit them, or echo the
777
+ existing values exactly if you also pass --body/--file.
778
+ blocks auth idp delete <id> [--dry-run] [--yes] [--json]
779
+ Irreversible; also deletes the related OIDC client registration.
780
+ blocks auth idp status <id> --active|--active=false [--dry-run] [--yes] [--json]
781
+ Enable/disable a provider without deleting its configuration.
782
+ blocks auth config get [--json]
783
+ blocks auth config save [--refresh-token-minutes] [--absolute-refresh-token-minutes]
784
+ [--access-token-minutes] [--remember-me-refresh-token-minutes]
785
+ [--wrong-attempts-to-lock] [--account-lock-duration-minutes]
786
+ [--oidc-enabled] [--logout-on-password-change]
787
+ [--password-strength-regex] [--body '<json>'|--file <path>]
788
+ [--dry-run] [--yes] [--json]
789
+ blocks auth client-credentials list [--json]
790
+ clientSecret is included in list responses; treat CLI output as sensitive.
791
+ blocks auth client-credentials save --name <n> [--item-id <id>] [--roles a,b]
792
+ [--permissions a,b] [--access-token-valid-minutes] [--active]
793
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
794
+ Omit --item-id to create; pass it to update. The response's clientSecret is
795
+ shown once and is not retrievable again afterward.
796
+ blocks auth client-credentials delete <id> [--dry-run] [--yes] [--json]
797
+
798
+ blocks auth oidc-clients list [--json]
799
+ List registered OAuth 2.0 / OIDC client applications for the tenant. client_secret
800
+ is excluded from list/get responses.
801
+ blocks auth oidc-clients get <clientId> [--json]
802
+ blocks auth oidc-clients save [--item-id <id>] [--client-display-name] [--client-type]
803
+ [--redirect-uris a,b] [--post-logout-redirect-uris a,b]
804
+ [--scope] [--allowed-scopes a,b] [--allowed-response-types a,b]
805
+ [--require-pkce] [--require-consent] [--require-mfa]
806
+ [--allowed-mfa-methods 0,1] [--front-channel-logout-uri]
807
+ [--back-channel-logout-uri] [--auto-redirect]
808
+ [--external-discovery-endpoint] [--active] [--login-mode]
809
+ [--client-logo-url] [--client-brand-color] [--use-tokens-cookie]
810
+ [--register-as-identity-provider] [--device-flow-client]
811
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
812
+ Upsert: omit --item-id to register a new client, pass it to update an existing one.
813
+ The response's client_secret is shown once and is not retrievable again afterward.
814
+ blocks auth oidc-clients delete <clientId> [--dry-run] [--yes] [--json]
815
+ Irreversible; revokes all tokens issued to the client.
816
+ blocks auth oidc-clients rotate-secret <clientId> [--dry-run] [--yes] [--json]
817
+ Generates a new client_secret, shown once; the old secret stops working immediately.
818
+
819
+ Data:
820
+ blocks data validate [--json]
821
+ Validate local blocks/data/schemas/*.json and blocks/data/rules.json before
822
+ pushing. Local-only.
823
+
824
+ blocks data schema list [--json]
825
+ List project schemas via /data/v4/schemas using an impersonated project
826
+ token. Read-only.
827
+
828
+ blocks data schema pull [--json]
829
+ Download project schemas into blocks/data/schemas/*.json. Writes local files
830
+ only.
831
+
832
+ blocks data schema push [--dry-run] [--yes] [--json]
833
+ Create or update project schemas via /data/v4/schemas/define. Mutating;
834
+ uses POST for create and PUT for update.
835
+
836
+ blocks data rules pull [--json]
837
+ Download data-access policies into blocks/data/rules.json. Writes local
838
+ files only.
839
+
840
+ blocks data rules deploy [--dry-run] [--yes] [--json]
841
+ Apply schema security and data-access policies. Mutating; supports dry-run
842
+ and confirmation.
843
+
844
+ blocks data reload [--dry-run] [--yes] [--json]
845
+ Reload Data schema configuration so staged schema/rule changes become live.
846
+ Mutating; calls POST /data/v4/schema-configurations/reload.
847
+
848
+ blocks data sync [--dry-run] [--yes] [--json]
849
+ Composed flow: validate local schemas/rules, then data schema push ->
850
+ data rules deploy -> data reload, so pushed changes actually go live in one
851
+ step. Validation runs first and hard-fails before anything is sent if it
852
+ finds errors. Prints 3 separate step outputs (one per underlying command),
853
+ not one combined document. One confirmation covers the whole flow.
854
+
855
+ Data source configuration (/data/v4/configurations) - check this first; by default a
856
+ project's Data Gateway runs on Blocks-managed storage and data config get is all you need.
857
+ Only create/update a configuration if you're pointing the gateway at your own database.
858
+ blocks data config get [--json]
859
+ blocks data config create --connection-string <cs> [--database-name <name>]
860
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
861
+ blocks data config update --item-id <id> [--connection-string] [--database-name]
862
+ [--collection-name-editable] [--collection-name-pattern]
863
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
864
+
865
+ Raw Schema API (/data/v4/schemas* - beyond the file-oriented list/pull/push above):
866
+ blocks data schema get <id> [--json]
867
+ blocks data schema get-by-name <schemaName> [--json]
868
+ Full field-level detail by collection name (info-by-name).
869
+ blocks data schema aggregation [--keyword] [--schema-name] [--collection-name]
870
+ [--schema-type <1|2>] [--page] [--page-size] [--sort-by]
871
+ [--sort-desc] [--json]
872
+ Schemas plus an access-level summary (Public/User/Custom x Read/Write/Edit/Delete).
873
+ blocks data schema change-logs [--json]
874
+ Unadapted schema change logs; data reload clears these.
875
+ blocks data schema delete <id> [--dry-run] [--yes] [--json]
876
+ Irreversible.
877
+ blocks data schema info list [--json]
878
+ Entity-type schema collections with basic info.
879
+ blocks data schema info save --schema-name <n> [--collection-name] [--schema-type <1|2>]
880
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
881
+ Create schema metadata only (no fields yet) - pair with data schema fields.
882
+ blocks data schema info update --item-id <id> [--schema-name] [--collection-name]
883
+ [--schema-type <1|2>] [--body '<json>'|--file <path>]
884
+ [--dry-run] [--yes] [--json]
885
+ blocks data schema fields --schema-id <schemaDefinitionItemId> [--deletable-fields a,b]
886
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
887
+ Add/update field definitions; the 'fields' array (name/type/isArray/isPIIData/
888
+ isUniqueData/description) goes in --body/--file, e.g.
889
+ --body '{"fields":[{"name":"email","type":"string"}]}'.
890
+
891
+ Data-access policies, single-item ops (beyond the file-oriented rules pull/deploy above):
892
+ blocks data rules policy get <schemaName> [--json]
893
+ blocks data rules policy delete <itemId> [--dry-run] [--yes] [--json]
894
+
895
+ Data validation (/data/v4/data-validations* - field-level validation rules; no file-oriented
896
+ workflow exists for this yet, use these directly):
897
+ blocks data validation list [--schema-id] [--field-name] [--keyword] [--page]
898
+ [--page-size] [--sort-by] [--sort-desc] [--json]
899
+ blocks data validation get <validationId> [--json]
900
+ blocks data validation by-schema <schemaId> [--json]
901
+ blocks data validation by-schema-field <schemaId> <fieldName> [--json]
902
+ blocks data validation save --schema-id <id> --field-name <name> [--item-id]
903
+ --body '<json>' (must include a "validations" array, e.g.
904
+ '{"validations":[{"type":1,"value":"^[0-9]+$","isActive":true}]}')
905
+ [--dry-run] [--yes] [--json]
906
+ Upsert: omit --item-id to create, pass it to update.
907
+ blocks data validation delete <validationId> [--dry-run] [--yes] [--json]
908
+
909
+ Storage object tree (files, directories, discovery, trash, versions, and access):
910
+ blocks data files get <fileId> [--version] [--configuration-name] [--json]
911
+ blocks data files get-many <fileId...>|--file-ids a,b [--configuration-name] [--json]
912
+ blocks data files info [--name] [--tenant-id] [--page] [--page-size] [--sort-by]
913
+ [--sort-desc] [--json]
914
+ blocks data files upload --file <localPath> [--name] [--item-id] [--parent-id] [--tags]
915
+ [--access-modifier Public|Private] [--content-type]
916
+ [--configuration-name] [--module-name <1-11>] [--local-storage]
917
+ [--dry-run] [--yes] [--json]
918
+ Cloud: create file/version metadata, then PUT bytes to the returned URL. Local:
919
+ one multipart request. The file appears in the object tree without registration.
920
+ blocks data files presigned-upload-url --name <fileName> [--item-id] [--parent-directory-id]
921
+ [--access-modifier Public|Private] [--configuration-name]
922
+ [--module-name <1-11>] [--meta-data] [--tags]
923
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
924
+ Mutating cloud step 1: creates metadata/version and returns uploadUrl/fileId.
925
+ blocks data files upload-to-url --url <presignedUrl> --file <localPath>
926
+ --content-type <type> [--blob-type BlockBlob] [--no-blob-type-header]
927
+ [--dry-run] [--yes] [--json]
928
+ Step 2. Provider-direct PUT - no Blocks auth headers by design.
929
+ blocks data files upload-to-local-storage --file <localPath> [--name] [--item-id]
930
+ [--parent-directory-id] [--tags] [--access-modifier Public|Private]
931
+ [--configuration-name] [--meta-data] [--additional-properties '<json>']
932
+ [--dry-run] [--yes] [--json]
933
+ One-call alternative to the two commands above, for local-storage-backed projects.
934
+ blocks data files update-additional-info <itemId> --additional-properties '<json>'
935
+ [--dry-run] [--yes] [--json]
936
+ blocks data files delete <fileId> [--configuration-name] [--event-queue-name]
937
+ [--permanent]
938
+ [--dry-run] [--yes] [--json]
939
+ Defaults to moving the file to trash; --permanent removes bytes and metadata.
940
+ blocks data files list [--parent-id] [--module-name <1-11>] [--type directory|file]
941
+ [--search] [--cursor] [--limit 1-200] [--json]
942
+ blocks data files search <query> [--directory-id] [--type directory|file]
943
+ [--cursor] [--limit 1-200] [--json]
944
+ blocks data files trash|shared [--type directory|file] [--cursor] [--limit] [--json]
945
+ blocks data files restore <resourceId> [--dry-run] [--yes] [--json]
946
+ blocks data files purge <resourceId> [--dry-run] [--yes] [--json]
947
+ blocks data files directory-create <name> [--parent-id] [--module-name]
948
+ [--description] [--allowed-extensions pdf,docx]
949
+ [--dry-run] [--yes] [--json]
950
+ blocks data files directory-get <directoryId> [--json]
951
+ blocks data files directory-update <directoryId> [--name] [--description]
952
+ [--dry-run] [--yes] [--json]
953
+ blocks data files directory-delete <directoryId> [--permanent]
954
+ [--dry-run] [--yes] [--json]
955
+ blocks data files directory-move <directoryId> [--target-directory-id]
956
+ [--dry-run] [--yes] [--json]
957
+ blocks data files versions <fileId> [--cursor] [--limit 1-100] [--json]
958
+ blocks data files create-version <fileId> [--configuration-name]
959
+ [--dry-run] [--yes] [--json]
960
+ blocks data files copy <fileId> --target-directory-id <id> [--copy-access-policies]
961
+ [--dry-run] [--yes] [--json]
962
+ blocks data files move <fileId> --target-directory-id <id> [--dry-run] [--yes] [--json]
963
+ blocks data files rename <fileId> --name <name> [--dry-run] [--yes] [--json]
964
+ blocks data files access-list|access-resolve <resourceId> [--json]
965
+ blocks data files access-grant <resourceId> --resource-type Directory|File
966
+ --principal-type User|Role|Everyone|Organization
967
+ [--principal-id] --permission View|Download|Edit|Delete|Manage|Owner
968
+ [--effect Allow|Deny] [--priority] [--expires-at]
969
+ [--dry-run] [--yes] [--json]
970
+ blocks data files access-update <resourceId> --policy-id <id> <same policy flags>
971
+ blocks data files access-revoke <resourceId> --policy-id <id> [--dry-run] [--yes] [--json]
972
+ blocks data files inheritance <resourceId> --enabled=true|false [--dry-run] [--yes] [--json]
973
+ blocks data files share <resourceId> --resource-type <type> --principal-type <type>
974
+ [--principal-id] --permission <permission> [--expires-at]
975
+ [--dry-run] [--yes] [--json]
976
+
977
+ Localization:
978
+ blocks localization validate --module <name> --language <culture> [--file <path>] [--json]
979
+ Validate a local i18n JSON dictionary. Supports nested JSON input and
980
+ validates the flattened key/value set locally.
981
+
982
+ blocks localization push --module <name> --language <culture> [--file <path>] [--route <route>] [--context <text>] [--dry-run] [--yes] [--json]
983
+ Create or update Localization keys from a local i18n JSON dictionary via
984
+ /localization/v4/Key/SaveKeys. Creates the module first when it is missing.
985
+
986
+ blocks localization pull --module <name> --language <culture> [--out <path>] [--json]
987
+ Download published cloud localization via
988
+ /localization/v4/Key/GetCloudUilmFile and write a local JSON dictionary.
989
+
990
+ Raw API (/localization/v4/* project-scoped: requires a selected project, impersonated
991
+ project token only). These call the Localization service endpoints directly,
992
+ in addition to the file-oriented validate/push/pull commands above.
993
+
994
+ blocks localization assistant translation-suggestion --source-text <text>
995
+ --destination-language <culture> [--current-language]
996
+ [--element-type] [--element-application-context]
997
+ [--element-detail-context] [--temperature] [--max-character-length]
998
+ [--glossary-ids a,b] [--module-id] [--destination-language-code]
999
+ [--body '<json>'|--file <path>] [--json]
1000
+
1001
+ blocks localization config get-webhook [--json]
1002
+ blocks localization config save-webhook --url <url> --content-type <type>
1003
+ --secret <s> --header-key <k> [--item-id <id>] [--is-disabled]
1004
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
1005
+
1006
+ blocks localization glossary save --name <n> [--item-id] [--language] [--type]
1007
+ [--context] [--additional-note] [--is-global] [--module-ids a,b]
1008
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
1009
+ blocks localization glossary list [--search] [--page-number] [--page-size]
1010
+ [--is-global] [--module-id] [--json]
1011
+ blocks localization glossary get <itemId> [--json]
1012
+ blocks localization glossary suggested <itemId> [--max-results <n>] [--json]
1013
+ blocks localization glossary delete <itemId> [--dry-run] [--yes] [--json]
1014
+
1015
+ blocks localization key save --key-name <n> --module-id <id> [--item-id] [--value]
1016
+ [--culture] [--routes a,b] [--glossary-ids a,b] [--context]
1017
+ [--is-new-key] [--is-partially-translated] [--should-publish]
1018
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
1019
+ blocks localization key list [--key-search-text] [--search-key] [--module-ids a,b]
1020
+ [--page-number] [--page-size] [--sort-by] [--sort-desc]
1021
+ [--is-partially-translated] [--missing-languages a,b]
1022
+ [--create-date-start] [--create-date-end]
1023
+ [--last-update-date-start] [--last-update-date-end]
1024
+ [--glossary-id] [--body '<json>'|--file <path>] [--json]
1025
+ blocks localization key get-by-names <keyName...>|--key-names a,b [--module-id] [--json]
1026
+ blocks localization key get <itemId> [--json]
1027
+ blocks localization key delete <itemId> [--dry-run] [--yes] [--json]
1028
+ blocks localization key delete-keys <itemId...>|--item-ids a,b [--dry-run] [--yes] [--json]
1029
+ blocks localization key get-timeline [--entity-id] [--user-id] [--page-number]
1030
+ [--page-size] [--sort-by] [--sort-desc] [--create-date-start]
1031
+ [--create-date-end] [--json]
1032
+ blocks localization key get-localization-timeline [--user-id] [--log-from]
1033
+ [--log-from-values a,b] [--exclude-log-from-values a,b]
1034
+ [--page-number] [--page-size] [--sort-by] [--sort-desc]
1035
+ [--create-date-start] [--create-date-end] [--json]
1036
+ blocks localization key get-timeline-by-operation-id <operationId> [--page-number]
1037
+ [--page-size] [--json]
1038
+ blocks localization key get-uilm-file --module <name> --language <culture> [--json]
1039
+ blocks localization key generate-uilm-file --module-id <id> [--guid]
1040
+ [--dry-run] [--yes] [--json]
1041
+ blocks localization key translate-all --module-id <id> [--default-language]
1042
+ [--message-co-relation-id] [--dry-run] [--yes] [--json]
1043
+ blocks localization key translate-key <keyId> --default-language <culture>
1044
+ [--message-co-relation-id] [--dry-run] [--yes] [--json]
1045
+ blocks localization key translate-keys <keyId...>|--key-ids a,b --default-language <culture>
1046
+ [--message-co-relation-id] [--project-key]
1047
+ [--dry-run] [--yes] [--json]
1048
+ blocks localization key translate-and-export --module-id <id> [--default-language]
1049
+ [--wait] [--poll-interval <seconds>] [--timeout <seconds>]
1050
+ [--guid] [--output-type <0-5>] [--app-ids a,b] [--languages a,b]
1051
+ [--reference-file-id] [--caller-tenant-id] [--start-date]
1052
+ [--end-date] [--dry-run] [--yes] [--json]
1053
+ Composed flow: translate-all -> generate-uilm-file -> uilm-export. Without --wait,
1054
+ fires all 3 back to back (same as running them by hand). With --wait, polls
1055
+ GetTimelineByOperationId (using a generated messageCoRelationId) between translate
1056
+ and generate, since translation runs async and there's no documented explicit
1057
+ "done" field to check -- it stops once the timeline entry count settles across 2
1058
+ polls, or times out with a clear next-step message. Prints one output block per
1059
+ step, not a single combined document.
1060
+ blocks localization key uilm-import <fileId> [--message-co-relation-id]
1061
+ [--dry-run] [--yes] [--json]
1062
+ blocks localization key uilm-export [--output-type <0-5>] [--app-ids a,b] [--languages a,b]
1063
+ [--reference-file-id] [--caller-tenant-id] [--start-date]
1064
+ [--end-date] [--message-co-relation-id] [--dry-run] [--yes] [--json]
1065
+ blocks localization key get-uilm-exported-files [--search] [--page-number] [--page-size]
1066
+ [--create-date-start] [--create-date-end] [--json]
1067
+ blocks localization key get-language-file-generation-history [--page-number]
1068
+ [--page-size] [--json]
1069
+ blocks localization key rollback <itemId> [--dry-run] [--yes] [--json]
1070
+
1071
+ blocks localization language save --language-name <n> --language-code <c> [--item-id]
1072
+ [--is-default] [--body '<json>'|--file <path>]
1073
+ [--dry-run] [--yes] [--json]
1074
+ blocks localization language list [--json]
1075
+ blocks localization language list-for-tenant [--json]
1076
+ blocks localization language delete <languageName> [--dry-run] [--yes] [--json]
1077
+ blocks localization language set-default <languageName> [--dry-run] [--yes] [--json]
1078
+
1079
+ blocks localization module save --module-name <n> [--item-id]
1080
+ [--body '<json>'|--file <path>] [--dry-run] [--yes] [--json]
1081
+ blocks localization module list [--json]
1082
+ blocks localization module list-for-tenant [--json]
1083
+ blocks localization module tag-glossary <moduleId> --glossary-ids a,b
1084
+ [--dry-run] [--yes] [--json]
1085
+
1086
+ Release:
1087
+ blocks release deploy [--domain <customDomain>] [--wait] [--poll-interval <seconds>]
1088
+ [--timeout <seconds>] [--dry-run] [--yes] [--json]
1089
+ Deploy the selected project's environment. Resolves everything from state
1090
+ you already have: the repo linked to this project (Project/GetAsset) and
1091
+ that repo's connected branch (Build/repo-details) -- no --repo-id needed.
1092
+ Aborts if the connected branch doesn't match this environment's name.
1093
+ Pass --domain to also set the custom deployment domain before deploying.
1094
+ Pass --wait to poll release status on the resulting build until it reaches
1095
+ a terminal state (or --timeout elapses, default 900s) instead of returning
1096
+ immediately with just a build id.
1097
+ Mutating; no artifact upload is performed by this CLI.
1098
+
1099
+ blocks release status <buildId> [--json]
1100
+ Read Release build status by build id using an impersonated project
1101
+ token. Read-only.
1102
+
1103
+ blocks release builds list [repoId] [--repo-id <repoId>] [--json]
1104
+ List Release build details for a repository using an impersonated project
1105
+ token. When repoId is omitted, resolves it from the selected project's
1106
+ linked repo assets (Project/GetAsset, account token) -- auto-picked if
1107
+ there's exactly one, otherwise you're prompted to choose. Read-only.
1108
+
1109
+ blocks release builds get <buildId> [--json]
1110
+ Alias for release status. Read-only.
1111
+
1112
+ Scaffold:
1113
+ blocks new web <name> [--app-domain <domain>] [--client-id <oidcClientId>]
1114
+ [--x-blocks-key <tenantId>] [--blocks-api-url <url>] [--oidc-url <url>]
1115
+ Create a Vite React starter app that talks to Blocks exclusively through
1116
+ @seliseblocks/client (a single createBlocksClient() instance) using the SDK
1117
+ hosted IdP flow: blocksClient.auth.idp.redirectToProvider() on login click
1118
+ and blocksClient.auth.idp.callback() on /login/callback. Includes route
1119
+ guards, auto-refresh through auth.oidc.refreshToken(), live
1120
+ auth/iam/data/localization SDK examples, environment config, and safe
1121
+ .gitignore defaults.
1122
+ Uses the selected project (see 'use') unless --x-blocks-key overrides it.
1123
+ --app-domain and --client-id are resolved from the project when omitted:
1124
+ if the project has one domain it's used automatically, otherwise you're
1125
+ prompted to choose; the OIDC client is picked from a list of the
1126
+ project's existing clients, or you can create a minimal one (display
1127
+ name + redirect URI, active, registered as a Blocks OIDC identity
1128
+ provider) on the spot, or skip and register one later from the portal or
1129
+ 'auth oidc-clients save'.
1092
1130
  If --blocks-api-url is omitted, it is derived from the app domain:
1093
1131
  https://blocksapi.<registrable-domain> (for example, app domain
1094
1132
  https://dqrsf.slsblx.com uses https://blocksapi.slsblx.com). Pass a
1095
1133
  different Data/IAM/Localization/OS gateway URL explicitly only if your
1096
1134
  project uses a non-default one.
1097
- --oidc-url defaults to https://iam.seliseblocks.com.
1098
-
1099
- Skills:
1100
- blocks skill list [--json]
1101
- List bundled blocks-skills/*/SKILL.md agent context docs (name +
1102
- description). Local-only, no cloud calls.
1103
- blocks skill show <name> [--json]
1104
- Print one skill's full SKILL.md content.
1105
- blocks skill add <name> [--dir <path>]
1106
- Copy a bundled skill's SKILL.md into <path>/<name>/SKILL.md in the
1107
- current directory (default --dir is 'blocks-skills'), for use in a
1108
- project outside this monorepo. Overwrites silently, same as
1109
- 'data schema pull'.
1110
-
1111
- SDK:
1112
- blocks sdk client [--app-domain <domain>] [--client-id <oidcClientId>]
1113
- [--x-blocks-key <tenantId>] [--blocks-api-url <url>] [--oidc-url <url>] [--json]
1135
+ --oidc-url defaults to https://iam.seliseblocks.com.
1136
+
1137
+ Skills:
1138
+ blocks skill list [--json]
1139
+ List bundled blocks-skills/*/SKILL.md agent context docs (name +
1140
+ description). Local-only, no cloud calls.
1141
+ blocks skill show <name> [--json]
1142
+ Print one skill's full SKILL.md content.
1143
+ blocks skill add <name> [--dir <path>]
1144
+ Copy a bundled skill's SKILL.md into <path>/<name>/SKILL.md in the
1145
+ current directory (default --dir is 'blocks-skills'), for use in a
1146
+ project outside this monorepo. Overwrites silently, same as
1147
+ 'data schema pull'.
1148
+
1149
+ SDK:
1150
+ blocks sdk client [--app-domain <domain>] [--client-id <oidcClientId>]
1151
+ [--x-blocks-key <tenantId>] [--blocks-api-url <url>] [--oidc-url <url>] [--json]
1114
1152
  Read-only: "I want to use the Blocks SDK -- show me the client." Resolves this
1115
1153
  project's @seliseblocks/client config using the selected project unless
1116
1154
  --x-blocks-key overrides it, and the project's registered domain/OIDC client
1117
1155
  when --app-domain/--client-id are omitted. Its API URL defaults to
1118
1156
  https://api.seliseblocks.com unless --blocks-api-url is passed.
1119
1157
  Prints a ready-to-paste createBlocksClient(...) snippet.
1120
- Passing both --app-domain and --client-id skips the project lookup entirely
1121
- (no login required). Never writes a file; to scaffold a new app use 'new web'.
1158
+ Passing both --app-domain and --client-id skips the project lookup entirely
1159
+ (no login required). Never writes a file; to scaffold a new app use 'new web'.
1122
1160
  `);
1123
1161
  }