@sanity/cli 8.17.1 → 8.19.0

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.
@@ -2324,130 +2324,6 @@
2324
2324
  "update.js"
2325
2325
  ]
2326
2326
  },
2327
- "docs:browse": {
2328
- "aliases": [],
2329
- "args": {},
2330
- "description": "Open Sanity docs in your browser",
2331
- "flags": {},
2332
- "hasDynamicHelp": false,
2333
- "hiddenAliases": [],
2334
- "id": "docs:browse",
2335
- "pluginAlias": "@sanity/cli",
2336
- "pluginName": "@sanity/cli",
2337
- "pluginType": "core",
2338
- "strict": true,
2339
- "enableJsonFlag": false,
2340
- "isESM": true,
2341
- "relativePath": [
2342
- "dist",
2343
- "commands",
2344
- "docs",
2345
- "browse.js"
2346
- ]
2347
- },
2348
- "docs:read": {
2349
- "aliases": [],
2350
- "args": {
2351
- "path": {
2352
- "description": "Path or URL to article, found in search results and docs content as links",
2353
- "name": "path",
2354
- "required": true
2355
- }
2356
- },
2357
- "description": "Read an article in terminal",
2358
- "examples": [
2359
- {
2360
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2361
- "description": "Read as markdown in terminal"
2362
- },
2363
- {
2364
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2365
- "description": "Read using full URL"
2366
- },
2367
- {
2368
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2369
- "description": "Open in web browser"
2370
- },
2371
- {
2372
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2373
- "description": "Open using full URL in web browser"
2374
- }
2375
- ],
2376
- "flags": {
2377
- "web": {
2378
- "aliases": [
2379
- "w"
2380
- ],
2381
- "description": "Open in a web browser",
2382
- "name": "web",
2383
- "allowNo": false,
2384
- "type": "boolean"
2385
- }
2386
- },
2387
- "hasDynamicHelp": false,
2388
- "hiddenAliases": [],
2389
- "id": "docs:read",
2390
- "pluginAlias": "@sanity/cli",
2391
- "pluginName": "@sanity/cli",
2392
- "pluginType": "core",
2393
- "strict": true,
2394
- "isESM": true,
2395
- "relativePath": [
2396
- "dist",
2397
- "commands",
2398
- "docs",
2399
- "read.js"
2400
- ]
2401
- },
2402
- "docs:search": {
2403
- "aliases": [],
2404
- "args": {
2405
- "query": {
2406
- "description": "Search query for documentation",
2407
- "name": "query",
2408
- "required": true
2409
- }
2410
- },
2411
- "description": "Search Sanity docs",
2412
- "examples": [
2413
- {
2414
- "command": "<%= config.bin %> <%= command.id %> schema",
2415
- "description": "Search for documentation about schemas"
2416
- },
2417
- {
2418
- "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
2419
- "description": "Search with phrase"
2420
- },
2421
- {
2422
- "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
2423
- "description": "Limit search results"
2424
- }
2425
- ],
2426
- "flags": {
2427
- "limit": {
2428
- "description": "Maximum number of results to return",
2429
- "name": "limit",
2430
- "default": 10,
2431
- "hasDynamicHelp": false,
2432
- "multiple": false,
2433
- "type": "option"
2434
- }
2435
- },
2436
- "hasDynamicHelp": false,
2437
- "hiddenAliases": [],
2438
- "id": "docs:search",
2439
- "pluginAlias": "@sanity/cli",
2440
- "pluginName": "@sanity/cli",
2441
- "pluginType": "core",
2442
- "strict": true,
2443
- "isESM": true,
2444
- "relativePath": [
2445
- "dist",
2446
- "commands",
2447
- "docs",
2448
- "search.js"
2449
- ]
2450
- },
2451
2327
  "datasets:copy": {
2452
2328
  "aliases": [],
2453
2329
  "args": {
@@ -3794,6 +3670,130 @@
3794
3670
  "undeploy.js"
3795
3671
  ]
3796
3672
  },
3673
+ "docs:browse": {
3674
+ "aliases": [],
3675
+ "args": {},
3676
+ "description": "Open Sanity docs in your browser",
3677
+ "flags": {},
3678
+ "hasDynamicHelp": false,
3679
+ "hiddenAliases": [],
3680
+ "id": "docs:browse",
3681
+ "pluginAlias": "@sanity/cli",
3682
+ "pluginName": "@sanity/cli",
3683
+ "pluginType": "core",
3684
+ "strict": true,
3685
+ "enableJsonFlag": false,
3686
+ "isESM": true,
3687
+ "relativePath": [
3688
+ "dist",
3689
+ "commands",
3690
+ "docs",
3691
+ "browse.js"
3692
+ ]
3693
+ },
3694
+ "docs:read": {
3695
+ "aliases": [],
3696
+ "args": {
3697
+ "path": {
3698
+ "description": "Path or URL to article, found in search results and docs content as links",
3699
+ "name": "path",
3700
+ "required": true
3701
+ }
3702
+ },
3703
+ "description": "Read an article in terminal",
3704
+ "examples": [
3705
+ {
3706
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
3707
+ "description": "Read as markdown in terminal"
3708
+ },
3709
+ {
3710
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
3711
+ "description": "Read using full URL"
3712
+ },
3713
+ {
3714
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
3715
+ "description": "Open in web browser"
3716
+ },
3717
+ {
3718
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
3719
+ "description": "Open using full URL in web browser"
3720
+ }
3721
+ ],
3722
+ "flags": {
3723
+ "web": {
3724
+ "aliases": [
3725
+ "w"
3726
+ ],
3727
+ "description": "Open in a web browser",
3728
+ "name": "web",
3729
+ "allowNo": false,
3730
+ "type": "boolean"
3731
+ }
3732
+ },
3733
+ "hasDynamicHelp": false,
3734
+ "hiddenAliases": [],
3735
+ "id": "docs:read",
3736
+ "pluginAlias": "@sanity/cli",
3737
+ "pluginName": "@sanity/cli",
3738
+ "pluginType": "core",
3739
+ "strict": true,
3740
+ "isESM": true,
3741
+ "relativePath": [
3742
+ "dist",
3743
+ "commands",
3744
+ "docs",
3745
+ "read.js"
3746
+ ]
3747
+ },
3748
+ "docs:search": {
3749
+ "aliases": [],
3750
+ "args": {
3751
+ "query": {
3752
+ "description": "Search query for documentation",
3753
+ "name": "query",
3754
+ "required": true
3755
+ }
3756
+ },
3757
+ "description": "Search Sanity docs",
3758
+ "examples": [
3759
+ {
3760
+ "command": "<%= config.bin %> <%= command.id %> schema",
3761
+ "description": "Search for documentation about schemas"
3762
+ },
3763
+ {
3764
+ "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3765
+ "description": "Search with phrase"
3766
+ },
3767
+ {
3768
+ "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3769
+ "description": "Limit search results"
3770
+ }
3771
+ ],
3772
+ "flags": {
3773
+ "limit": {
3774
+ "description": "Maximum number of results to return",
3775
+ "name": "limit",
3776
+ "default": 10,
3777
+ "hasDynamicHelp": false,
3778
+ "multiple": false,
3779
+ "type": "option"
3780
+ }
3781
+ },
3782
+ "hasDynamicHelp": false,
3783
+ "hiddenAliases": [],
3784
+ "id": "docs:search",
3785
+ "pluginAlias": "@sanity/cli",
3786
+ "pluginName": "@sanity/cli",
3787
+ "pluginType": "core",
3788
+ "strict": true,
3789
+ "isESM": true,
3790
+ "relativePath": [
3791
+ "dist",
3792
+ "commands",
3793
+ "docs",
3794
+ "search.js"
3795
+ ]
3796
+ },
3797
3797
  "hooks:attempt": {
3798
3798
  "aliases": [],
3799
3799
  "args": {
@@ -4042,45 +4042,6 @@
4042
4042
  "logs.js"
4043
4043
  ]
4044
4044
  },
4045
- "manifest:extract": {
4046
- "aliases": [],
4047
- "args": {},
4048
- "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.",
4049
- "examples": [
4050
- {
4051
- "command": "<%= config.bin %> <%= command.id %>",
4052
- "description": "Extracts manifests"
4053
- },
4054
- {
4055
- "command": "<%= config.bin %> <%= command.id %> --path /public/static",
4056
- "description": "Extracts manifests into /public/static"
4057
- }
4058
- ],
4059
- "flags": {
4060
- "path": {
4061
- "description": "Optional path to specify destination directory of the manifest files",
4062
- "name": "path",
4063
- "default": "dist/static",
4064
- "hasDynamicHelp": false,
4065
- "multiple": false,
4066
- "type": "option"
4067
- }
4068
- },
4069
- "hasDynamicHelp": false,
4070
- "hiddenAliases": [],
4071
- "id": "manifest:extract",
4072
- "pluginAlias": "@sanity/cli",
4073
- "pluginName": "@sanity/cli",
4074
- "pluginType": "core",
4075
- "strict": true,
4076
- "isESM": true,
4077
- "relativePath": [
4078
- "dist",
4079
- "commands",
4080
- "manifest",
4081
- "extract.js"
4082
- ]
4083
- },
4084
4045
  "media:create-aspect": {
4085
4046
  "aliases": [],
4086
4047
  "args": {},
@@ -4696,32 +4657,6 @@
4696
4657
  "list.js"
4697
4658
  ]
4698
4659
  },
4699
- "mcp:configure": {
4700
- "aliases": [],
4701
- "args": {},
4702
- "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)",
4703
- "examples": [
4704
- {
4705
- "command": "<%= config.bin %> <%= command.id %>",
4706
- "description": "Configure Sanity MCP server for detected AI editors"
4707
- }
4708
- ],
4709
- "flags": {},
4710
- "hasDynamicHelp": false,
4711
- "hiddenAliases": [],
4712
- "id": "mcp:configure",
4713
- "pluginAlias": "@sanity/cli",
4714
- "pluginName": "@sanity/cli",
4715
- "pluginType": "core",
4716
- "strict": true,
4717
- "isESM": true,
4718
- "relativePath": [
4719
- "dist",
4720
- "commands",
4721
- "mcp",
4722
- "configure.js"
4723
- ]
4724
- },
4725
4660
  "organizations:create": {
4726
4661
  "aliases": [],
4727
4662
  "args": {},
@@ -5671,19 +5606,23 @@
5671
5606
  "required": false
5672
5607
  }
5673
5608
  },
5674
- "description": "Create a new API token for the project",
5609
+ "description": "Create a new API token with access to an organization and its projects",
5675
5610
  "examples": [
5676
5611
  {
5677
5612
  "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
5678
- "description": "Create a token with a label"
5613
+ "description": "Create a token, choosing its access interactively"
5679
5614
  },
5680
5615
  {
5681
- "command": "<%= config.bin %> <%= command.id %> \"My API Token\" --role=editor",
5682
- "description": "Create a token with editor role"
5616
+ "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --grant context=developer --grant blueprints --grant project:abc123=editor",
5617
+ "description": "Create an organization token with Context, Blueprints and project access"
5618
+ },
5619
+ {
5620
+ "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
5621
+ "description": "Create a project token with editor role"
5683
5622
  },
5684
5623
  {
5685
5624
  "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
5686
- "description": "Create a token in unattended mode"
5625
+ "description": "Create a project token in unattended mode"
5687
5626
  },
5688
5627
  {
5689
5628
  "command": "<%= config.bin %> <%= command.id %> \"Build Token\" --expires-at 2027-01-01",
@@ -5692,10 +5631,6 @@
5692
5631
  {
5693
5632
  "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
5694
5633
  "description": "Output token information as JSON"
5695
- },
5696
- {
5697
- "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
5698
- "description": "Create a token for a specific project"
5699
5634
  }
5700
5635
  ],
5701
5636
  "flags": {
@@ -5709,6 +5644,15 @@
5709
5644
  "multiple": false,
5710
5645
  "type": "option"
5711
5646
  },
5647
+ "organization": {
5648
+ "description": "Organization to create an organization token in (overrides CLI configuration)",
5649
+ "helpGroup": "OVERRIDE",
5650
+ "name": "organization",
5651
+ "hasDynamicHelp": false,
5652
+ "helpValue": "<id>",
5653
+ "multiple": false,
5654
+ "type": "option"
5655
+ },
5712
5656
  "expires-at": {
5713
5657
  "description": "Date or timestamp the token expires (ISO 8601; tokens never expire by default)",
5714
5658
  "name": "expires-at",
@@ -5717,6 +5661,14 @@
5717
5661
  "multiple": false,
5718
5662
  "type": "option"
5719
5663
  },
5664
+ "grant": {
5665
+ "description": "Access to grant, as <permission>[=<role>] or project:<projectId>=<role>[,<role>]. Permissions: context, blueprints, media-library, canvas, sdk-apps, access, deploy-studios. Repeatable",
5666
+ "name": "grant",
5667
+ "hasDynamicHelp": false,
5668
+ "helpValue": "context=editor",
5669
+ "multiple": true,
5670
+ "type": "option"
5671
+ },
5720
5672
  "json": {
5721
5673
  "description": "Output as JSON",
5722
5674
  "name": "json",
@@ -5724,7 +5676,7 @@
5724
5676
  "type": "boolean"
5725
5677
  },
5726
5678
  "role": {
5727
- "description": "Role to assign to the token (defaults to viewer in unattended mode)",
5679
+ "description": "Role to assign on the project (defaults to viewer in unattended mode)",
5728
5680
  "name": "role",
5729
5681
  "hasDynamicHelp": false,
5730
5682
  "helpValue": "viewer",
@@ -6122,6 +6074,126 @@
6122
6074
  "list.js"
6123
6075
  ]
6124
6076
  },
6077
+ "mcp:configure": {
6078
+ "aliases": [],
6079
+ "args": {},
6080
+ "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)",
6081
+ "examples": [
6082
+ {
6083
+ "command": "<%= config.bin %> <%= command.id %>",
6084
+ "description": "Configure Sanity MCP server for detected AI editors"
6085
+ }
6086
+ ],
6087
+ "flags": {},
6088
+ "hasDynamicHelp": false,
6089
+ "hiddenAliases": [],
6090
+ "id": "mcp:configure",
6091
+ "pluginAlias": "@sanity/cli",
6092
+ "pluginName": "@sanity/cli",
6093
+ "pluginType": "core",
6094
+ "strict": true,
6095
+ "isESM": true,
6096
+ "relativePath": [
6097
+ "dist",
6098
+ "commands",
6099
+ "mcp",
6100
+ "configure.js"
6101
+ ]
6102
+ },
6103
+ "manifest:extract": {
6104
+ "aliases": [],
6105
+ "args": {},
6106
+ "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.",
6107
+ "examples": [
6108
+ {
6109
+ "command": "<%= config.bin %> <%= command.id %>",
6110
+ "description": "Extracts manifests"
6111
+ },
6112
+ {
6113
+ "command": "<%= config.bin %> <%= command.id %> --path /public/static",
6114
+ "description": "Extracts manifests into /public/static"
6115
+ }
6116
+ ],
6117
+ "flags": {
6118
+ "path": {
6119
+ "description": "Optional path to specify destination directory of the manifest files",
6120
+ "name": "path",
6121
+ "default": "dist/static",
6122
+ "hasDynamicHelp": false,
6123
+ "multiple": false,
6124
+ "type": "option"
6125
+ }
6126
+ },
6127
+ "hasDynamicHelp": false,
6128
+ "hiddenAliases": [],
6129
+ "id": "manifest:extract",
6130
+ "pluginAlias": "@sanity/cli",
6131
+ "pluginName": "@sanity/cli",
6132
+ "pluginType": "core",
6133
+ "strict": true,
6134
+ "isESM": true,
6135
+ "relativePath": [
6136
+ "dist",
6137
+ "commands",
6138
+ "manifest",
6139
+ "extract.js"
6140
+ ]
6141
+ },
6142
+ "context:jobs:get": {
6143
+ "aliases": [],
6144
+ "args": {
6145
+ "knowledgeBaseId": {
6146
+ "description": "Knowledge base ID",
6147
+ "name": "knowledgeBaseId",
6148
+ "required": true
6149
+ },
6150
+ "jobId": {
6151
+ "description": "Job ID",
6152
+ "name": "jobId",
6153
+ "required": true
6154
+ }
6155
+ },
6156
+ "description": "Get the status of a knowledge base job",
6157
+ "examples": [
6158
+ {
6159
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6160
+ "description": "Get the current status of a job"
6161
+ },
6162
+ {
6163
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6164
+ "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6165
+ }
6166
+ ],
6167
+ "flags": {
6168
+ "json": {
6169
+ "description": "Output the job in JSON format",
6170
+ "name": "json",
6171
+ "allowNo": false,
6172
+ "type": "boolean"
6173
+ },
6174
+ "watch": {
6175
+ "description": "Poll until the job reaches a terminal state",
6176
+ "name": "watch",
6177
+ "allowNo": false,
6178
+ "type": "boolean"
6179
+ }
6180
+ },
6181
+ "hasDynamicHelp": false,
6182
+ "hiddenAliases": [],
6183
+ "id": "context:jobs:get",
6184
+ "pluginAlias": "@sanity/cli",
6185
+ "pluginName": "@sanity/cli",
6186
+ "pluginType": "core",
6187
+ "strict": true,
6188
+ "isESM": true,
6189
+ "relativePath": [
6190
+ "dist",
6191
+ "commands",
6192
+ "context",
6193
+ "jobs",
6194
+ "get.js"
6195
+ ]
6196
+ },
6125
6197
  "context:imports:create": {
6126
6198
  "aliases": [],
6127
6199
  "args": {
@@ -6488,61 +6560,6 @@
6488
6560
  "list.js"
6489
6561
  ]
6490
6562
  },
6491
- "context:jobs:get": {
6492
- "aliases": [],
6493
- "args": {
6494
- "knowledgeBaseId": {
6495
- "description": "Knowledge base ID",
6496
- "name": "knowledgeBaseId",
6497
- "required": true
6498
- },
6499
- "jobId": {
6500
- "description": "Job ID",
6501
- "name": "jobId",
6502
- "required": true
6503
- }
6504
- },
6505
- "description": "Get the status of a knowledge base job",
6506
- "examples": [
6507
- {
6508
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6509
- "description": "Get the current status of a job"
6510
- },
6511
- {
6512
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6513
- "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6514
- }
6515
- ],
6516
- "flags": {
6517
- "json": {
6518
- "description": "Output the job in JSON format",
6519
- "name": "json",
6520
- "allowNo": false,
6521
- "type": "boolean"
6522
- },
6523
- "watch": {
6524
- "description": "Poll until the job reaches a terminal state",
6525
- "name": "watch",
6526
- "allowNo": false,
6527
- "type": "boolean"
6528
- }
6529
- },
6530
- "hasDynamicHelp": false,
6531
- "hiddenAliases": [],
6532
- "id": "context:jobs:get",
6533
- "pluginAlias": "@sanity/cli",
6534
- "pluginName": "@sanity/cli",
6535
- "pluginType": "core",
6536
- "strict": true,
6537
- "isESM": true,
6538
- "relativePath": [
6539
- "dist",
6540
- "commands",
6541
- "context",
6542
- "jobs",
6543
- "get.js"
6544
- ]
6545
- },
6546
6563
  "datasets:alias:create": {
6547
6564
  "aliases": [],
6548
6565
  "args": {
@@ -7058,5 +7075,5 @@
7058
7075
  ]
7059
7076
  }
7060
7077
  },
7061
- "version": "8.17.1"
7078
+ "version": "8.19.0"
7062
7079
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "8.17.1",
3
+ "version": "8.19.0",
4
4
  "description": "Sanity CLI tool for managing Sanity projects and organizations",
5
5
  "keywords": [
6
6
  "cli",
@@ -63,7 +63,7 @@
63
63
  "@oclif/plugin-help": "^6.2.53",
64
64
  "@oclif/plugin-not-found": "^3.2.88",
65
65
  "@sanity/cli-build": "^6.4.5",
66
- "@sanity/cli-core": "^3.9.2",
66
+ "@sanity/cli-core": "^3.10.0",
67
67
  "@sanity/client": "^8.9.0",
68
68
  "@sanity/codegen": "^8.2.0",
69
69
  "@sanity/descriptors": "^1.3.0",
@@ -78,7 +78,7 @@
78
78
  "@sanity/telemetry": "^1.1.0",
79
79
  "@sanity/template-validator": "^3.1.1",
80
80
  "@sanity/types": "^6.17.0",
81
- "@sanity/workbench-cli": "^2.10.0",
81
+ "@sanity/workbench-cli": "^2.11.0",
82
82
  "@sanity/worker-channels": "^2.0.0",
83
83
  "@sanity/workflow-cli": "0.36.0",
84
84
  "@sanity/workflow-engine": "0.36.0",
@@ -127,7 +127,7 @@
127
127
  "@eslint/compat": "^2.1.0",
128
128
  "@repo/package.config": "0.0.1",
129
129
  "@repo/tsconfig": "3.70.0",
130
- "@sanity/cli-test": "19.0.2",
130
+ "@sanity/cli-test": "20.0.0",
131
131
  "@sanity/eslint-config-cli": "1.1.3",
132
132
  "@sanity/pkg-utils": "^12.3.4",
133
133
  "@swc/cli": "^0.8.1",