@sanity/cli 8.12.0 → 8.13.1

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.
@@ -1301,13 +1301,22 @@
1301
1301
  },
1302
1302
  "undeploy": {
1303
1303
  "aliases": [],
1304
- "args": {},
1304
+ "args": {
1305
+ "appId": {
1306
+ "description": "ID of the application to undeploy. Overrides `deployment.appId` in sanity.cli.ts",
1307
+ "name": "appId"
1308
+ }
1309
+ },
1305
1310
  "description": "Removes the deployed Sanity Studio/App from Sanity hosting",
1306
1311
  "examples": [
1307
1312
  {
1308
1313
  "command": "<%= config.bin %> <%= command.id %>",
1309
1314
  "description": "Undeploy the studio or application after confirming"
1310
1315
  },
1316
+ {
1317
+ "command": "<%= config.bin %> <%= command.id %> abc123",
1318
+ "description": "Undeploy the studio or application with the given ID"
1319
+ },
1311
1320
  {
1312
1321
  "command": "<%= config.bin %> <%= command.id %> --dry-run",
1313
1322
  "description": "Report what would be undeployed without deleting anything"
@@ -2544,96 +2553,50 @@
2544
2553
  "list.js"
2545
2554
  ]
2546
2555
  },
2547
- "documents:create": {
2556
+ "context:build": {
2548
2557
  "aliases": [],
2549
2558
  "args": {
2550
- "file": {
2551
- "description": "JSON file to create document(s) from",
2552
- "name": "file",
2553
- "required": false
2559
+ "knowledgeBaseId": {
2560
+ "description": "Knowledge base ID",
2561
+ "name": "knowledgeBaseId",
2562
+ "required": true
2554
2563
  }
2555
2564
  },
2556
- "description": "Create one or more documents",
2565
+ "description": "Build a knowledge base from its imported content",
2557
2566
  "examples": [
2558
2567
  {
2559
- "command": "<%= config.bin %> <%= command.id %> myDocument.json",
2560
- "description": "Create the document specified in \"myDocument.json\""
2561
- },
2562
- {
2563
- "command": "<%= config.bin %> <%= command.id %>",
2564
- "description": "Open configured $EDITOR and create the specified document(s)"
2565
- },
2566
- {
2567
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
2568
- "description": "Fetch document with the ID \"myDocId\" and open configured $EDITOR with the current document content (if any). Replace document with the edited version when the editor closes"
2568
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2569
+ "description": "Start a build and return the job ID"
2569
2570
  },
2570
2571
  {
2571
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
2572
- "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
2572
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --watch",
2573
+ "description": "Start a build and wait for it to finish (non-zero exit on failure)"
2573
2574
  },
2574
2575
  {
2575
- "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
2576
- "description": "Create documents in a specific project"
2576
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
2577
+ "description": "Cancel the running build, if any"
2577
2578
  }
2578
2579
  ],
2579
2580
  "flags": {
2580
- "project-id": {
2581
- "char": "p",
2582
- "description": "Project ID to create document(s) in (overrides CLI configuration)",
2583
- "helpGroup": "OVERRIDE",
2584
- "name": "project-id",
2585
- "hasDynamicHelp": false,
2586
- "helpValue": "<id>",
2587
- "multiple": false,
2588
- "type": "option"
2589
- },
2590
- "dataset": {
2591
- "char": "d",
2592
- "description": "Dataset to create document(s) in (overrides CLI configuration)",
2593
- "helpGroup": "OVERRIDE",
2594
- "name": "dataset",
2595
- "hasDynamicHelp": false,
2596
- "helpValue": "<name>",
2597
- "multiple": false,
2598
- "type": "option"
2599
- },
2600
- "id": {
2601
- "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
2602
- "name": "id",
2603
- "hasDynamicHelp": false,
2604
- "multiple": false,
2605
- "type": "option"
2606
- },
2607
- "json5": {
2608
- "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
2609
- "name": "json5",
2610
- "allowNo": false,
2611
- "type": "boolean"
2612
- },
2613
- "missing": {
2614
- "description": "On duplicate document IDs, don't modify the target document(s)",
2615
- "name": "missing",
2616
- "allowNo": false,
2617
- "type": "boolean"
2618
- },
2619
- "replace": {
2620
- "description": "On duplicate document IDs, replace existing document with specified document(s)",
2621
- "name": "replace",
2581
+ "cancel": {
2582
+ "description": "Cancel the running build instead of starting one",
2583
+ "exclusive": [
2584
+ "watch"
2585
+ ],
2586
+ "name": "cancel",
2622
2587
  "allowNo": false,
2623
2588
  "type": "boolean"
2624
2589
  },
2625
2590
  "watch": {
2626
- "description": "Write the documents whenever the target file or buffer changes",
2591
+ "description": "Wait for the build to finish, exiting non-zero if it fails",
2627
2592
  "name": "watch",
2628
2593
  "allowNo": false,
2629
2594
  "type": "boolean"
2630
2595
  }
2631
2596
  },
2632
2597
  "hasDynamicHelp": false,
2633
- "hiddenAliases": [
2634
- "document:create"
2635
- ],
2636
- "id": "documents:create",
2598
+ "hiddenAliases": [],
2599
+ "id": "context:build",
2637
2600
  "pluginAlias": "@sanity/cli",
2638
2601
  "pluginName": "@sanity/cli",
2639
2602
  "pluginType": "core",
@@ -2642,147 +2605,112 @@
2642
2605
  "relativePath": [
2643
2606
  "dist",
2644
2607
  "commands",
2645
- "documents",
2646
- "create.js"
2608
+ "context",
2609
+ "build.js"
2647
2610
  ]
2648
2611
  },
2649
- "documents:delete": {
2612
+ "context:create": {
2650
2613
  "aliases": [],
2651
- "args": {
2652
- "id": {
2653
- "description": "Document ID to delete",
2654
- "name": "id",
2655
- "required": true
2656
- },
2657
- "ids": {
2658
- "description": "Additional document IDs to delete",
2659
- "name": "ids",
2660
- "required": false
2661
- }
2662
- },
2663
- "description": "Delete one or more documents from the project's configured dataset",
2614
+ "args": {},
2615
+ "description": "Create a knowledge base",
2664
2616
  "examples": [
2665
2617
  {
2666
- "command": "<%= config.bin %> <%= command.id %> myDocId",
2667
- "description": "Delete the document with the ID \"myDocId\""
2668
- },
2669
- {
2670
- "command": "<%= config.bin %> <%= command.id %> 'myDocId'",
2671
- "description": "ID wrapped in double or single quote works equally well"
2672
- },
2673
- {
2674
- "command": "<%= config.bin %> <%= command.id %> --dataset=blog someDocId",
2675
- "description": "Delete document with ID \"someDocId\" from dataset \"blog\""
2676
- },
2677
- {
2678
- "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
2679
- "description": "Delete the document with ID \"doc1\" and \"doc2\""
2618
+ "command": "<%= config.bin %> <%= command.id %>",
2619
+ "description": "Interactively create a knowledge base"
2680
2620
  },
2681
2621
  {
2682
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
2683
- "description": "Delete a document from a specific project"
2622
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --title \"Support docs\" --description \"Product docs and troubleshooting guides\"",
2623
+ "description": "Create a knowledge base in a specific organization"
2684
2624
  }
2685
2625
  ],
2686
2626
  "flags": {
2687
- "project-id": {
2688
- "char": "p",
2689
- "description": "Project ID to delete from (overrides CLI configuration)",
2627
+ "organization": {
2628
+ "description": "Organization to create the knowledge base in (overrides CLI configuration)",
2690
2629
  "helpGroup": "OVERRIDE",
2691
- "name": "project-id",
2630
+ "name": "organization",
2692
2631
  "hasDynamicHelp": false,
2693
2632
  "helpValue": "<id>",
2694
2633
  "multiple": false,
2695
2634
  "type": "option"
2696
2635
  },
2697
- "dataset": {
2698
- "char": "d",
2699
- "description": "Dataset to delete from (overrides CLI configuration)",
2700
- "helpGroup": "OVERRIDE",
2701
- "name": "dataset",
2636
+ "description": {
2637
+ "description": "Knowledge base description",
2638
+ "name": "description",
2639
+ "hasDynamicHelp": false,
2640
+ "multiple": false,
2641
+ "type": "option"
2642
+ },
2643
+ "title": {
2644
+ "description": "Knowledge base title",
2645
+ "name": "title",
2702
2646
  "hasDynamicHelp": false,
2703
- "helpValue": "<name>",
2704
2647
  "multiple": false,
2705
2648
  "type": "option"
2706
2649
  }
2707
2650
  },
2708
2651
  "hasDynamicHelp": false,
2709
- "hiddenAliases": [
2710
- "document:delete"
2711
- ],
2712
- "id": "documents:delete",
2652
+ "hiddenAliases": [],
2653
+ "id": "context:create",
2713
2654
  "pluginAlias": "@sanity/cli",
2714
2655
  "pluginName": "@sanity/cli",
2715
2656
  "pluginType": "core",
2716
- "strict": false,
2657
+ "strict": true,
2658
+ "telemetry": {
2659
+ "redactedFlags": [
2660
+ {
2661
+ "canonical": "--title",
2662
+ "flags": [
2663
+ "--title"
2664
+ ]
2665
+ },
2666
+ {
2667
+ "canonical": "--description",
2668
+ "flags": [
2669
+ "--description"
2670
+ ]
2671
+ }
2672
+ ]
2673
+ },
2717
2674
  "isESM": true,
2718
2675
  "relativePath": [
2719
2676
  "dist",
2720
2677
  "commands",
2721
- "documents",
2722
- "delete.js"
2678
+ "context",
2679
+ "create.js"
2723
2680
  ]
2724
2681
  },
2725
- "documents:get": {
2682
+ "context:delete": {
2726
2683
  "aliases": [],
2727
2684
  "args": {
2728
- "documentId": {
2729
- "description": "Document ID to retrieve",
2730
- "name": "documentId",
2685
+ "knowledgeBaseId": {
2686
+ "description": "Knowledge base ID",
2687
+ "name": "knowledgeBaseId",
2731
2688
  "required": true
2732
2689
  }
2733
2690
  },
2734
- "description": "Get and print a document by ID",
2691
+ "description": "Delete a knowledge base and its generated content",
2735
2692
  "examples": [
2736
2693
  {
2737
- "command": "<%= config.bin %> <%= command.id %> myDocId",
2738
- "description": "Get the document with ID \"myDocId\""
2739
- },
2740
- {
2741
- "command": "<%= config.bin %> <%= command.id %> myDocId --pretty",
2742
- "description": "Get document with colorized JSON output"
2743
- },
2744
- {
2745
- "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
2746
- "description": "Get document from a specific dataset"
2694
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2695
+ "description": "Delete a knowledge base after confirmation"
2747
2696
  },
2748
2697
  {
2749
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
2750
- "description": "Get a document from a specific project"
2698
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
2699
+ "description": "Delete a knowledge base without confirmation prompt"
2751
2700
  }
2752
2701
  ],
2753
2702
  "flags": {
2754
- "project-id": {
2755
- "char": "p",
2756
- "description": "Project ID to get document from (overrides CLI configuration)",
2757
- "helpGroup": "OVERRIDE",
2758
- "name": "project-id",
2759
- "hasDynamicHelp": false,
2760
- "helpValue": "<id>",
2761
- "multiple": false,
2762
- "type": "option"
2763
- },
2764
- "dataset": {
2765
- "char": "d",
2766
- "description": "Dataset to get document from (overrides CLI configuration)",
2767
- "helpGroup": "OVERRIDE",
2768
- "name": "dataset",
2769
- "hasDynamicHelp": false,
2770
- "helpValue": "<name>",
2771
- "multiple": false,
2772
- "type": "option"
2773
- },
2774
- "pretty": {
2775
- "description": "Colorize JSON output",
2776
- "name": "pretty",
2703
+ "yes": {
2704
+ "char": "y",
2705
+ "description": "Skip confirmation prompt (unattended mode)",
2706
+ "name": "yes",
2777
2707
  "allowNo": false,
2778
2708
  "type": "boolean"
2779
2709
  }
2780
2710
  },
2781
2711
  "hasDynamicHelp": false,
2782
- "hiddenAliases": [
2783
- "document:get"
2784
- ],
2785
- "id": "documents:get",
2712
+ "hiddenAliases": [],
2713
+ "id": "context:delete",
2786
2714
  "pluginAlias": "@sanity/cli",
2787
2715
  "pluginName": "@sanity/cli",
2788
2716
  "pluginType": "core",
@@ -2791,95 +2719,339 @@
2791
2719
  "relativePath": [
2792
2720
  "dist",
2793
2721
  "commands",
2794
- "documents",
2795
- "get.js"
2722
+ "context",
2723
+ "delete.js"
2796
2724
  ]
2797
2725
  },
2798
- "documents:query": {
2726
+ "context:get": {
2799
2727
  "aliases": [],
2800
2728
  "args": {
2801
- "query": {
2802
- "description": "GROQ query to run against the dataset",
2803
- "name": "query",
2804
- "required": true
2729
+ "knowledgeBaseId": {
2730
+ "description": "Knowledge base ID",
2731
+ "name": "knowledgeBaseId",
2732
+ "required": true
2805
2733
  }
2806
2734
  },
2807
- "description": "Query for documents",
2735
+ "description": "Get details of a knowledge base",
2808
2736
  "examples": [
2809
2737
  {
2810
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"][0..4]'",
2811
- "description": "Fetch 5 documents of type \"movie\""
2738
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2739
+ "description": "Get details of a specific knowledge base"
2812
2740
  },
2813
2741
  {
2814
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"]|order(releaseDate asc)[0]{title}' --dataset staging",
2815
- "description": "Fetch title of the oldest movie in the dataset named \"staging\""
2742
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
2743
+ "description": "Output the knowledge base as JSON"
2744
+ }
2745
+ ],
2746
+ "flags": {
2747
+ "json": {
2748
+ "description": "Output the knowledge base in JSON format",
2749
+ "name": "json",
2750
+ "allowNo": false,
2751
+ "type": "boolean"
2752
+ }
2753
+ },
2754
+ "hasDynamicHelp": false,
2755
+ "hiddenAliases": [],
2756
+ "id": "context:get",
2757
+ "pluginAlias": "@sanity/cli",
2758
+ "pluginName": "@sanity/cli",
2759
+ "pluginType": "core",
2760
+ "strict": true,
2761
+ "isESM": true,
2762
+ "relativePath": [
2763
+ "dist",
2764
+ "commands",
2765
+ "context",
2766
+ "get.js"
2767
+ ]
2768
+ },
2769
+ "context:list": {
2770
+ "aliases": [],
2771
+ "args": {},
2772
+ "description": "List knowledge bases in an organization",
2773
+ "examples": [
2774
+ {
2775
+ "command": "<%= config.bin %> <%= command.id %>",
2776
+ "description": "List knowledge bases, selecting the organization interactively"
2816
2777
  },
2817
2778
  {
2818
- "command": "<%= config.bin %> <%= command.id %> '*[_id == \"header\"] { \"headerText\": pt::text(body) }' --api-version v2021-06-07",
2819
- "description": "Use API version v2021-06-07 and do a query"
2779
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
2780
+ "description": "List knowledge bases in a specific organization"
2820
2781
  },
2821
2782
  {
2822
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
2823
- "description": "Query documents in a specific project and dataset"
2783
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2784
+ "description": "Output knowledge bases as JSON"
2824
2785
  }
2825
2786
  ],
2826
2787
  "flags": {
2827
- "project-id": {
2828
- "char": "p",
2829
- "description": "Project ID to query (overrides CLI configuration)",
2788
+ "organization": {
2789
+ "description": "Organization to list knowledge bases for (overrides CLI configuration)",
2830
2790
  "helpGroup": "OVERRIDE",
2831
- "name": "project-id",
2791
+ "name": "organization",
2832
2792
  "hasDynamicHelp": false,
2833
2793
  "helpValue": "<id>",
2834
2794
  "multiple": false,
2835
2795
  "type": "option"
2836
2796
  },
2837
- "dataset": {
2838
- "char": "d",
2839
- "description": "Dataset to query (overrides CLI configuration)",
2840
- "helpGroup": "OVERRIDE",
2841
- "name": "dataset",
2797
+ "json": {
2798
+ "description": "Output knowledge bases in JSON format",
2799
+ "name": "json",
2800
+ "allowNo": false,
2801
+ "type": "boolean"
2802
+ }
2803
+ },
2804
+ "hasDynamicHelp": false,
2805
+ "hiddenAliases": [],
2806
+ "id": "context:list",
2807
+ "pluginAlias": "@sanity/cli",
2808
+ "pluginName": "@sanity/cli",
2809
+ "pluginType": "core",
2810
+ "strict": true,
2811
+ "isESM": true,
2812
+ "relativePath": [
2813
+ "dist",
2814
+ "commands",
2815
+ "context",
2816
+ "list.js"
2817
+ ]
2818
+ },
2819
+ "context:refresh": {
2820
+ "aliases": [],
2821
+ "args": {
2822
+ "knowledgeBaseId": {
2823
+ "description": "Knowledge base ID",
2824
+ "name": "knowledgeBaseId",
2825
+ "required": true
2826
+ }
2827
+ },
2828
+ "description": "Refresh a knowledge base: re-check sources and apply what changed",
2829
+ "examples": [
2830
+ {
2831
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2832
+ "description": "Start an incremental refresh"
2833
+ }
2834
+ ],
2835
+ "flags": {},
2836
+ "hasDynamicHelp": false,
2837
+ "hiddenAliases": [],
2838
+ "id": "context:refresh",
2839
+ "pluginAlias": "@sanity/cli",
2840
+ "pluginName": "@sanity/cli",
2841
+ "pluginType": "core",
2842
+ "strict": true,
2843
+ "isESM": true,
2844
+ "relativePath": [
2845
+ "dist",
2846
+ "commands",
2847
+ "context",
2848
+ "refresh.js"
2849
+ ]
2850
+ },
2851
+ "context:update": {
2852
+ "aliases": [],
2853
+ "args": {
2854
+ "knowledgeBaseId": {
2855
+ "description": "Knowledge base ID",
2856
+ "name": "knowledgeBaseId",
2857
+ "required": true
2858
+ }
2859
+ },
2860
+ "description": "Update a knowledge base",
2861
+ "examples": [
2862
+ {
2863
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2864
+ "description": "Rename a knowledge base"
2865
+ },
2866
+ {
2867
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2868
+ "description": "Enable weekly scheduled refresh"
2869
+ },
2870
+ {
2871
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2872
+ "description": "Disable scheduled refresh"
2873
+ }
2874
+ ],
2875
+ "flags": {
2876
+ "description": {
2877
+ "description": "New knowledge base description",
2878
+ "name": "description",
2879
+ "required": false,
2842
2880
  "hasDynamicHelp": false,
2843
- "helpValue": "<name>",
2844
2881
  "multiple": false,
2845
2882
  "type": "option"
2846
2883
  },
2847
- "anonymous": {
2848
- "description": "Send the query without any authorization token",
2849
- "name": "anonymous",
2850
- "allowNo": false,
2884
+ "refresh-enabled": {
2885
+ "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2886
+ "name": "refresh-enabled",
2887
+ "required": false,
2888
+ "allowNo": true,
2851
2889
  "type": "boolean"
2852
2890
  },
2853
- "api-version": {
2854
- "description": "API version to use (defaults to 2025-08-15)",
2855
- "name": "api-version",
2891
+ "refresh-frequency": {
2892
+ "description": "How often scheduled refresh runs",
2893
+ "name": "refresh-frequency",
2894
+ "required": false,
2856
2895
  "hasDynamicHelp": false,
2857
2896
  "multiple": false,
2897
+ "options": [
2898
+ "weekly",
2899
+ "monthly"
2900
+ ],
2858
2901
  "type": "option"
2859
2902
  },
2860
- "pretty": {
2861
- "description": "Colorize JSON output",
2862
- "name": "pretty",
2903
+ "title": {
2904
+ "description": "New knowledge base title",
2905
+ "name": "title",
2906
+ "required": false,
2907
+ "hasDynamicHelp": false,
2908
+ "multiple": false,
2909
+ "type": "option"
2910
+ }
2911
+ },
2912
+ "hasDynamicHelp": false,
2913
+ "hiddenAliases": [],
2914
+ "id": "context:update",
2915
+ "pluginAlias": "@sanity/cli",
2916
+ "pluginName": "@sanity/cli",
2917
+ "pluginType": "core",
2918
+ "strict": true,
2919
+ "telemetry": {
2920
+ "redactedFlags": [
2921
+ {
2922
+ "canonical": "--title",
2923
+ "flags": [
2924
+ "--title"
2925
+ ]
2926
+ },
2927
+ {
2928
+ "canonical": "--description",
2929
+ "flags": [
2930
+ "--description"
2931
+ ]
2932
+ }
2933
+ ]
2934
+ },
2935
+ "isESM": true,
2936
+ "relativePath": [
2937
+ "dist",
2938
+ "commands",
2939
+ "context",
2940
+ "update.js"
2941
+ ]
2942
+ },
2943
+ "docs:browse": {
2944
+ "aliases": [],
2945
+ "args": {},
2946
+ "description": "Open Sanity docs in your browser",
2947
+ "flags": {},
2948
+ "hasDynamicHelp": false,
2949
+ "hiddenAliases": [],
2950
+ "id": "docs:browse",
2951
+ "pluginAlias": "@sanity/cli",
2952
+ "pluginName": "@sanity/cli",
2953
+ "pluginType": "core",
2954
+ "strict": true,
2955
+ "enableJsonFlag": false,
2956
+ "isESM": true,
2957
+ "relativePath": [
2958
+ "dist",
2959
+ "commands",
2960
+ "docs",
2961
+ "browse.js"
2962
+ ]
2963
+ },
2964
+ "docs:read": {
2965
+ "aliases": [],
2966
+ "args": {
2967
+ "path": {
2968
+ "description": "Path or URL to article, found in search results and docs content as links",
2969
+ "name": "path",
2970
+ "required": true
2971
+ }
2972
+ },
2973
+ "description": "Read an article in terminal",
2974
+ "examples": [
2975
+ {
2976
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2977
+ "description": "Read as markdown in terminal"
2978
+ },
2979
+ {
2980
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2981
+ "description": "Read using full URL"
2982
+ },
2983
+ {
2984
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2985
+ "description": "Open in web browser"
2986
+ },
2987
+ {
2988
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2989
+ "description": "Open using full URL in web browser"
2990
+ }
2991
+ ],
2992
+ "flags": {
2993
+ "web": {
2994
+ "aliases": [
2995
+ "w"
2996
+ ],
2997
+ "description": "Open in a web browser",
2998
+ "name": "web",
2863
2999
  "allowNo": false,
2864
3000
  "type": "boolean"
3001
+ }
3002
+ },
3003
+ "hasDynamicHelp": false,
3004
+ "hiddenAliases": [],
3005
+ "id": "docs:read",
3006
+ "pluginAlias": "@sanity/cli",
3007
+ "pluginName": "@sanity/cli",
3008
+ "pluginType": "core",
3009
+ "strict": true,
3010
+ "isESM": true,
3011
+ "relativePath": [
3012
+ "dist",
3013
+ "commands",
3014
+ "docs",
3015
+ "read.js"
3016
+ ]
3017
+ },
3018
+ "docs:search": {
3019
+ "aliases": [],
3020
+ "args": {
3021
+ "query": {
3022
+ "description": "Search query for documentation",
3023
+ "name": "query",
3024
+ "required": true
3025
+ }
3026
+ },
3027
+ "description": "Search Sanity docs",
3028
+ "examples": [
3029
+ {
3030
+ "command": "<%= config.bin %> <%= command.id %> schema",
3031
+ "description": "Search for documentation about schemas"
2865
3032
  },
2866
- "project": {
2867
- "deprecated": {
2868
- "to": "project-id"
2869
- },
2870
- "description": "Project ID to query",
2871
- "hidden": true,
2872
- "name": "project",
3033
+ {
3034
+ "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3035
+ "description": "Search with phrase"
3036
+ },
3037
+ {
3038
+ "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3039
+ "description": "Limit search results"
3040
+ }
3041
+ ],
3042
+ "flags": {
3043
+ "limit": {
3044
+ "description": "Maximum number of results to return",
3045
+ "name": "limit",
3046
+ "default": 10,
2873
3047
  "hasDynamicHelp": false,
2874
3048
  "multiple": false,
2875
3049
  "type": "option"
2876
3050
  }
2877
3051
  },
2878
3052
  "hasDynamicHelp": false,
2879
- "hiddenAliases": [
2880
- "document:query"
2881
- ],
2882
- "id": "documents:query",
3053
+ "hiddenAliases": [],
3054
+ "id": "docs:search",
2883
3055
  "pluginAlias": "@sanity/cli",
2884
3056
  "pluginName": "@sanity/cli",
2885
3057
  "pluginType": "core",
@@ -2888,40 +3060,47 @@
2888
3060
  "relativePath": [
2889
3061
  "dist",
2890
3062
  "commands",
2891
- "documents",
2892
- "query.js"
3063
+ "docs",
3064
+ "search.js"
2893
3065
  ]
2894
3066
  },
2895
- "documents:validate": {
3067
+ "documents:create": {
2896
3068
  "aliases": [],
2897
- "args": {},
2898
- "description": "Validate documents in a dataset against the studio schema",
3069
+ "args": {
3070
+ "file": {
3071
+ "description": "JSON file to create document(s) from",
3072
+ "name": "file",
3073
+ "required": false
3074
+ }
3075
+ },
3076
+ "description": "Create one or more documents",
2899
3077
  "examples": [
2900
3078
  {
2901
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
2902
- "description": "Validates all documents in a Sanity project with more than one workspace"
3079
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json",
3080
+ "description": "Create the document specified in \"myDocument.json\""
2903
3081
  },
2904
3082
  {
2905
- "command": "<%= config.bin %> <%= command.id %> --workspace default --dataset staging",
2906
- "description": "Override the dataset specified in the workspace"
3083
+ "command": "<%= config.bin %> <%= command.id %>",
3084
+ "description": "Open configured $EDITOR and create the specified document(s)"
2907
3085
  },
2908
3086
  {
2909
- "command": "<%= config.bin %> <%= command.id %> --yes > report.txt",
2910
- "description": "Save the results of the report into a file"
3087
+ "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
3088
+ "description": "Fetch document with the ID \"myDocId\" and open configured $EDITOR with the current document content (if any). Replace document with the edited version when the editor closes"
2911
3089
  },
2912
3090
  {
2913
- "command": "<%= config.bin %> <%= command.id %> --level info",
2914
- "description": "Report out info level validation markers too"
3091
+ "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
3092
+ "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
2915
3093
  },
2916
3094
  {
2917
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2918
- "description": "Validate documents in a specific project and dataset"
3095
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
3096
+ "description": "Create documents in a specific project"
2919
3097
  }
2920
3098
  ],
2921
3099
  "flags": {
2922
3100
  "project-id": {
2923
3101
  "char": "p",
2924
- "description": "Override the project ID used. By default, this is derived from the given workspace",
3102
+ "description": "Project ID to create document(s) in (overrides CLI configuration)",
3103
+ "helpGroup": "OVERRIDE",
2925
3104
  "name": "project-id",
2926
3105
  "hasDynamicHelp": false,
2927
3106
  "helpValue": "<id>",
@@ -2930,81 +3109,51 @@
2930
3109
  },
2931
3110
  "dataset": {
2932
3111
  "char": "d",
2933
- "description": "Override the dataset used. By default, this is derived from the given workspace",
3112
+ "description": "Dataset to create document(s) in (overrides CLI configuration)",
3113
+ "helpGroup": "OVERRIDE",
2934
3114
  "name": "dataset",
2935
3115
  "hasDynamicHelp": false,
2936
3116
  "helpValue": "<name>",
2937
3117
  "multiple": false,
2938
3118
  "type": "option"
2939
3119
  },
2940
- "file": {
2941
- "description": "Path to an NDJSON file or tar archive containing an NDJSON file (optionally gzip-compressed)",
2942
- "name": "file",
2943
- "hasDynamicHelp": false,
2944
- "multiple": false,
2945
- "type": "option"
2946
- },
2947
- "format": {
2948
- "description": "The output format used to print the found validation markers and report progress",
2949
- "name": "format",
2950
- "hasDynamicHelp": false,
2951
- "multiple": false,
2952
- "options": [
2953
- "json",
2954
- "ndjson",
2955
- "pretty"
2956
- ],
2957
- "type": "option"
2958
- },
2959
- "level": {
2960
- "description": "The minimum level reported. Defaults to warning",
2961
- "name": "level",
2962
- "default": "warning",
2963
- "hasDynamicHelp": false,
2964
- "multiple": false,
2965
- "options": [
2966
- "error",
2967
- "warning",
2968
- "info"
2969
- ],
2970
- "type": "option"
2971
- },
2972
- "max-custom-validation-concurrency": {
2973
- "description": "Specify how many custom validators can run concurrently",
2974
- "name": "max-custom-validation-concurrency",
2975
- "default": 5,
2976
- "hasDynamicHelp": false,
2977
- "multiple": false,
2978
- "type": "option"
2979
- },
2980
- "max-fetch-concurrency": {
2981
- "description": "Specify how many `client.fetch` requests are allowed to run concurrently",
2982
- "name": "max-fetch-concurrency",
2983
- "default": 25,
2984
- "hasDynamicHelp": false,
2985
- "multiple": false,
2986
- "type": "option"
2987
- },
2988
- "workspace": {
2989
- "description": "The name of the workspace to use when downloading and validating all documents",
2990
- "name": "workspace",
3120
+ "id": {
3121
+ "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
3122
+ "name": "id",
2991
3123
  "hasDynamicHelp": false,
2992
3124
  "multiple": false,
2993
3125
  "type": "option"
2994
3126
  },
2995
- "yes": {
2996
- "char": "y",
2997
- "description": "Skips the first confirmation prompt",
2998
- "name": "yes",
3127
+ "json5": {
3128
+ "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
3129
+ "name": "json5",
3130
+ "allowNo": false,
3131
+ "type": "boolean"
3132
+ },
3133
+ "missing": {
3134
+ "description": "On duplicate document IDs, don't modify the target document(s)",
3135
+ "name": "missing",
3136
+ "allowNo": false,
3137
+ "type": "boolean"
3138
+ },
3139
+ "replace": {
3140
+ "description": "On duplicate document IDs, replace existing document with specified document(s)",
3141
+ "name": "replace",
3142
+ "allowNo": false,
3143
+ "type": "boolean"
3144
+ },
3145
+ "watch": {
3146
+ "description": "Write the documents whenever the target file or buffer changes",
3147
+ "name": "watch",
2999
3148
  "allowNo": false,
3000
3149
  "type": "boolean"
3001
3150
  }
3002
3151
  },
3003
3152
  "hasDynamicHelp": false,
3004
3153
  "hiddenAliases": [
3005
- "document:validate"
3154
+ "document:create"
3006
3155
  ],
3007
- "id": "documents:validate",
3156
+ "id": "documents:create",
3008
3157
  "pluginAlias": "@sanity/cli",
3009
3158
  "pluginName": "@sanity/cli",
3010
3159
  "pluginType": "core",
@@ -3014,142 +3163,146 @@
3014
3163
  "dist",
3015
3164
  "commands",
3016
3165
  "documents",
3017
- "validate.js"
3166
+ "create.js"
3018
3167
  ]
3019
3168
  },
3020
- "graphql:deploy": {
3169
+ "documents:delete": {
3021
3170
  "aliases": [],
3022
- "args": {},
3023
- "description": "Deploy a GraphQL API from the current Sanity schema",
3171
+ "args": {
3172
+ "id": {
3173
+ "description": "Document ID to delete",
3174
+ "name": "id",
3175
+ "required": true
3176
+ },
3177
+ "ids": {
3178
+ "description": "Additional document IDs to delete",
3179
+ "name": "ids",
3180
+ "required": false
3181
+ }
3182
+ },
3183
+ "description": "Delete one or more documents from the project's configured dataset",
3024
3184
  "examples": [
3025
3185
  {
3026
- "command": "<%= config.bin %> <%= command.id %>",
3027
- "description": "Deploy all defined GraphQL APIs"
3186
+ "command": "<%= config.bin %> <%= command.id %> myDocId",
3187
+ "description": "Delete the document with the ID \"myDocId\""
3028
3188
  },
3029
3189
  {
3030
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
3031
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
3190
+ "command": "<%= config.bin %> <%= command.id %> 'myDocId'",
3191
+ "description": "ID wrapped in double or single quote works equally well"
3032
3192
  },
3033
3193
  {
3034
- "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
3035
- "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
3194
+ "command": "<%= config.bin %> <%= command.id %> --dataset=blog someDocId",
3195
+ "description": "Delete document with ID \"someDocId\" from dataset \"blog\""
3036
3196
  },
3037
3197
  {
3038
- "command": "<%= config.bin %> <%= command.id %> --playground",
3039
- "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
3198
+ "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
3199
+ "description": "Delete the document with ID \"doc1\" and \"doc2\""
3200
+ },
3201
+ {
3202
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
3203
+ "description": "Delete a document from a specific project"
3040
3204
  }
3041
3205
  ],
3042
3206
  "flags": {
3043
- "api": {
3044
- "description": "Only deploy API with this ID (can be specified multiple times)",
3045
- "name": "api",
3207
+ "project-id": {
3208
+ "char": "p",
3209
+ "description": "Project ID to delete from (overrides CLI configuration)",
3210
+ "helpGroup": "OVERRIDE",
3211
+ "name": "project-id",
3046
3212
  "hasDynamicHelp": false,
3047
- "multiple": true,
3213
+ "helpValue": "<id>",
3214
+ "multiple": false,
3048
3215
  "type": "option"
3049
3216
  },
3050
3217
  "dataset": {
3051
3218
  "char": "d",
3052
- "description": "Deploy API for the given dataset",
3219
+ "description": "Dataset to delete from (overrides CLI configuration)",
3220
+ "helpGroup": "OVERRIDE",
3053
3221
  "name": "dataset",
3054
3222
  "hasDynamicHelp": false,
3055
3223
  "helpValue": "<name>",
3056
3224
  "multiple": false,
3057
3225
  "type": "option"
3058
- },
3059
- "dry-run": {
3060
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
3061
- "name": "dry-run",
3062
- "allowNo": false,
3063
- "type": "boolean"
3064
- },
3065
- "force": {
3066
- "description": "Deploy API without confirming breaking changes",
3067
- "name": "force",
3068
- "allowNo": false,
3069
- "type": "boolean"
3070
- },
3071
- "generation": {
3072
- "description": "API generation to deploy (defaults to \"gen3\")",
3073
- "name": "generation",
3074
- "hasDynamicHelp": false,
3075
- "multiple": false,
3076
- "options": [
3077
- "gen1",
3078
- "gen2",
3079
- "gen3"
3080
- ],
3081
- "type": "option"
3082
- },
3083
- "non-null-document-fields": {
3084
- "description": "Use non-null document fields (_id, _type etc)",
3085
- "name": "non-null-document-fields",
3086
- "allowNo": false,
3087
- "type": "boolean"
3088
- },
3089
- "playground": {
3090
- "description": "Enable GraphQL playground for easier debugging",
3091
- "name": "playground",
3092
- "allowNo": true,
3093
- "type": "boolean"
3094
- },
3095
- "tag": {
3096
- "description": "Deploy API(s) to given tag (defaults to \"default\")",
3097
- "name": "tag",
3098
- "hasDynamicHelp": false,
3099
- "multiple": false,
3100
- "type": "option"
3101
- },
3102
- "with-union-cache": {
3103
- "description": "Cache union types (faster for schemas with many self-references)",
3104
- "name": "with-union-cache",
3105
- "allowNo": false,
3106
- "type": "boolean"
3107
3226
  }
3108
3227
  },
3109
3228
  "hasDynamicHelp": false,
3110
- "hiddenAliases": [],
3111
- "id": "graphql:deploy",
3229
+ "hiddenAliases": [
3230
+ "document:delete"
3231
+ ],
3232
+ "id": "documents:delete",
3112
3233
  "pluginAlias": "@sanity/cli",
3113
3234
  "pluginName": "@sanity/cli",
3114
3235
  "pluginType": "core",
3115
- "strict": true,
3236
+ "strict": false,
3116
3237
  "isESM": true,
3117
3238
  "relativePath": [
3118
3239
  "dist",
3119
3240
  "commands",
3120
- "graphql",
3121
- "deploy.js"
3241
+ "documents",
3242
+ "delete.js"
3122
3243
  ]
3123
3244
  },
3124
- "graphql:list": {
3245
+ "documents:get": {
3125
3246
  "aliases": [],
3126
- "args": {},
3127
- "description": "List deployed GraphQL endpoints for the project",
3247
+ "args": {
3248
+ "documentId": {
3249
+ "description": "Document ID to retrieve",
3250
+ "name": "documentId",
3251
+ "required": true
3252
+ }
3253
+ },
3254
+ "description": "Get and print a document by ID",
3128
3255
  "examples": [
3129
3256
  {
3130
- "command": "<%= config.bin %> <%= command.id %>",
3131
- "description": "List GraphQL endpoints for the project"
3257
+ "command": "<%= config.bin %> <%= command.id %> myDocId",
3258
+ "description": "Get the document with ID \"myDocId\""
3132
3259
  },
3133
3260
  {
3134
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3135
- "description": "List GraphQL endpoints for a specific project"
3261
+ "command": "<%= config.bin %> <%= command.id %> myDocId --pretty",
3262
+ "description": "Get document with colorized JSON output"
3263
+ },
3264
+ {
3265
+ "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
3266
+ "description": "Get document from a specific dataset"
3267
+ },
3268
+ {
3269
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
3270
+ "description": "Get a document from a specific project"
3136
3271
  }
3137
3272
  ],
3138
3273
  "flags": {
3139
3274
  "project-id": {
3140
3275
  "char": "p",
3141
- "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
3276
+ "description": "Project ID to get document from (overrides CLI configuration)",
3142
3277
  "helpGroup": "OVERRIDE",
3143
3278
  "name": "project-id",
3144
3279
  "hasDynamicHelp": false,
3145
3280
  "helpValue": "<id>",
3146
3281
  "multiple": false,
3147
3282
  "type": "option"
3283
+ },
3284
+ "dataset": {
3285
+ "char": "d",
3286
+ "description": "Dataset to get document from (overrides CLI configuration)",
3287
+ "helpGroup": "OVERRIDE",
3288
+ "name": "dataset",
3289
+ "hasDynamicHelp": false,
3290
+ "helpValue": "<name>",
3291
+ "multiple": false,
3292
+ "type": "option"
3293
+ },
3294
+ "pretty": {
3295
+ "description": "Colorize JSON output",
3296
+ "name": "pretty",
3297
+ "allowNo": false,
3298
+ "type": "boolean"
3148
3299
  }
3149
3300
  },
3150
3301
  "hasDynamicHelp": false,
3151
- "hiddenAliases": [],
3152
- "id": "graphql:list",
3302
+ "hiddenAliases": [
3303
+ "document:get"
3304
+ ],
3305
+ "id": "documents:get",
3153
3306
  "pluginAlias": "@sanity/cli",
3154
3307
  "pluginName": "@sanity/cli",
3155
3308
  "pluginType": "core",
@@ -3158,66 +3311,52 @@
3158
3311
  "relativePath": [
3159
3312
  "dist",
3160
3313
  "commands",
3161
- "graphql",
3162
- "list.js"
3314
+ "documents",
3315
+ "get.js"
3163
3316
  ]
3164
3317
  },
3165
- "graphql:undeploy": {
3318
+ "documents:query": {
3166
3319
  "aliases": [],
3167
- "args": {},
3168
- "description": "Remove a deployed GraphQL API",
3320
+ "args": {
3321
+ "query": {
3322
+ "description": "GROQ query to run against the dataset",
3323
+ "name": "query",
3324
+ "required": true
3325
+ }
3326
+ },
3327
+ "description": "Query for documents",
3169
3328
  "examples": [
3170
3329
  {
3171
- "command": "<%= config.bin %> <%= command.id %>",
3172
- "description": "Undeploy GraphQL API for current project and dataset"
3173
- },
3174
- {
3175
- "command": "<%= config.bin %> <%= command.id %> --api ios",
3176
- "description": "Undeploy API with ID \"ios\""
3177
- },
3178
- {
3179
- "command": "<%= config.bin %> <%= command.id %> --dataset staging",
3180
- "description": "Undeploy GraphQL API for staging dataset"
3330
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"][0..4]'",
3331
+ "description": "Fetch 5 documents of type \"movie\""
3181
3332
  },
3182
3333
  {
3183
- "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
3184
- "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
3334
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"]|order(releaseDate asc)[0]{title}' --dataset staging",
3335
+ "description": "Fetch title of the oldest movie in the dataset named \"staging\""
3185
3336
  },
3186
3337
  {
3187
- "command": "<%= config.bin %> <%= command.id %> --force",
3188
- "description": "Undeploy GraphQL API without confirmation prompt"
3338
+ "command": "<%= config.bin %> <%= command.id %> '*[_id == \"header\"] { \"headerText\": pt::text(body) }' --api-version v2021-06-07",
3339
+ "description": "Use API version v2021-06-07 and do a query"
3189
3340
  },
3190
3341
  {
3191
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3192
- "description": "Undeploy GraphQL API for a specific project and dataset"
3342
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
3343
+ "description": "Query documents in a specific project and dataset"
3193
3344
  }
3194
3345
  ],
3195
3346
  "flags": {
3196
- "project-id": {
3197
- "char": "p",
3198
- "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
3199
- "helpGroup": "OVERRIDE",
3200
- "name": "project-id",
3201
- "hasDynamicHelp": false,
3202
- "helpValue": "<id>",
3203
- "multiple": false,
3204
- "type": "option"
3205
- },
3206
- "api": {
3207
- "description": "Undeploy API with this ID",
3208
- "exclusive": [
3209
- "project-id",
3210
- "project"
3211
- ],
3212
- "name": "api",
3213
- "required": false,
3347
+ "project-id": {
3348
+ "char": "p",
3349
+ "description": "Project ID to query (overrides CLI configuration)",
3350
+ "helpGroup": "OVERRIDE",
3351
+ "name": "project-id",
3214
3352
  "hasDynamicHelp": false,
3353
+ "helpValue": "<id>",
3215
3354
  "multiple": false,
3216
3355
  "type": "option"
3217
3356
  },
3218
3357
  "dataset": {
3219
3358
  "char": "d",
3220
- "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
3359
+ "description": "Dataset to query (overrides CLI configuration)",
3221
3360
  "helpGroup": "OVERRIDE",
3222
3361
  "name": "dataset",
3223
3362
  "hasDynamicHelp": false,
@@ -3225,9 +3364,22 @@
3225
3364
  "multiple": false,
3226
3365
  "type": "option"
3227
3366
  },
3228
- "force": {
3229
- "description": "Skip confirmation prompt",
3230
- "name": "force",
3367
+ "anonymous": {
3368
+ "description": "Send the query without any authorization token",
3369
+ "name": "anonymous",
3370
+ "allowNo": false,
3371
+ "type": "boolean"
3372
+ },
3373
+ "api-version": {
3374
+ "description": "API version to use (defaults to 2025-08-15)",
3375
+ "name": "api-version",
3376
+ "hasDynamicHelp": false,
3377
+ "multiple": false,
3378
+ "type": "option"
3379
+ },
3380
+ "pretty": {
3381
+ "description": "Colorize JSON output",
3382
+ "name": "pretty",
3231
3383
  "allowNo": false,
3232
3384
  "type": "boolean"
3233
3385
  },
@@ -3235,27 +3387,19 @@
3235
3387
  "deprecated": {
3236
3388
  "to": "project-id"
3237
3389
  },
3238
- "description": "Project ID to delete GraphQL API for",
3390
+ "description": "Project ID to query",
3239
3391
  "hidden": true,
3240
3392
  "name": "project",
3241
- "required": false,
3242
- "hasDynamicHelp": false,
3243
- "multiple": false,
3244
- "type": "option"
3245
- },
3246
- "tag": {
3247
- "description": "Tag to undeploy GraphQL API from",
3248
- "name": "tag",
3249
- "required": false,
3250
- "default": "default",
3251
3393
  "hasDynamicHelp": false,
3252
3394
  "multiple": false,
3253
3395
  "type": "option"
3254
3396
  }
3255
3397
  },
3256
3398
  "hasDynamicHelp": false,
3257
- "hiddenAliases": [],
3258
- "id": "graphql:undeploy",
3399
+ "hiddenAliases": [
3400
+ "document:query"
3401
+ ],
3402
+ "id": "documents:query",
3259
3403
  "pluginAlias": "@sanity/cli",
3260
3404
  "pluginName": "@sanity/cli",
3261
3405
  "pluginType": "core",
@@ -3264,47 +3408,123 @@
3264
3408
  "relativePath": [
3265
3409
  "dist",
3266
3410
  "commands",
3267
- "graphql",
3268
- "undeploy.js"
3411
+ "documents",
3412
+ "query.js"
3269
3413
  ]
3270
3414
  },
3271
- "hooks:attempt": {
3415
+ "documents:validate": {
3272
3416
  "aliases": [],
3273
- "args": {
3274
- "attemptId": {
3275
- "description": "The delivery attempt ID to get details for",
3276
- "name": "attemptId",
3277
- "required": true
3278
- }
3279
- },
3280
- "description": "Print details of a given webhook delivery attempt",
3417
+ "args": {},
3418
+ "description": "Validate documents in a dataset against the studio schema",
3281
3419
  "examples": [
3282
3420
  {
3283
- "command": "<%= config.bin %> <%= command.id %> abc123",
3284
- "description": "Print details of webhook delivery attempt with ID abc123"
3421
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
3422
+ "description": "Validates all documents in a Sanity project with more than one workspace"
3285
3423
  },
3286
3424
  {
3287
- "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
3288
- "description": "Get attempt details for a specific project"
3425
+ "command": "<%= config.bin %> <%= command.id %> --workspace default --dataset staging",
3426
+ "description": "Override the dataset specified in the workspace"
3427
+ },
3428
+ {
3429
+ "command": "<%= config.bin %> <%= command.id %> --yes > report.txt",
3430
+ "description": "Save the results of the report into a file"
3431
+ },
3432
+ {
3433
+ "command": "<%= config.bin %> <%= command.id %> --level info",
3434
+ "description": "Report out info level validation markers too"
3435
+ },
3436
+ {
3437
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3438
+ "description": "Validate documents in a specific project and dataset"
3289
3439
  }
3290
3440
  ],
3291
3441
  "flags": {
3292
3442
  "project-id": {
3293
3443
  "char": "p",
3294
- "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
3295
- "helpGroup": "OVERRIDE",
3444
+ "description": "Override the project ID used. By default, this is derived from the given workspace",
3296
3445
  "name": "project-id",
3297
3446
  "hasDynamicHelp": false,
3298
3447
  "helpValue": "<id>",
3299
3448
  "multiple": false,
3300
3449
  "type": "option"
3450
+ },
3451
+ "dataset": {
3452
+ "char": "d",
3453
+ "description": "Override the dataset used. By default, this is derived from the given workspace",
3454
+ "name": "dataset",
3455
+ "hasDynamicHelp": false,
3456
+ "helpValue": "<name>",
3457
+ "multiple": false,
3458
+ "type": "option"
3459
+ },
3460
+ "file": {
3461
+ "description": "Path to an NDJSON file or tar archive containing an NDJSON file (optionally gzip-compressed)",
3462
+ "name": "file",
3463
+ "hasDynamicHelp": false,
3464
+ "multiple": false,
3465
+ "type": "option"
3466
+ },
3467
+ "format": {
3468
+ "description": "The output format used to print the found validation markers and report progress",
3469
+ "name": "format",
3470
+ "hasDynamicHelp": false,
3471
+ "multiple": false,
3472
+ "options": [
3473
+ "json",
3474
+ "ndjson",
3475
+ "pretty"
3476
+ ],
3477
+ "type": "option"
3478
+ },
3479
+ "level": {
3480
+ "description": "The minimum level reported. Defaults to warning",
3481
+ "name": "level",
3482
+ "default": "warning",
3483
+ "hasDynamicHelp": false,
3484
+ "multiple": false,
3485
+ "options": [
3486
+ "error",
3487
+ "warning",
3488
+ "info"
3489
+ ],
3490
+ "type": "option"
3491
+ },
3492
+ "max-custom-validation-concurrency": {
3493
+ "description": "Specify how many custom validators can run concurrently",
3494
+ "name": "max-custom-validation-concurrency",
3495
+ "default": 5,
3496
+ "hasDynamicHelp": false,
3497
+ "multiple": false,
3498
+ "type": "option"
3499
+ },
3500
+ "max-fetch-concurrency": {
3501
+ "description": "Specify how many `client.fetch` requests are allowed to run concurrently",
3502
+ "name": "max-fetch-concurrency",
3503
+ "default": 25,
3504
+ "hasDynamicHelp": false,
3505
+ "multiple": false,
3506
+ "type": "option"
3507
+ },
3508
+ "workspace": {
3509
+ "description": "The name of the workspace to use when downloading and validating all documents",
3510
+ "name": "workspace",
3511
+ "hasDynamicHelp": false,
3512
+ "multiple": false,
3513
+ "type": "option"
3514
+ },
3515
+ "yes": {
3516
+ "char": "y",
3517
+ "description": "Skips the first confirmation prompt",
3518
+ "name": "yes",
3519
+ "allowNo": false,
3520
+ "type": "boolean"
3301
3521
  }
3302
3522
  },
3303
3523
  "hasDynamicHelp": false,
3304
3524
  "hiddenAliases": [
3305
- "hook:attempt"
3525
+ "document:validate"
3306
3526
  ],
3307
- "id": "hooks:attempt",
3527
+ "id": "documents:validate",
3308
3528
  "pluginAlias": "@sanity/cli",
3309
3529
  "pluginName": "@sanity/cli",
3310
3530
  "pluginType": "core",
@@ -3313,94 +3533,102 @@
3313
3533
  "relativePath": [
3314
3534
  "dist",
3315
3535
  "commands",
3316
- "hooks",
3317
- "attempt.js"
3536
+ "documents",
3537
+ "validate.js"
3318
3538
  ]
3319
3539
  },
3320
- "hooks:create": {
3540
+ "graphql:deploy": {
3321
3541
  "aliases": [],
3322
3542
  "args": {},
3323
- "description": "Create a new webhook for the project",
3543
+ "description": "Deploy a GraphQL API from the current Sanity schema",
3324
3544
  "examples": [
3325
3545
  {
3326
3546
  "command": "<%= config.bin %> <%= command.id %>",
3327
- "description": "Create a new webhook for the project"
3547
+ "description": "Deploy all defined GraphQL APIs"
3328
3548
  },
3329
3549
  {
3330
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3331
- "description": "Create a webhook for a specific project"
3550
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
3551
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
3552
+ },
3553
+ {
3554
+ "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
3555
+ "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
3556
+ },
3557
+ {
3558
+ "command": "<%= config.bin %> <%= command.id %> --playground",
3559
+ "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
3332
3560
  }
3333
3561
  ],
3334
3562
  "flags": {
3335
- "project-id": {
3336
- "char": "p",
3337
- "description": "Project ID to create webhook for (overrides CLI configuration)",
3338
- "helpGroup": "OVERRIDE",
3339
- "name": "project-id",
3563
+ "api": {
3564
+ "description": "Only deploy API with this ID (can be specified multiple times)",
3565
+ "name": "api",
3340
3566
  "hasDynamicHelp": false,
3341
- "helpValue": "<id>",
3567
+ "multiple": true,
3568
+ "type": "option"
3569
+ },
3570
+ "dataset": {
3571
+ "char": "d",
3572
+ "description": "Deploy API for the given dataset",
3573
+ "name": "dataset",
3574
+ "hasDynamicHelp": false,
3575
+ "helpValue": "<name>",
3342
3576
  "multiple": false,
3343
3577
  "type": "option"
3344
- }
3345
- },
3346
- "hasDynamicHelp": false,
3347
- "hiddenAliases": [
3348
- "hook:create"
3349
- ],
3350
- "id": "hooks:create",
3351
- "pluginAlias": "@sanity/cli",
3352
- "pluginName": "@sanity/cli",
3353
- "pluginType": "core",
3354
- "strict": true,
3355
- "isESM": true,
3356
- "relativePath": [
3357
- "dist",
3358
- "commands",
3359
- "hooks",
3360
- "create.js"
3361
- ]
3362
- },
3363
- "hooks:delete": {
3364
- "aliases": [],
3365
- "args": {
3366
- "name": {
3367
- "description": "Name of webhook to delete (will prompt if not provided)",
3368
- "name": "name",
3369
- "required": false
3370
- }
3371
- },
3372
- "description": "Delete a webhook from the project",
3373
- "examples": [
3374
- {
3375
- "command": "<%= config.bin %> <%= command.id %>",
3376
- "description": "Interactively select and delete a webhook"
3377
3578
  },
3378
- {
3379
- "command": "<%= config.bin %> <%= command.id %> my-hook",
3380
- "description": "Delete a specific webhook by name"
3579
+ "dry-run": {
3580
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
3581
+ "name": "dry-run",
3582
+ "allowNo": false,
3583
+ "type": "boolean"
3584
+ },
3585
+ "force": {
3586
+ "description": "Deploy API without confirming breaking changes",
3587
+ "name": "force",
3588
+ "allowNo": false,
3589
+ "type": "boolean"
3590
+ },
3591
+ "generation": {
3592
+ "description": "API generation to deploy (defaults to \"gen3\")",
3593
+ "name": "generation",
3594
+ "hasDynamicHelp": false,
3595
+ "multiple": false,
3596
+ "options": [
3597
+ "gen1",
3598
+ "gen2",
3599
+ "gen3"
3600
+ ],
3601
+ "type": "option"
3602
+ },
3603
+ "non-null-document-fields": {
3604
+ "description": "Use non-null document fields (_id, _type etc)",
3605
+ "name": "non-null-document-fields",
3606
+ "allowNo": false,
3607
+ "type": "boolean"
3381
3608
  },
3382
- {
3383
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3384
- "description": "Delete a webhook from a specific project"
3385
- }
3386
- ],
3387
- "flags": {
3388
- "project-id": {
3389
- "char": "p",
3390
- "description": "Project ID to delete webhook from (overrides CLI configuration)",
3391
- "helpGroup": "OVERRIDE",
3392
- "name": "project-id",
3609
+ "playground": {
3610
+ "description": "Enable GraphQL playground for easier debugging",
3611
+ "name": "playground",
3612
+ "allowNo": true,
3613
+ "type": "boolean"
3614
+ },
3615
+ "tag": {
3616
+ "description": "Deploy API(s) to given tag (defaults to \"default\")",
3617
+ "name": "tag",
3393
3618
  "hasDynamicHelp": false,
3394
- "helpValue": "<id>",
3395
3619
  "multiple": false,
3396
3620
  "type": "option"
3621
+ },
3622
+ "with-union-cache": {
3623
+ "description": "Cache union types (faster for schemas with many self-references)",
3624
+ "name": "with-union-cache",
3625
+ "allowNo": false,
3626
+ "type": "boolean"
3397
3627
  }
3398
3628
  },
3399
3629
  "hasDynamicHelp": false,
3400
- "hiddenAliases": [
3401
- "hook:delete"
3402
- ],
3403
- "id": "hooks:delete",
3630
+ "hiddenAliases": [],
3631
+ "id": "graphql:deploy",
3404
3632
  "pluginAlias": "@sanity/cli",
3405
3633
  "pluginName": "@sanity/cli",
3406
3634
  "pluginType": "core",
@@ -3409,28 +3637,28 @@
3409
3637
  "relativePath": [
3410
3638
  "dist",
3411
3639
  "commands",
3412
- "hooks",
3413
- "delete.js"
3640
+ "graphql",
3641
+ "deploy.js"
3414
3642
  ]
3415
3643
  },
3416
- "hooks:list": {
3644
+ "graphql:list": {
3417
3645
  "aliases": [],
3418
3646
  "args": {},
3419
- "description": "List webhooks for the project",
3647
+ "description": "List deployed GraphQL endpoints for the project",
3420
3648
  "examples": [
3421
3649
  {
3422
3650
  "command": "<%= config.bin %> <%= command.id %>",
3423
- "description": "List webhooks for the project"
3651
+ "description": "List GraphQL endpoints for the project"
3424
3652
  },
3425
3653
  {
3426
3654
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3427
- "description": "List webhooks for a specific project"
3655
+ "description": "List GraphQL endpoints for a specific project"
3428
3656
  }
3429
3657
  ],
3430
3658
  "flags": {
3431
3659
  "project-id": {
3432
3660
  "char": "p",
3433
- "description": "Project ID to list webhooks for (overrides CLI configuration)",
3661
+ "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
3434
3662
  "helpGroup": "OVERRIDE",
3435
3663
  "name": "project-id",
3436
3664
  "hasDynamicHelp": false,
@@ -3440,10 +3668,8 @@
3440
3668
  }
3441
3669
  },
3442
3670
  "hasDynamicHelp": false,
3443
- "hiddenAliases": [
3444
- "hook:list"
3445
- ],
3446
- "id": "hooks:list",
3671
+ "hiddenAliases": [],
3672
+ "id": "graphql:list",
3447
3673
  "pluginAlias": "@sanity/cli",
3448
3674
  "pluginName": "@sanity/cli",
3449
3675
  "pluginType": "core",
@@ -3452,38 +3678,44 @@
3452
3678
  "relativePath": [
3453
3679
  "dist",
3454
3680
  "commands",
3455
- "hooks",
3681
+ "graphql",
3456
3682
  "list.js"
3457
3683
  ]
3458
3684
  },
3459
- "hooks:logs": {
3685
+ "graphql:undeploy": {
3460
3686
  "aliases": [],
3461
- "args": {
3462
- "name": {
3463
- "description": "Name of the webhook to show logs for",
3464
- "name": "name",
3465
- "required": false
3466
- }
3467
- },
3468
- "description": "Show log entries for project webhooks",
3687
+ "args": {},
3688
+ "description": "Remove a deployed GraphQL API",
3469
3689
  "examples": [
3470
3690
  {
3471
3691
  "command": "<%= config.bin %> <%= command.id %>",
3472
- "description": "Show log entries for project webhooks"
3692
+ "description": "Undeploy GraphQL API for current project and dataset"
3473
3693
  },
3474
3694
  {
3475
- "command": "<%= config.bin %> <%= command.id %> [NAME]",
3476
- "description": "Show log entries for a specific webhook by name"
3695
+ "command": "<%= config.bin %> <%= command.id %> --api ios",
3696
+ "description": "Undeploy API with ID \"ios\""
3477
3697
  },
3478
3698
  {
3479
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3480
- "description": "Show log entries for a specific project"
3699
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging",
3700
+ "description": "Undeploy GraphQL API for staging dataset"
3701
+ },
3702
+ {
3703
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
3704
+ "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
3705
+ },
3706
+ {
3707
+ "command": "<%= config.bin %> <%= command.id %> --force",
3708
+ "description": "Undeploy GraphQL API without confirmation prompt"
3709
+ },
3710
+ {
3711
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3712
+ "description": "Undeploy GraphQL API for a specific project and dataset"
3481
3713
  }
3482
3714
  ],
3483
3715
  "flags": {
3484
3716
  "project-id": {
3485
3717
  "char": "p",
3486
- "description": "Project ID to view webhook logs for (overrides CLI configuration)",
3718
+ "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
3487
3719
  "helpGroup": "OVERRIDE",
3488
3720
  "name": "project-id",
3489
3721
  "hasDynamicHelp": false,
@@ -3491,50 +3723,51 @@
3491
3723
  "multiple": false,
3492
3724
  "type": "option"
3493
3725
  },
3494
- "detailed": {
3495
- "description": "Include detailed payload and attempts",
3496
- "name": "detailed",
3726
+ "api": {
3727
+ "description": "Undeploy API with this ID",
3728
+ "exclusive": [
3729
+ "project-id",
3730
+ "project"
3731
+ ],
3732
+ "name": "api",
3497
3733
  "required": false,
3734
+ "hasDynamicHelp": false,
3735
+ "multiple": false,
3736
+ "type": "option"
3737
+ },
3738
+ "dataset": {
3739
+ "char": "d",
3740
+ "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
3741
+ "helpGroup": "OVERRIDE",
3742
+ "name": "dataset",
3743
+ "hasDynamicHelp": false,
3744
+ "helpValue": "<name>",
3745
+ "multiple": false,
3746
+ "type": "option"
3747
+ },
3748
+ "force": {
3749
+ "description": "Skip confirmation prompt",
3750
+ "name": "force",
3498
3751
  "allowNo": false,
3499
3752
  "type": "boolean"
3500
- }
3501
- },
3502
- "hasDynamicHelp": false,
3503
- "hiddenAliases": [
3504
- "hook:logs"
3505
- ],
3506
- "id": "hooks:logs",
3507
- "pluginAlias": "@sanity/cli",
3508
- "pluginName": "@sanity/cli",
3509
- "pluginType": "core",
3510
- "strict": true,
3511
- "isESM": true,
3512
- "relativePath": [
3513
- "dist",
3514
- "commands",
3515
- "hooks",
3516
- "logs.js"
3517
- ]
3518
- },
3519
- "manifest:extract": {
3520
- "aliases": [],
3521
- "args": {},
3522
- "description": "Extract studio configuration as JSON manifest files.\n\nNote: This command is experimental and subject to change. It is currently intended for use with Create only.",
3523
- "examples": [
3524
- {
3525
- "command": "<%= config.bin %> <%= command.id %>",
3526
- "description": "Extracts manifests"
3527
3753
  },
3528
- {
3529
- "command": "<%= config.bin %> <%= command.id %> --path /public/static",
3530
- "description": "Extracts manifests into /public/static"
3531
- }
3532
- ],
3533
- "flags": {
3534
- "path": {
3535
- "description": "Optional path to specify destination directory of the manifest files",
3536
- "name": "path",
3537
- "default": "dist/static",
3754
+ "project": {
3755
+ "deprecated": {
3756
+ "to": "project-id"
3757
+ },
3758
+ "description": "Project ID to delete GraphQL API for",
3759
+ "hidden": true,
3760
+ "name": "project",
3761
+ "required": false,
3762
+ "hasDynamicHelp": false,
3763
+ "multiple": false,
3764
+ "type": "option"
3765
+ },
3766
+ "tag": {
3767
+ "description": "Tag to undeploy GraphQL API from",
3768
+ "name": "tag",
3769
+ "required": false,
3770
+ "default": "default",
3538
3771
  "hasDynamicHelp": false,
3539
3772
  "multiple": false,
3540
3773
  "type": "option"
@@ -3542,33 +3775,7 @@
3542
3775
  },
3543
3776
  "hasDynamicHelp": false,
3544
3777
  "hiddenAliases": [],
3545
- "id": "manifest:extract",
3546
- "pluginAlias": "@sanity/cli",
3547
- "pluginName": "@sanity/cli",
3548
- "pluginType": "core",
3549
- "strict": true,
3550
- "isESM": true,
3551
- "relativePath": [
3552
- "dist",
3553
- "commands",
3554
- "manifest",
3555
- "extract.js"
3556
- ]
3557
- },
3558
- "mcp:configure": {
3559
- "aliases": [],
3560
- "args": {},
3561
- "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
3562
- "examples": [
3563
- {
3564
- "command": "<%= config.bin %> <%= command.id %>",
3565
- "description": "Configure Sanity MCP server for detected AI editors"
3566
- }
3567
- ],
3568
- "flags": {},
3569
- "hasDynamicHelp": false,
3570
- "hiddenAliases": [],
3571
- "id": "mcp:configure",
3778
+ "id": "graphql:undeploy",
3572
3779
  "pluginAlias": "@sanity/cli",
3573
3780
  "pluginName": "@sanity/cli",
3574
3781
  "pluginType": "core",
@@ -3577,54 +3784,47 @@
3577
3784
  "relativePath": [
3578
3785
  "dist",
3579
3786
  "commands",
3580
- "mcp",
3581
- "configure.js"
3787
+ "graphql",
3788
+ "undeploy.js"
3582
3789
  ]
3583
3790
  },
3584
- "context:build": {
3791
+ "hooks:attempt": {
3585
3792
  "aliases": [],
3586
3793
  "args": {
3587
- "knowledgeBaseId": {
3588
- "description": "Knowledge base ID",
3589
- "name": "knowledgeBaseId",
3794
+ "attemptId": {
3795
+ "description": "The delivery attempt ID to get details for",
3796
+ "name": "attemptId",
3590
3797
  "required": true
3591
3798
  }
3592
3799
  },
3593
- "description": "Build a knowledge base from its imported content",
3800
+ "description": "Print details of a given webhook delivery attempt",
3594
3801
  "examples": [
3595
3802
  {
3596
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
3597
- "description": "Start a build and return the job ID"
3598
- },
3599
- {
3600
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --watch",
3601
- "description": "Start a build and wait for it to finish (non-zero exit on failure)"
3803
+ "command": "<%= config.bin %> <%= command.id %> abc123",
3804
+ "description": "Print details of webhook delivery attempt with ID abc123"
3602
3805
  },
3603
3806
  {
3604
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
3605
- "description": "Cancel the running build, if any"
3807
+ "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
3808
+ "description": "Get attempt details for a specific project"
3606
3809
  }
3607
3810
  ],
3608
3811
  "flags": {
3609
- "cancel": {
3610
- "description": "Cancel the running build instead of starting one",
3611
- "exclusive": [
3612
- "watch"
3613
- ],
3614
- "name": "cancel",
3615
- "allowNo": false,
3616
- "type": "boolean"
3617
- },
3618
- "watch": {
3619
- "description": "Wait for the build to finish, exiting non-zero if it fails",
3620
- "name": "watch",
3621
- "allowNo": false,
3622
- "type": "boolean"
3812
+ "project-id": {
3813
+ "char": "p",
3814
+ "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
3815
+ "helpGroup": "OVERRIDE",
3816
+ "name": "project-id",
3817
+ "hasDynamicHelp": false,
3818
+ "helpValue": "<id>",
3819
+ "multiple": false,
3820
+ "type": "option"
3623
3821
  }
3624
3822
  },
3625
3823
  "hasDynamicHelp": false,
3626
- "hiddenAliases": [],
3627
- "id": "context:build",
3824
+ "hiddenAliases": [
3825
+ "hook:attempt"
3826
+ ],
3827
+ "id": "hooks:attempt",
3628
3828
  "pluginAlias": "@sanity/cli",
3629
3829
  "pluginName": "@sanity/cli",
3630
3830
  "pluginType": "core",
@@ -3633,112 +3833,94 @@
3633
3833
  "relativePath": [
3634
3834
  "dist",
3635
3835
  "commands",
3636
- "context",
3637
- "build.js"
3836
+ "hooks",
3837
+ "attempt.js"
3638
3838
  ]
3639
3839
  },
3640
- "context:create": {
3840
+ "hooks:create": {
3641
3841
  "aliases": [],
3642
3842
  "args": {},
3643
- "description": "Create a knowledge base",
3843
+ "description": "Create a new webhook for the project",
3644
3844
  "examples": [
3645
3845
  {
3646
3846
  "command": "<%= config.bin %> <%= command.id %>",
3647
- "description": "Interactively create a knowledge base"
3847
+ "description": "Create a new webhook for the project"
3648
3848
  },
3649
3849
  {
3650
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --title \"Support docs\" --description \"Product docs and troubleshooting guides\"",
3651
- "description": "Create a knowledge base in a specific organization"
3850
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3851
+ "description": "Create a webhook for a specific project"
3652
3852
  }
3653
3853
  ],
3654
3854
  "flags": {
3655
- "organization": {
3656
- "description": "Organization to create the knowledge base in (overrides CLI configuration)",
3855
+ "project-id": {
3856
+ "char": "p",
3857
+ "description": "Project ID to create webhook for (overrides CLI configuration)",
3657
3858
  "helpGroup": "OVERRIDE",
3658
- "name": "organization",
3859
+ "name": "project-id",
3659
3860
  "hasDynamicHelp": false,
3660
3861
  "helpValue": "<id>",
3661
3862
  "multiple": false,
3662
3863
  "type": "option"
3663
- },
3664
- "description": {
3665
- "description": "Knowledge base description",
3666
- "name": "description",
3667
- "hasDynamicHelp": false,
3668
- "multiple": false,
3669
- "type": "option"
3670
- },
3671
- "title": {
3672
- "description": "Knowledge base title",
3673
- "name": "title",
3674
- "hasDynamicHelp": false,
3675
- "multiple": false,
3676
- "type": "option"
3677
3864
  }
3678
3865
  },
3679
3866
  "hasDynamicHelp": false,
3680
- "hiddenAliases": [],
3681
- "id": "context:create",
3867
+ "hiddenAliases": [
3868
+ "hook:create"
3869
+ ],
3870
+ "id": "hooks:create",
3682
3871
  "pluginAlias": "@sanity/cli",
3683
3872
  "pluginName": "@sanity/cli",
3684
3873
  "pluginType": "core",
3685
3874
  "strict": true,
3686
- "telemetry": {
3687
- "redactedFlags": [
3688
- {
3689
- "canonical": "--title",
3690
- "flags": [
3691
- "--title"
3692
- ]
3693
- },
3694
- {
3695
- "canonical": "--description",
3696
- "flags": [
3697
- "--description"
3698
- ]
3699
- }
3700
- ]
3701
- },
3702
3875
  "isESM": true,
3703
3876
  "relativePath": [
3704
3877
  "dist",
3705
3878
  "commands",
3706
- "context",
3879
+ "hooks",
3707
3880
  "create.js"
3708
3881
  ]
3709
3882
  },
3710
- "context:delete": {
3883
+ "hooks:delete": {
3711
3884
  "aliases": [],
3712
3885
  "args": {
3713
- "knowledgeBaseId": {
3714
- "description": "Knowledge base ID",
3715
- "name": "knowledgeBaseId",
3716
- "required": true
3886
+ "name": {
3887
+ "description": "Name of webhook to delete (will prompt if not provided)",
3888
+ "name": "name",
3889
+ "required": false
3717
3890
  }
3718
3891
  },
3719
- "description": "Delete a knowledge base and its generated content",
3892
+ "description": "Delete a webhook from the project",
3720
3893
  "examples": [
3721
3894
  {
3722
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
3723
- "description": "Delete a knowledge base after confirmation"
3895
+ "command": "<%= config.bin %> <%= command.id %>",
3896
+ "description": "Interactively select and delete a webhook"
3724
3897
  },
3725
3898
  {
3726
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
3727
- "description": "Delete a knowledge base without confirmation prompt"
3899
+ "command": "<%= config.bin %> <%= command.id %> my-hook",
3900
+ "description": "Delete a specific webhook by name"
3901
+ },
3902
+ {
3903
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3904
+ "description": "Delete a webhook from a specific project"
3728
3905
  }
3729
3906
  ],
3730
3907
  "flags": {
3731
- "yes": {
3732
- "char": "y",
3733
- "description": "Skip confirmation prompt (unattended mode)",
3734
- "name": "yes",
3735
- "allowNo": false,
3736
- "type": "boolean"
3908
+ "project-id": {
3909
+ "char": "p",
3910
+ "description": "Project ID to delete webhook from (overrides CLI configuration)",
3911
+ "helpGroup": "OVERRIDE",
3912
+ "name": "project-id",
3913
+ "hasDynamicHelp": false,
3914
+ "helpValue": "<id>",
3915
+ "multiple": false,
3916
+ "type": "option"
3737
3917
  }
3738
3918
  },
3739
3919
  "hasDynamicHelp": false,
3740
- "hiddenAliases": [],
3741
- "id": "context:delete",
3920
+ "hiddenAliases": [
3921
+ "hook:delete"
3922
+ ],
3923
+ "id": "hooks:delete",
3742
3924
  "pluginAlias": "@sanity/cli",
3743
3925
  "pluginName": "@sanity/cli",
3744
3926
  "pluginType": "core",
@@ -3747,41 +3929,41 @@
3747
3929
  "relativePath": [
3748
3930
  "dist",
3749
3931
  "commands",
3750
- "context",
3932
+ "hooks",
3751
3933
  "delete.js"
3752
3934
  ]
3753
3935
  },
3754
- "context:get": {
3936
+ "hooks:list": {
3755
3937
  "aliases": [],
3756
- "args": {
3757
- "knowledgeBaseId": {
3758
- "description": "Knowledge base ID",
3759
- "name": "knowledgeBaseId",
3760
- "required": true
3761
- }
3762
- },
3763
- "description": "Get details of a knowledge base",
3938
+ "args": {},
3939
+ "description": "List webhooks for the project",
3764
3940
  "examples": [
3765
3941
  {
3766
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
3767
- "description": "Get details of a specific knowledge base"
3942
+ "command": "<%= config.bin %> <%= command.id %>",
3943
+ "description": "List webhooks for the project"
3768
3944
  },
3769
3945
  {
3770
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
3771
- "description": "Output the knowledge base as JSON"
3946
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3947
+ "description": "List webhooks for a specific project"
3772
3948
  }
3773
3949
  ],
3774
3950
  "flags": {
3775
- "json": {
3776
- "description": "Output the knowledge base in JSON format",
3777
- "name": "json",
3778
- "allowNo": false,
3779
- "type": "boolean"
3951
+ "project-id": {
3952
+ "char": "p",
3953
+ "description": "Project ID to list webhooks for (overrides CLI configuration)",
3954
+ "helpGroup": "OVERRIDE",
3955
+ "name": "project-id",
3956
+ "hasDynamicHelp": false,
3957
+ "helpValue": "<id>",
3958
+ "multiple": false,
3959
+ "type": "option"
3780
3960
  }
3781
3961
  },
3782
3962
  "hasDynamicHelp": false,
3783
- "hiddenAliases": [],
3784
- "id": "context:get",
3963
+ "hiddenAliases": [
3964
+ "hook:list"
3965
+ ],
3966
+ "id": "hooks:list",
3785
3967
  "pluginAlias": "@sanity/cli",
3786
3968
  "pluginName": "@sanity/cli",
3787
3969
  "pluginType": "core",
@@ -3790,80 +3972,58 @@
3790
3972
  "relativePath": [
3791
3973
  "dist",
3792
3974
  "commands",
3793
- "context",
3794
- "get.js"
3975
+ "hooks",
3976
+ "list.js"
3795
3977
  ]
3796
3978
  },
3797
- "context:list": {
3979
+ "hooks:logs": {
3798
3980
  "aliases": [],
3799
- "args": {},
3800
- "description": "List knowledge bases in an organization",
3981
+ "args": {
3982
+ "name": {
3983
+ "description": "Name of the webhook to show logs for",
3984
+ "name": "name",
3985
+ "required": false
3986
+ }
3987
+ },
3988
+ "description": "Show log entries for project webhooks",
3801
3989
  "examples": [
3802
3990
  {
3803
3991
  "command": "<%= config.bin %> <%= command.id %>",
3804
- "description": "List knowledge bases, selecting the organization interactively"
3992
+ "description": "Show log entries for project webhooks"
3805
3993
  },
3806
3994
  {
3807
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
3808
- "description": "List knowledge bases in a specific organization"
3995
+ "command": "<%= config.bin %> <%= command.id %> [NAME]",
3996
+ "description": "Show log entries for a specific webhook by name"
3809
3997
  },
3810
3998
  {
3811
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
3812
- "description": "Output knowledge bases as JSON"
3999
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4000
+ "description": "Show log entries for a specific project"
3813
4001
  }
3814
4002
  ],
3815
4003
  "flags": {
3816
- "organization": {
3817
- "description": "Organization to list knowledge bases for (overrides CLI configuration)",
4004
+ "project-id": {
4005
+ "char": "p",
4006
+ "description": "Project ID to view webhook logs for (overrides CLI configuration)",
3818
4007
  "helpGroup": "OVERRIDE",
3819
- "name": "organization",
4008
+ "name": "project-id",
3820
4009
  "hasDynamicHelp": false,
3821
4010
  "helpValue": "<id>",
3822
4011
  "multiple": false,
3823
4012
  "type": "option"
3824
4013
  },
3825
- "json": {
3826
- "description": "Output knowledge bases in JSON format",
3827
- "name": "json",
4014
+ "detailed": {
4015
+ "description": "Include detailed payload and attempts",
4016
+ "name": "detailed",
4017
+ "required": false,
3828
4018
  "allowNo": false,
3829
4019
  "type": "boolean"
3830
4020
  }
3831
4021
  },
3832
4022
  "hasDynamicHelp": false,
3833
- "hiddenAliases": [],
3834
- "id": "context:list",
3835
- "pluginAlias": "@sanity/cli",
3836
- "pluginName": "@sanity/cli",
3837
- "pluginType": "core",
3838
- "strict": true,
3839
- "isESM": true,
3840
- "relativePath": [
3841
- "dist",
3842
- "commands",
3843
- "context",
3844
- "list.js"
3845
- ]
3846
- },
3847
- "context:refresh": {
3848
- "aliases": [],
3849
- "args": {
3850
- "knowledgeBaseId": {
3851
- "description": "Knowledge base ID",
3852
- "name": "knowledgeBaseId",
3853
- "required": true
3854
- }
3855
- },
3856
- "description": "Refresh a knowledge base: re-check sources and apply what changed",
3857
- "examples": [
3858
- {
3859
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
3860
- "description": "Start an incremental refresh"
3861
- }
4023
+ "hiddenAliases": [
4024
+ "hook:logs"
3862
4025
  ],
3863
- "flags": {},
3864
- "hasDynamicHelp": false,
3865
- "hiddenAliases": [],
3866
- "id": "context:refresh",
4026
+ "id": "hooks:logs",
3867
4027
  "pluginAlias": "@sanity/cli",
3868
4028
  "pluginName": "@sanity/cli",
3869
4029
  "pluginType": "core",
@@ -3872,66 +4032,29 @@
3872
4032
  "relativePath": [
3873
4033
  "dist",
3874
4034
  "commands",
3875
- "context",
3876
- "refresh.js"
4035
+ "hooks",
4036
+ "logs.js"
3877
4037
  ]
3878
4038
  },
3879
- "context:update": {
4039
+ "manifest:extract": {
3880
4040
  "aliases": [],
3881
- "args": {
3882
- "knowledgeBaseId": {
3883
- "description": "Knowledge base ID",
3884
- "name": "knowledgeBaseId",
3885
- "required": true
3886
- }
3887
- },
3888
- "description": "Update a knowledge base",
4041
+ "args": {},
4042
+ "description": "Extract studio configuration as JSON manifest files.\n\nNote: This command is experimental and subject to change. It is currently intended for use with Create only.",
3889
4043
  "examples": [
3890
4044
  {
3891
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
3892
- "description": "Rename a knowledge base"
3893
- },
3894
- {
3895
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
3896
- "description": "Enable weekly scheduled refresh"
4045
+ "command": "<%= config.bin %> <%= command.id %>",
4046
+ "description": "Extracts manifests"
3897
4047
  },
3898
- {
3899
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
3900
- "description": "Disable scheduled refresh"
4048
+ {
4049
+ "command": "<%= config.bin %> <%= command.id %> --path /public/static",
4050
+ "description": "Extracts manifests into /public/static"
3901
4051
  }
3902
4052
  ],
3903
4053
  "flags": {
3904
- "description": {
3905
- "description": "New knowledge base description",
3906
- "name": "description",
3907
- "required": false,
3908
- "hasDynamicHelp": false,
3909
- "multiple": false,
3910
- "type": "option"
3911
- },
3912
- "refresh-enabled": {
3913
- "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
3914
- "name": "refresh-enabled",
3915
- "required": false,
3916
- "allowNo": true,
3917
- "type": "boolean"
3918
- },
3919
- "refresh-frequency": {
3920
- "description": "How often scheduled refresh runs",
3921
- "name": "refresh-frequency",
3922
- "required": false,
3923
- "hasDynamicHelp": false,
3924
- "multiple": false,
3925
- "options": [
3926
- "weekly",
3927
- "monthly"
3928
- ],
3929
- "type": "option"
3930
- },
3931
- "title": {
3932
- "description": "New knowledge base title",
3933
- "name": "title",
3934
- "required": false,
4054
+ "path": {
4055
+ "description": "Optional path to specify destination directory of the manifest files",
4056
+ "name": "path",
4057
+ "default": "dist/static",
3935
4058
  "hasDynamicHelp": false,
3936
4059
  "multiple": false,
3937
4060
  "type": "option"
@@ -3939,33 +4062,43 @@
3939
4062
  },
3940
4063
  "hasDynamicHelp": false,
3941
4064
  "hiddenAliases": [],
3942
- "id": "context:update",
4065
+ "id": "manifest:extract",
3943
4066
  "pluginAlias": "@sanity/cli",
3944
4067
  "pluginName": "@sanity/cli",
3945
4068
  "pluginType": "core",
3946
4069
  "strict": true,
3947
- "telemetry": {
3948
- "redactedFlags": [
3949
- {
3950
- "canonical": "--title",
3951
- "flags": [
3952
- "--title"
3953
- ]
3954
- },
3955
- {
3956
- "canonical": "--description",
3957
- "flags": [
3958
- "--description"
3959
- ]
3960
- }
3961
- ]
3962
- },
3963
4070
  "isESM": true,
3964
4071
  "relativePath": [
3965
4072
  "dist",
3966
4073
  "commands",
3967
- "context",
3968
- "update.js"
4074
+ "manifest",
4075
+ "extract.js"
4076
+ ]
4077
+ },
4078
+ "mcp:configure": {
4079
+ "aliases": [],
4080
+ "args": {},
4081
+ "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
4082
+ "examples": [
4083
+ {
4084
+ "command": "<%= config.bin %> <%= command.id %>",
4085
+ "description": "Configure Sanity MCP server for detected AI editors"
4086
+ }
4087
+ ],
4088
+ "flags": {},
4089
+ "hasDynamicHelp": false,
4090
+ "hiddenAliases": [],
4091
+ "id": "mcp:configure",
4092
+ "pluginAlias": "@sanity/cli",
4093
+ "pluginName": "@sanity/cli",
4094
+ "pluginType": "core",
4095
+ "strict": true,
4096
+ "isESM": true,
4097
+ "relativePath": [
4098
+ "dist",
4099
+ "commands",
4100
+ "mcp",
4101
+ "configure.js"
3969
4102
  ]
3970
4103
  },
3971
4104
  "media:create-aspect": {
@@ -4200,224 +4333,112 @@
4200
4333
  "relativePath": [
4201
4334
  "dist",
4202
4335
  "commands",
4203
- "media",
4204
- "export.js"
4205
- ]
4206
- },
4207
- "media:import": {
4208
- "aliases": [],
4209
- "args": {
4210
- "source": {
4211
- "description": "Directory, archive, or asset URL to import from. An https URL imports one asset that Sanity fetches itself",
4212
- "name": "source",
4213
- "required": true
4214
- }
4215
- },
4216
- "description": "Import a set of assets to the target media library.",
4217
- "examples": [
4218
- {
4219
- "command": "<%= config.bin %> <%= command.id %> products",
4220
- "description": "Import all assets from the \"products\" directory"
4221
- },
4222
- {
4223
- "command": "<%= config.bin %> <%= command.id %> gallery.tar.gz",
4224
- "description": "Import all assets from \"gallery\" archive"
4225
- },
4226
- {
4227
- "command": "<%= config.bin %> <%= command.id %> products --replace-aspects",
4228
- "description": "Import all assets from the \"products\" directory and replace aspects"
4229
- },
4230
- {
4231
- "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png",
4232
- "description": "Have Sanity fetch a single asset from a public URL"
4233
- },
4234
- {
4235
- "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png --aspect department=Brand",
4236
- "description": "Fetch an asset from a URL and set aspect data on it"
4237
- }
4238
- ],
4239
- "flags": {
4240
- "project-id": {
4241
- "char": "p",
4242
- "description": "Project ID to import media to (overrides CLI configuration)",
4243
- "helpGroup": "OVERRIDE",
4244
- "name": "project-id",
4245
- "hasDynamicHelp": false,
4246
- "helpValue": "<id>",
4247
- "multiple": false,
4248
- "type": "option"
4249
- },
4250
- "aspect": {
4251
- "description": "Aspect value to set on the imported asset, as key=value. Repeatable. Only applies when the source is a URL - directory and archive imports read aspects from their data.ndjson",
4252
- "name": "aspect",
4253
- "hasDynamicHelp": false,
4254
- "helpValue": "<key=value>",
4255
- "multiple": true,
4256
- "type": "option"
4257
- },
4258
- "filename": {
4259
- "description": "Original filename to store on the asset. Only applies when the source is a URL. Defaults to a name derived from the URL",
4260
- "name": "filename",
4261
- "hasDynamicHelp": false,
4262
- "helpValue": "<filename>",
4263
- "multiple": false,
4264
- "type": "option"
4265
- },
4266
- "media-library-id": {
4267
- "description": "The id of the target media library",
4268
- "name": "media-library-id",
4269
- "hasDynamicHelp": false,
4270
- "multiple": false,
4271
- "type": "option"
4272
- },
4273
- "replace-aspects": {
4274
- "description": "Replace existing aspect data. All versions will be replaced (e.g. published and draft aspect data). Only applies to directory and archive imports",
4275
- "name": "replace-aspects",
4276
- "allowNo": false,
4277
- "type": "boolean"
4278
- }
4279
- },
4280
- "hasDynamicHelp": false,
4281
- "hiddenAliases": [],
4282
- "id": "media:import",
4283
- "pluginAlias": "@sanity/cli",
4284
- "pluginName": "@sanity/cli",
4285
- "pluginType": "core",
4286
- "strict": true,
4287
- "telemetry": {
4288
- "redactedFlags": [
4289
- {
4290
- "canonical": "--aspect",
4291
- "flags": [
4292
- "--aspect"
4293
- ]
4294
- },
4295
- {
4296
- "canonical": "--filename",
4297
- "flags": [
4298
- "--filename"
4299
- ]
4300
- }
4301
- ]
4302
- },
4303
- "isESM": true,
4304
- "relativePath": [
4305
- "dist",
4306
- "commands",
4307
- "media",
4308
- "import.js"
4309
- ]
4310
- },
4311
- "openapi:get": {
4312
- "aliases": [],
4313
- "args": {
4314
- "slug": {
4315
- "description": "Slug of the OpenAPI specification to retrieve",
4316
- "name": "slug",
4317
- "required": true
4318
- }
4319
- },
4320
- "description": "Get an OpenAPI specification by slug",
4321
- "examples": [
4322
- {
4323
- "command": "<%= config.bin %> <%= command.id %> query",
4324
- "description": "Get a specification (YAML format, default)"
4325
- },
4326
- {
4327
- "command": "<%= config.bin %> <%= command.id %> query --format=json",
4328
- "description": "Get specification in JSON format"
4329
- },
4330
- {
4331
- "command": "<%= config.bin %> <%= command.id %> query --web",
4332
- "description": "Open specification in browser"
4333
- },
4334
- {
4335
- "command": "<%= config.bin %> <%= command.id %> query > query-api.yaml",
4336
- "description": "Pipe to file"
4337
- }
4338
- ],
4339
- "flags": {
4340
- "format": {
4341
- "description": "Output format: yaml (default), json",
4342
- "name": "format",
4343
- "default": "yaml",
4344
- "hasDynamicHelp": false,
4345
- "multiple": false,
4346
- "options": [
4347
- "yaml",
4348
- "json"
4349
- ],
4350
- "type": "option"
4351
- },
4352
- "web": {
4353
- "char": "w",
4354
- "description": "Open in web browser",
4355
- "name": "web",
4356
- "allowNo": false,
4357
- "type": "boolean"
4358
- }
4359
- },
4360
- "hasDynamicHelp": false,
4361
- "hiddenAliases": [],
4362
- "id": "openapi:get",
4363
- "pluginAlias": "@sanity/cli",
4364
- "pluginName": "@sanity/cli",
4365
- "pluginType": "core",
4366
- "strict": true,
4367
- "isESM": true,
4368
- "relativePath": [
4369
- "dist",
4370
- "commands",
4371
- "openapi",
4372
- "get.js"
4336
+ "media",
4337
+ "export.js"
4373
4338
  ]
4374
4339
  },
4375
- "openapi:list": {
4340
+ "media:import": {
4376
4341
  "aliases": [],
4377
- "args": {},
4378
- "description": "List all available OpenAPI specifications",
4342
+ "args": {
4343
+ "source": {
4344
+ "description": "Directory, archive, or asset URL to import from. An https URL imports one asset that Sanity fetches itself",
4345
+ "name": "source",
4346
+ "required": true
4347
+ }
4348
+ },
4349
+ "description": "Import a set of assets to the target media library.",
4379
4350
  "examples": [
4380
4351
  {
4381
- "command": "<%= config.bin %> <%= command.id %>",
4382
- "description": "List all available OpenAPI specs"
4352
+ "command": "<%= config.bin %> <%= command.id %> products",
4353
+ "description": "Import all assets from the \"products\" directory"
4383
4354
  },
4384
4355
  {
4385
- "command": "<%= config.bin %> <%= command.id %> --json",
4386
- "description": "List with JSON output"
4356
+ "command": "<%= config.bin %> <%= command.id %> gallery.tar.gz",
4357
+ "description": "Import all assets from \"gallery\" archive"
4387
4358
  },
4388
4359
  {
4389
- "command": "<%= config.bin %> <%= command.id %> --web",
4390
- "description": "Open HTTP Reference in browser"
4360
+ "command": "<%= config.bin %> <%= command.id %> products --replace-aspects",
4361
+ "description": "Import all assets from the \"products\" directory and replace aspects"
4362
+ },
4363
+ {
4364
+ "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png",
4365
+ "description": "Have Sanity fetch a single asset from a public URL"
4366
+ },
4367
+ {
4368
+ "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png --aspect department=Brand",
4369
+ "description": "Fetch an asset from a URL and set aspect data on it"
4391
4370
  }
4392
4371
  ],
4393
4372
  "flags": {
4394
- "json": {
4395
- "description": "Output JSON",
4396
- "name": "json",
4397
- "allowNo": false,
4398
- "type": "boolean"
4373
+ "project-id": {
4374
+ "char": "p",
4375
+ "description": "Project ID to import media to (overrides CLI configuration)",
4376
+ "helpGroup": "OVERRIDE",
4377
+ "name": "project-id",
4378
+ "hasDynamicHelp": false,
4379
+ "helpValue": "<id>",
4380
+ "multiple": false,
4381
+ "type": "option"
4399
4382
  },
4400
- "web": {
4401
- "char": "w",
4402
- "description": "Open HTTP Reference in web browser",
4403
- "name": "web",
4383
+ "aspect": {
4384
+ "description": "Aspect value to set on the imported asset, as key=value. Repeatable. Only applies when the source is a URL - directory and archive imports read aspects from their data.ndjson",
4385
+ "name": "aspect",
4386
+ "hasDynamicHelp": false,
4387
+ "helpValue": "<key=value>",
4388
+ "multiple": true,
4389
+ "type": "option"
4390
+ },
4391
+ "filename": {
4392
+ "description": "Original filename to store on the asset. Only applies when the source is a URL. Defaults to a name derived from the URL",
4393
+ "name": "filename",
4394
+ "hasDynamicHelp": false,
4395
+ "helpValue": "<filename>",
4396
+ "multiple": false,
4397
+ "type": "option"
4398
+ },
4399
+ "media-library-id": {
4400
+ "description": "The id of the target media library",
4401
+ "name": "media-library-id",
4402
+ "hasDynamicHelp": false,
4403
+ "multiple": false,
4404
+ "type": "option"
4405
+ },
4406
+ "replace-aspects": {
4407
+ "description": "Replace existing aspect data. All versions will be replaced (e.g. published and draft aspect data). Only applies to directory and archive imports",
4408
+ "name": "replace-aspects",
4404
4409
  "allowNo": false,
4405
4410
  "type": "boolean"
4406
4411
  }
4407
4412
  },
4408
4413
  "hasDynamicHelp": false,
4409
4414
  "hiddenAliases": [],
4410
- "id": "openapi:list",
4415
+ "id": "media:import",
4411
4416
  "pluginAlias": "@sanity/cli",
4412
4417
  "pluginName": "@sanity/cli",
4413
4418
  "pluginType": "core",
4414
4419
  "strict": true,
4420
+ "telemetry": {
4421
+ "redactedFlags": [
4422
+ {
4423
+ "canonical": "--aspect",
4424
+ "flags": [
4425
+ "--aspect"
4426
+ ]
4427
+ },
4428
+ {
4429
+ "canonical": "--filename",
4430
+ "flags": [
4431
+ "--filename"
4432
+ ]
4433
+ }
4434
+ ]
4435
+ },
4415
4436
  "isESM": true,
4416
4437
  "relativePath": [
4417
4438
  "dist",
4418
4439
  "commands",
4419
- "openapi",
4420
- "list.js"
4440
+ "media",
4441
+ "import.js"
4421
4442
  ]
4422
4443
  },
4423
4444
  "migrations:create": {
@@ -4583,6 +4604,118 @@
4583
4604
  "run.js"
4584
4605
  ]
4585
4606
  },
4607
+ "openapi:get": {
4608
+ "aliases": [],
4609
+ "args": {
4610
+ "slug": {
4611
+ "description": "Slug of the OpenAPI specification to retrieve",
4612
+ "name": "slug",
4613
+ "required": true
4614
+ }
4615
+ },
4616
+ "description": "Get an OpenAPI specification by slug",
4617
+ "examples": [
4618
+ {
4619
+ "command": "<%= config.bin %> <%= command.id %> query",
4620
+ "description": "Get a specification (YAML format, default)"
4621
+ },
4622
+ {
4623
+ "command": "<%= config.bin %> <%= command.id %> query --format=json",
4624
+ "description": "Get specification in JSON format"
4625
+ },
4626
+ {
4627
+ "command": "<%= config.bin %> <%= command.id %> query --web",
4628
+ "description": "Open specification in browser"
4629
+ },
4630
+ {
4631
+ "command": "<%= config.bin %> <%= command.id %> query > query-api.yaml",
4632
+ "description": "Pipe to file"
4633
+ }
4634
+ ],
4635
+ "flags": {
4636
+ "format": {
4637
+ "description": "Output format: yaml (default), json",
4638
+ "name": "format",
4639
+ "default": "yaml",
4640
+ "hasDynamicHelp": false,
4641
+ "multiple": false,
4642
+ "options": [
4643
+ "yaml",
4644
+ "json"
4645
+ ],
4646
+ "type": "option"
4647
+ },
4648
+ "web": {
4649
+ "char": "w",
4650
+ "description": "Open in web browser",
4651
+ "name": "web",
4652
+ "allowNo": false,
4653
+ "type": "boolean"
4654
+ }
4655
+ },
4656
+ "hasDynamicHelp": false,
4657
+ "hiddenAliases": [],
4658
+ "id": "openapi:get",
4659
+ "pluginAlias": "@sanity/cli",
4660
+ "pluginName": "@sanity/cli",
4661
+ "pluginType": "core",
4662
+ "strict": true,
4663
+ "isESM": true,
4664
+ "relativePath": [
4665
+ "dist",
4666
+ "commands",
4667
+ "openapi",
4668
+ "get.js"
4669
+ ]
4670
+ },
4671
+ "openapi:list": {
4672
+ "aliases": [],
4673
+ "args": {},
4674
+ "description": "List all available OpenAPI specifications",
4675
+ "examples": [
4676
+ {
4677
+ "command": "<%= config.bin %> <%= command.id %>",
4678
+ "description": "List all available OpenAPI specs"
4679
+ },
4680
+ {
4681
+ "command": "<%= config.bin %> <%= command.id %> --json",
4682
+ "description": "List with JSON output"
4683
+ },
4684
+ {
4685
+ "command": "<%= config.bin %> <%= command.id %> --web",
4686
+ "description": "Open HTTP Reference in browser"
4687
+ }
4688
+ ],
4689
+ "flags": {
4690
+ "json": {
4691
+ "description": "Output JSON",
4692
+ "name": "json",
4693
+ "allowNo": false,
4694
+ "type": "boolean"
4695
+ },
4696
+ "web": {
4697
+ "char": "w",
4698
+ "description": "Open HTTP Reference in web browser",
4699
+ "name": "web",
4700
+ "allowNo": false,
4701
+ "type": "boolean"
4702
+ }
4703
+ },
4704
+ "hasDynamicHelp": false,
4705
+ "hiddenAliases": [],
4706
+ "id": "openapi:list",
4707
+ "pluginAlias": "@sanity/cli",
4708
+ "pluginName": "@sanity/cli",
4709
+ "pluginType": "core",
4710
+ "strict": true,
4711
+ "isESM": true,
4712
+ "relativePath": [
4713
+ "dist",
4714
+ "commands",
4715
+ "openapi",
4716
+ "list.js"
4717
+ ]
4718
+ },
4586
4719
  "organizations:create": {
4587
4720
  "aliases": [],
4588
4721
  "args": {},
@@ -5020,32 +5153,6 @@
5020
5153
  "unclaimed.js"
5021
5154
  ]
5022
5155
  },
5023
- "skills:install": {
5024
- "aliases": [],
5025
- "args": {},
5026
- "description": "Install Sanity agent skills for detected AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, VS Code, VS Code Insiders)",
5027
- "examples": [
5028
- {
5029
- "command": "<%= config.bin %> <%= command.id %>",
5030
- "description": "Install Sanity agent skills for detected AI editors"
5031
- }
5032
- ],
5033
- "flags": {},
5034
- "hasDynamicHelp": false,
5035
- "hiddenAliases": [],
5036
- "id": "skills:install",
5037
- "pluginAlias": "@sanity/cli",
5038
- "pluginName": "@sanity/cli",
5039
- "pluginType": "core",
5040
- "strict": true,
5041
- "isESM": true,
5042
- "relativePath": [
5043
- "dist",
5044
- "commands",
5045
- "skills",
5046
- "install.js"
5047
- ]
5048
- },
5049
5156
  "schemas:delete": {
5050
5157
  "aliases": [],
5051
5158
  "args": {},
@@ -5427,12 +5534,38 @@
5427
5534
  "multiple": false,
5428
5535
  "type": "option"
5429
5536
  }
5430
- },
5431
- "hasDynamicHelp": false,
5432
- "hiddenAliases": [
5433
- "schema:validate"
5537
+ },
5538
+ "hasDynamicHelp": false,
5539
+ "hiddenAliases": [
5540
+ "schema:validate"
5541
+ ],
5542
+ "id": "schemas:validate",
5543
+ "pluginAlias": "@sanity/cli",
5544
+ "pluginName": "@sanity/cli",
5545
+ "pluginType": "core",
5546
+ "strict": true,
5547
+ "isESM": true,
5548
+ "relativePath": [
5549
+ "dist",
5550
+ "commands",
5551
+ "schemas",
5552
+ "validate.js"
5553
+ ]
5554
+ },
5555
+ "skills:install": {
5556
+ "aliases": [],
5557
+ "args": {},
5558
+ "description": "Install Sanity agent skills for detected AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, VS Code, VS Code Insiders)",
5559
+ "examples": [
5560
+ {
5561
+ "command": "<%= config.bin %> <%= command.id %>",
5562
+ "description": "Install Sanity agent skills for detected AI editors"
5563
+ }
5434
5564
  ],
5435
- "id": "schemas:validate",
5565
+ "flags": {},
5566
+ "hasDynamicHelp": false,
5567
+ "hiddenAliases": [],
5568
+ "id": "skills:install",
5436
5569
  "pluginAlias": "@sanity/cli",
5437
5570
  "pluginName": "@sanity/cli",
5438
5571
  "pluginType": "core",
@@ -5441,8 +5574,8 @@
5441
5574
  "relativePath": [
5442
5575
  "dist",
5443
5576
  "commands",
5444
- "schemas",
5445
- "validate.js"
5577
+ "skills",
5578
+ "install.js"
5446
5579
  ]
5447
5580
  },
5448
5581
  "telemetry:disable": {
@@ -5983,130 +6116,6 @@
5983
6116
  "list.js"
5984
6117
  ]
5985
6118
  },
5986
- "docs:browse": {
5987
- "aliases": [],
5988
- "args": {},
5989
- "description": "Open Sanity docs in your browser",
5990
- "flags": {},
5991
- "hasDynamicHelp": false,
5992
- "hiddenAliases": [],
5993
- "id": "docs:browse",
5994
- "pluginAlias": "@sanity/cli",
5995
- "pluginName": "@sanity/cli",
5996
- "pluginType": "core",
5997
- "strict": true,
5998
- "enableJsonFlag": false,
5999
- "isESM": true,
6000
- "relativePath": [
6001
- "dist",
6002
- "commands",
6003
- "docs",
6004
- "browse.js"
6005
- ]
6006
- },
6007
- "docs:read": {
6008
- "aliases": [],
6009
- "args": {
6010
- "path": {
6011
- "description": "Path or URL to article, found in search results and docs content as links",
6012
- "name": "path",
6013
- "required": true
6014
- }
6015
- },
6016
- "description": "Read an article in terminal",
6017
- "examples": [
6018
- {
6019
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
6020
- "description": "Read as markdown in terminal"
6021
- },
6022
- {
6023
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
6024
- "description": "Read using full URL"
6025
- },
6026
- {
6027
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
6028
- "description": "Open in web browser"
6029
- },
6030
- {
6031
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
6032
- "description": "Open using full URL in web browser"
6033
- }
6034
- ],
6035
- "flags": {
6036
- "web": {
6037
- "aliases": [
6038
- "w"
6039
- ],
6040
- "description": "Open in a web browser",
6041
- "name": "web",
6042
- "allowNo": false,
6043
- "type": "boolean"
6044
- }
6045
- },
6046
- "hasDynamicHelp": false,
6047
- "hiddenAliases": [],
6048
- "id": "docs:read",
6049
- "pluginAlias": "@sanity/cli",
6050
- "pluginName": "@sanity/cli",
6051
- "pluginType": "core",
6052
- "strict": true,
6053
- "isESM": true,
6054
- "relativePath": [
6055
- "dist",
6056
- "commands",
6057
- "docs",
6058
- "read.js"
6059
- ]
6060
- },
6061
- "docs:search": {
6062
- "aliases": [],
6063
- "args": {
6064
- "query": {
6065
- "description": "Search query for documentation",
6066
- "name": "query",
6067
- "required": true
6068
- }
6069
- },
6070
- "description": "Search Sanity docs",
6071
- "examples": [
6072
- {
6073
- "command": "<%= config.bin %> <%= command.id %> schema",
6074
- "description": "Search for documentation about schemas"
6075
- },
6076
- {
6077
- "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
6078
- "description": "Search with phrase"
6079
- },
6080
- {
6081
- "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
6082
- "description": "Limit search results"
6083
- }
6084
- ],
6085
- "flags": {
6086
- "limit": {
6087
- "description": "Maximum number of results to return",
6088
- "name": "limit",
6089
- "default": 10,
6090
- "hasDynamicHelp": false,
6091
- "multiple": false,
6092
- "type": "option"
6093
- }
6094
- },
6095
- "hasDynamicHelp": false,
6096
- "hiddenAliases": [],
6097
- "id": "docs:search",
6098
- "pluginAlias": "@sanity/cli",
6099
- "pluginName": "@sanity/cli",
6100
- "pluginType": "core",
6101
- "strict": true,
6102
- "isESM": true,
6103
- "relativePath": [
6104
- "dist",
6105
- "commands",
6106
- "docs",
6107
- "search.js"
6108
- ]
6109
- },
6110
6119
  "datasets:alias:create": {
6111
6120
  "aliases": [],
6112
6121
  "args": {
@@ -6621,61 +6630,6 @@
6621
6630
  "set.js"
6622
6631
  ]
6623
6632
  },
6624
- "context:jobs:get": {
6625
- "aliases": [],
6626
- "args": {
6627
- "knowledgeBaseId": {
6628
- "description": "Knowledge base ID",
6629
- "name": "knowledgeBaseId",
6630
- "required": true
6631
- },
6632
- "jobId": {
6633
- "description": "Job ID",
6634
- "name": "jobId",
6635
- "required": true
6636
- }
6637
- },
6638
- "description": "Get the status of a knowledge base job",
6639
- "examples": [
6640
- {
6641
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6642
- "description": "Get the current status of a job"
6643
- },
6644
- {
6645
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6646
- "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6647
- }
6648
- ],
6649
- "flags": {
6650
- "json": {
6651
- "description": "Output the job in JSON format",
6652
- "name": "json",
6653
- "allowNo": false,
6654
- "type": "boolean"
6655
- },
6656
- "watch": {
6657
- "description": "Poll until the job reaches a terminal state",
6658
- "name": "watch",
6659
- "allowNo": false,
6660
- "type": "boolean"
6661
- }
6662
- },
6663
- "hasDynamicHelp": false,
6664
- "hiddenAliases": [],
6665
- "id": "context:jobs:get",
6666
- "pluginAlias": "@sanity/cli",
6667
- "pluginName": "@sanity/cli",
6668
- "pluginType": "core",
6669
- "strict": true,
6670
- "isESM": true,
6671
- "relativePath": [
6672
- "dist",
6673
- "commands",
6674
- "context",
6675
- "jobs",
6676
- "get.js"
6677
- ]
6678
- },
6679
6633
  "context:imports:create": {
6680
6634
  "aliases": [],
6681
6635
  "args": {
@@ -7041,7 +6995,62 @@
7041
6995
  "imports",
7042
6996
  "list.js"
7043
6997
  ]
6998
+ },
6999
+ "context:jobs:get": {
7000
+ "aliases": [],
7001
+ "args": {
7002
+ "knowledgeBaseId": {
7003
+ "description": "Knowledge base ID",
7004
+ "name": "knowledgeBaseId",
7005
+ "required": true
7006
+ },
7007
+ "jobId": {
7008
+ "description": "Job ID",
7009
+ "name": "jobId",
7010
+ "required": true
7011
+ }
7012
+ },
7013
+ "description": "Get the status of a knowledge base job",
7014
+ "examples": [
7015
+ {
7016
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
7017
+ "description": "Get the current status of a job"
7018
+ },
7019
+ {
7020
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
7021
+ "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
7022
+ }
7023
+ ],
7024
+ "flags": {
7025
+ "json": {
7026
+ "description": "Output the job in JSON format",
7027
+ "name": "json",
7028
+ "allowNo": false,
7029
+ "type": "boolean"
7030
+ },
7031
+ "watch": {
7032
+ "description": "Poll until the job reaches a terminal state",
7033
+ "name": "watch",
7034
+ "allowNo": false,
7035
+ "type": "boolean"
7036
+ }
7037
+ },
7038
+ "hasDynamicHelp": false,
7039
+ "hiddenAliases": [],
7040
+ "id": "context:jobs:get",
7041
+ "pluginAlias": "@sanity/cli",
7042
+ "pluginName": "@sanity/cli",
7043
+ "pluginType": "core",
7044
+ "strict": true,
7045
+ "isESM": true,
7046
+ "relativePath": [
7047
+ "dist",
7048
+ "commands",
7049
+ "context",
7050
+ "jobs",
7051
+ "get.js"
7052
+ ]
7044
7053
  }
7045
7054
  },
7046
- "version": "8.12.0"
7055
+ "version": "8.13.1"
7047
7056
  }