@sanity/cli 8.24.0 → 8.25.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.
- package/README.md +88 -87
- package/bin/run.js +7 -1
- package/dist/actions/dev/devAction.js +48 -44
- package/dist/actions/dev/devAction.js.map +1 -1
- package/dist/actions/init/initHelpers.js +1 -1
- package/dist/actions/init/initHelpers.js.map +1 -1
- package/dist/actions/init/initStudio.js +1 -1
- package/dist/actions/init/initStudio.js.map +1 -1
- package/dist/actions/init/project/getOrCreateDataset.js +2 -7
- package/dist/actions/init/project/getOrCreateDataset.js.map +1 -1
- package/dist/commands/api.js +1 -1
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/assets/upload.js +1 -1
- package/dist/commands/assets/upload.js.map +1 -1
- package/dist/commands/cors/add.js +1 -1
- package/dist/commands/cors/add.js.map +1 -1
- package/dist/commands/cors/delete.js +1 -1
- package/dist/commands/cors/delete.js.map +1 -1
- package/dist/commands/cors/list.js +1 -1
- package/dist/commands/cors/list.js.map +1 -1
- package/dist/commands/datasets/alias/create.js +1 -1
- package/dist/commands/datasets/alias/create.js.map +1 -1
- package/dist/commands/datasets/import.js +0 -8
- package/dist/commands/datasets/import.js.map +1 -1
- package/dist/commands/datasets/list.js +1 -1
- package/dist/commands/datasets/list.js.map +1 -1
- package/dist/commands/documents/create.js +1 -1
- package/dist/commands/documents/create.js.map +1 -1
- package/dist/commands/documents/delete.js +1 -1
- package/dist/commands/documents/delete.js.map +1 -1
- package/dist/commands/documents/get.js +1 -1
- package/dist/commands/documents/get.js.map +1 -1
- package/dist/commands/documents/query.js +1 -9
- package/dist/commands/documents/query.js.map +1 -1
- package/dist/commands/documents/validate.js +2 -2
- package/dist/commands/documents/validate.js.map +1 -1
- package/dist/commands/graphql/list.js +1 -1
- package/dist/commands/graphql/list.js.map +1 -1
- package/dist/commands/graphql/undeploy.js +1 -11
- package/dist/commands/graphql/undeploy.js.map +1 -1
- package/dist/commands/hooks/attempt.js +1 -1
- package/dist/commands/hooks/attempt.js.map +1 -1
- package/dist/commands/hooks/create.js +1 -1
- package/dist/commands/hooks/create.js.map +1 -1
- package/dist/commands/hooks/delete.js +1 -1
- package/dist/commands/hooks/delete.js.map +1 -1
- package/dist/commands/hooks/list.js +1 -1
- package/dist/commands/hooks/list.js.map +1 -1
- package/dist/commands/hooks/logs.js +1 -1
- package/dist/commands/hooks/logs.js.map +1 -1
- package/dist/commands/init.js +3 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrations/run.js +5 -5
- package/dist/commands/migrations/run.js.map +1 -1
- package/dist/commands/projects/unclaimed.js +6 -5
- package/dist/commands/projects/unclaimed.js.map +1 -1
- package/dist/commands/tokens/create.js +4 -4
- package/dist/commands/tokens/create.js.map +1 -1
- package/dist/commands/tokens/delete.js +2 -2
- package/dist/commands/tokens/delete.js.map +1 -1
- package/dist/commands/tokens/list.js +2 -2
- package/dist/commands/tokens/list.js.map +1 -1
- package/dist/commands/users/invite.js +1 -1
- package/dist/commands/users/invite.js.map +1 -1
- package/dist/commands/users/list.js +1 -1
- package/dist/commands/users/list.js.map +1 -1
- package/dist/exports/invokeSanityCli/index.js +1 -1
- package/dist/exports/invokeSanityCli/index.js.map +1 -1
- package/dist/hooks/prerun/injectEnvVariables.js +1 -1
- package/dist/hooks/prerun/injectEnvVariables.js.map +1 -1
- package/dist/util/sharedFlags.js +8 -4
- package/dist/util/sharedFlags.js.map +1 -1
- package/dist/util/warnOnNonProductionEnvironment.js +4 -3
- package/dist/util/warnOnNonProductionEnvironment.js.map +1 -1
- package/oclif.manifest.json +1917 -1753
- package/package.json +5 -5
- package/dist/util/getSanityEnv.js +0 -8
- package/dist/util/getSanityEnv.js.map +0 -1
package/README.md
CHANGED
|
@@ -199,8 +199,8 @@ FLAGS
|
|
|
199
199
|
--project-hosted Force the request to the project API host (<projectId>.api.sanity.io)
|
|
200
200
|
|
|
201
201
|
OVERRIDE FLAGS
|
|
202
|
-
-d, --dataset=<name>
|
|
203
|
-
-p, --project
|
|
202
|
+
-d, --dataset=<name> Dataset for {dataset} placeholders (overrides CLI configuration)
|
|
203
|
+
-p, --project=<id> Project ID for {projectId} placeholders and project-hosted APIs (overrides CLI configuration)
|
|
204
204
|
|
|
205
205
|
DESCRIPTION
|
|
206
206
|
Make an authenticated HTTP request to a Sanity API
|
|
@@ -274,8 +274,8 @@ FLAGS
|
|
|
274
274
|
<options: image|file>
|
|
275
275
|
|
|
276
276
|
OVERRIDE FLAGS
|
|
277
|
-
-d, --dataset=<name>
|
|
278
|
-
-p, --project
|
|
277
|
+
-d, --dataset=<name> Dataset to upload the asset to (overrides CLI configuration)
|
|
278
|
+
-p, --project=<id> Project ID to upload the asset to (overrides CLI configuration)
|
|
279
279
|
|
|
280
280
|
DESCRIPTION
|
|
281
281
|
Upload one image or file to a Sanity dataset, from a local path or a URL, and print the asset document as JSON
|
|
@@ -287,8 +287,8 @@ EXAMPLES
|
|
|
287
287
|
|
|
288
288
|
Upload a file with explicit project, dataset, and MIME type
|
|
289
289
|
|
|
290
|
-
$ sanity assets upload --file ./brief.pdf --type file --content-type application/pdf --project
|
|
291
|
-
|
|
290
|
+
$ sanity assets upload --file ./brief.pdf --type file --content-type application/pdf --project abc123 --dataset \
|
|
291
|
+
production
|
|
292
292
|
|
|
293
293
|
Have Sanity fetch an image from a public URL
|
|
294
294
|
|
|
@@ -307,7 +307,7 @@ ARGUMENTS
|
|
|
307
307
|
[DATASET] Dataset name to disable backup for
|
|
308
308
|
|
|
309
309
|
OVERRIDE FLAGS
|
|
310
|
-
-p, --project
|
|
310
|
+
-p, --project=<id> Project ID to disable backups for (overrides CLI configuration)
|
|
311
311
|
|
|
312
312
|
DESCRIPTION
|
|
313
313
|
Disable backup for a dataset
|
|
@@ -341,7 +341,7 @@ FLAGS
|
|
|
341
341
|
--overwrite Allows overwriting of existing backup file
|
|
342
342
|
|
|
343
343
|
OVERRIDE FLAGS
|
|
344
|
-
-p, --project
|
|
344
|
+
-p, --project=<id> Project ID to download backup from (overrides CLI configuration)
|
|
345
345
|
|
|
346
346
|
DESCRIPTION
|
|
347
347
|
Download a dataset backup to a local file
|
|
@@ -376,7 +376,7 @@ ARGUMENTS
|
|
|
376
376
|
[DATASET] Dataset name to enable backup for
|
|
377
377
|
|
|
378
378
|
OVERRIDE FLAGS
|
|
379
|
-
-p, --project
|
|
379
|
+
-p, --project=<id> Project ID to enable backups for (overrides CLI configuration)
|
|
380
380
|
|
|
381
381
|
DESCRIPTION
|
|
382
382
|
Enable backup for a dataset
|
|
@@ -408,7 +408,7 @@ FLAGS
|
|
|
408
408
|
--before=<value> Only return backups before this date (exclusive, YYYY-MM-DD format)
|
|
409
409
|
|
|
410
410
|
OVERRIDE FLAGS
|
|
411
|
-
-p, --project
|
|
411
|
+
-p, --project=<id> Project ID to list backups for (overrides CLI configuration)
|
|
412
412
|
|
|
413
413
|
DESCRIPTION
|
|
414
414
|
List available backups for a dataset
|
|
@@ -1686,7 +1686,7 @@ FLAGS
|
|
|
1686
1686
|
--[no-]credentials Allow credentials (token/cookie) to be sent from this origin
|
|
1687
1687
|
|
|
1688
1688
|
OVERRIDE FLAGS
|
|
1689
|
-
-p, --project
|
|
1689
|
+
-p, --project=<id> Project ID to add CORS origin to (overrides CLI configuration)
|
|
1690
1690
|
|
|
1691
1691
|
DESCRIPTION
|
|
1692
1692
|
Add a CORS origin to the project
|
|
@@ -1706,7 +1706,7 @@ EXAMPLES
|
|
|
1706
1706
|
|
|
1707
1707
|
Add a CORS origin for a specific project
|
|
1708
1708
|
|
|
1709
|
-
$ sanity cors add https://myapp.com --project
|
|
1709
|
+
$ sanity cors add https://myapp.com --project abc123
|
|
1710
1710
|
```
|
|
1711
1711
|
|
|
1712
1712
|
## `sanity cors delete [ORIGIN]`
|
|
@@ -1721,7 +1721,7 @@ ARGUMENTS
|
|
|
1721
1721
|
[ORIGIN] Origin to delete (will prompt if not provided)
|
|
1722
1722
|
|
|
1723
1723
|
OVERRIDE FLAGS
|
|
1724
|
-
-p, --project
|
|
1724
|
+
-p, --project=<id> Project ID to delete CORS origin from (overrides CLI configuration)
|
|
1725
1725
|
|
|
1726
1726
|
DESCRIPTION
|
|
1727
1727
|
Delete a CORS origin from the project
|
|
@@ -1737,7 +1737,7 @@ EXAMPLES
|
|
|
1737
1737
|
|
|
1738
1738
|
Delete a CORS origin from a specific project
|
|
1739
1739
|
|
|
1740
|
-
$ sanity cors delete --project
|
|
1740
|
+
$ sanity cors delete --project abc123
|
|
1741
1741
|
```
|
|
1742
1742
|
|
|
1743
1743
|
## `sanity cors list`
|
|
@@ -1749,7 +1749,7 @@ USAGE
|
|
|
1749
1749
|
$ sanity cors list [-p <id>]
|
|
1750
1750
|
|
|
1751
1751
|
OVERRIDE FLAGS
|
|
1752
|
-
-p, --project
|
|
1752
|
+
-p, --project=<id> Project ID to list CORS origins for (overrides CLI configuration)
|
|
1753
1753
|
|
|
1754
1754
|
DESCRIPTION
|
|
1755
1755
|
List CORS origins for the project
|
|
@@ -1761,7 +1761,7 @@ EXAMPLES
|
|
|
1761
1761
|
|
|
1762
1762
|
List CORS origins for a specific project
|
|
1763
1763
|
|
|
1764
|
-
$ sanity cors list --project
|
|
1764
|
+
$ sanity cors list --project abc123
|
|
1765
1765
|
```
|
|
1766
1766
|
|
|
1767
1767
|
## `sanity datasets alias create [ALIASNAME] [TARGETDATASET]`
|
|
@@ -1777,7 +1777,7 @@ ARGUMENTS
|
|
|
1777
1777
|
[TARGETDATASET] Target dataset name to link the alias to
|
|
1778
1778
|
|
|
1779
1779
|
OVERRIDE FLAGS
|
|
1780
|
-
-p, --project
|
|
1780
|
+
-p, --project=<id> Project ID to create dataset alias in (overrides CLI configuration)
|
|
1781
1781
|
|
|
1782
1782
|
DESCRIPTION
|
|
1783
1783
|
Create a dataset alias for the project
|
|
@@ -1785,7 +1785,7 @@ DESCRIPTION
|
|
|
1785
1785
|
EXAMPLES
|
|
1786
1786
|
Create alias in a specific project
|
|
1787
1787
|
|
|
1788
|
-
$ sanity datasets alias create --project
|
|
1788
|
+
$ sanity datasets alias create --project abc123 conference conf-2025
|
|
1789
1789
|
|
|
1790
1790
|
Create an alias with interactive prompts
|
|
1791
1791
|
|
|
@@ -1815,7 +1815,7 @@ FLAGS
|
|
|
1815
1815
|
--force Skip confirmation prompt and delete immediately
|
|
1816
1816
|
|
|
1817
1817
|
OVERRIDE FLAGS
|
|
1818
|
-
-p, --project
|
|
1818
|
+
-p, --project=<id> Project ID to delete dataset alias from (overrides CLI configuration)
|
|
1819
1819
|
|
|
1820
1820
|
DESCRIPTION
|
|
1821
1821
|
Delete a dataset alias from the project
|
|
@@ -1846,7 +1846,7 @@ FLAGS
|
|
|
1846
1846
|
--force Skip confirmation prompt when relinking existing alias
|
|
1847
1847
|
|
|
1848
1848
|
OVERRIDE FLAGS
|
|
1849
|
-
-p, --project
|
|
1849
|
+
-p, --project=<id> Project ID to link dataset alias in (overrides CLI configuration)
|
|
1850
1850
|
|
|
1851
1851
|
DESCRIPTION
|
|
1852
1852
|
Link a dataset alias to a dataset in the project
|
|
@@ -1884,7 +1884,7 @@ FLAGS
|
|
|
1884
1884
|
--force Skip confirmation prompt and unlink immediately
|
|
1885
1885
|
|
|
1886
1886
|
OVERRIDE FLAGS
|
|
1887
|
-
-p, --project
|
|
1887
|
+
-p, --project=<id> Project ID to unlink dataset alias in (overrides CLI configuration)
|
|
1888
1888
|
|
|
1889
1889
|
DESCRIPTION
|
|
1890
1890
|
Unlink a dataset alias from its dataset in the project
|
|
@@ -1926,7 +1926,7 @@ FLAGS
|
|
|
1926
1926
|
--skip-history Don't preserve document history on copy
|
|
1927
1927
|
|
|
1928
1928
|
OVERRIDE FLAGS
|
|
1929
|
-
-p, --project
|
|
1929
|
+
-p, --project=<id> Project ID to copy dataset in (overrides CLI configuration)
|
|
1930
1930
|
|
|
1931
1931
|
DESCRIPTION
|
|
1932
1932
|
Copy a dataset or manage copy jobs
|
|
@@ -1988,7 +1988,7 @@ FLAGS
|
|
|
1988
1988
|
<options: custom|private|public>
|
|
1989
1989
|
|
|
1990
1990
|
OVERRIDE FLAGS
|
|
1991
|
-
-p, --project
|
|
1991
|
+
-p, --project=<id> Project ID to create dataset in (overrides CLI configuration)
|
|
1992
1992
|
|
|
1993
1993
|
DESCRIPTION
|
|
1994
1994
|
Create a new dataset for the project
|
|
@@ -2022,7 +2022,7 @@ FLAGS
|
|
|
2022
2022
|
--force Do not prompt for delete confirmation - forcefully delete
|
|
2023
2023
|
|
|
2024
2024
|
OVERRIDE FLAGS
|
|
2025
|
-
-p, --project
|
|
2025
|
+
-p, --project=<id> Project ID to delete dataset from (overrides CLI configuration)
|
|
2026
2026
|
|
|
2027
2027
|
DESCRIPTION
|
|
2028
2028
|
Delete a dataset from the project
|
|
@@ -2049,7 +2049,7 @@ ARGUMENTS
|
|
|
2049
2049
|
[DATASET] Dataset name to disable embeddings for
|
|
2050
2050
|
|
|
2051
2051
|
OVERRIDE FLAGS
|
|
2052
|
-
-p, --project
|
|
2052
|
+
-p, --project=<id> Project ID to disable embeddings for (overrides CLI configuration)
|
|
2053
2053
|
|
|
2054
2054
|
DESCRIPTION
|
|
2055
2055
|
Disable embeddings for a dataset
|
|
@@ -2076,7 +2076,7 @@ FLAGS
|
|
|
2076
2076
|
--wait Wait for embeddings processing to complete before returning
|
|
2077
2077
|
|
|
2078
2078
|
OVERRIDE FLAGS
|
|
2079
|
-
-p, --project
|
|
2079
|
+
-p, --project=<id> Project ID to enable embeddings for (overrides CLI configuration)
|
|
2080
2080
|
|
|
2081
2081
|
DESCRIPTION
|
|
2082
2082
|
Enable embeddings for a dataset
|
|
@@ -2107,7 +2107,7 @@ ARGUMENTS
|
|
|
2107
2107
|
[DATASET] The name of the dataset to check embeddings status for
|
|
2108
2108
|
|
|
2109
2109
|
OVERRIDE FLAGS
|
|
2110
|
-
-p, --project
|
|
2110
|
+
-p, --project=<id> Project ID to check embeddings status for (overrides CLI configuration)
|
|
2111
2111
|
|
|
2112
2112
|
DESCRIPTION
|
|
2113
2113
|
Show embeddings settings and status for a dataset
|
|
@@ -2145,7 +2145,7 @@ FLAGS
|
|
|
2145
2145
|
--types=<value> Defines which document types to export (comma-separated)
|
|
2146
2146
|
|
|
2147
2147
|
OVERRIDE FLAGS
|
|
2148
|
-
-p, --project
|
|
2148
|
+
-p, --project=<id> Project ID to export dataset from (overrides CLI configuration)
|
|
2149
2149
|
|
|
2150
2150
|
DESCRIPTION
|
|
2151
2151
|
Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.
|
|
@@ -2200,7 +2200,7 @@ FLAGS
|
|
|
2200
2200
|
--skip-cross-dataset-references Skips references to other datasets
|
|
2201
2201
|
|
|
2202
2202
|
OVERRIDE FLAGS
|
|
2203
|
-
-p, --project
|
|
2203
|
+
-p, --project=<id> Project ID to import to (overrides CLI configuration)
|
|
2204
2204
|
|
|
2205
2205
|
DESCRIPTION
|
|
2206
2206
|
Import documents to a Sanity dataset
|
|
@@ -2232,7 +2232,7 @@ USAGE
|
|
|
2232
2232
|
$ sanity datasets list [-p <id>]
|
|
2233
2233
|
|
|
2234
2234
|
OVERRIDE FLAGS
|
|
2235
|
-
-p, --project
|
|
2235
|
+
-p, --project=<id> Project ID to list datasets for (overrides CLI configuration)
|
|
2236
2236
|
|
|
2237
2237
|
DESCRIPTION
|
|
2238
2238
|
List datasets for the project
|
|
@@ -2244,7 +2244,7 @@ EXAMPLES
|
|
|
2244
2244
|
|
|
2245
2245
|
List datasets for a specific project
|
|
2246
2246
|
|
|
2247
|
-
$ sanity datasets list --project
|
|
2247
|
+
$ sanity datasets list --project abc123
|
|
2248
2248
|
```
|
|
2249
2249
|
|
|
2250
2250
|
## `sanity datasets visibility get DATASET`
|
|
@@ -2259,7 +2259,7 @@ ARGUMENTS
|
|
|
2259
2259
|
DATASET The name of the dataset to get visibility for
|
|
2260
2260
|
|
|
2261
2261
|
OVERRIDE FLAGS
|
|
2262
|
-
-p, --project
|
|
2262
|
+
-p, --project=<id> Project ID to get dataset visibility for (overrides CLI configuration)
|
|
2263
2263
|
|
|
2264
2264
|
DESCRIPTION
|
|
2265
2265
|
Get the visibility of a dataset
|
|
@@ -2283,7 +2283,7 @@ ARGUMENTS
|
|
|
2283
2283
|
MODE (public|private) The visibility mode to set
|
|
2284
2284
|
|
|
2285
2285
|
OVERRIDE FLAGS
|
|
2286
|
-
-p, --project
|
|
2286
|
+
-p, --project=<id> Project ID to set dataset visibility for (overrides CLI configuration)
|
|
2287
2287
|
|
|
2288
2288
|
DESCRIPTION
|
|
2289
2289
|
Set the visibility of a dataset
|
|
@@ -2537,8 +2537,8 @@ FLAGS
|
|
|
2537
2537
|
--watch Write the documents whenever the target file or buffer changes
|
|
2538
2538
|
|
|
2539
2539
|
OVERRIDE FLAGS
|
|
2540
|
-
-d, --dataset=<name>
|
|
2541
|
-
-p, --project
|
|
2540
|
+
-d, --dataset=<name> Dataset to create document(s) in (overrides CLI configuration)
|
|
2541
|
+
-p, --project=<id> Project ID to create document(s) in (overrides CLI configuration)
|
|
2542
2542
|
|
|
2543
2543
|
DESCRIPTION
|
|
2544
2544
|
Create one or more documents
|
|
@@ -2564,7 +2564,7 @@ EXAMPLES
|
|
|
2564
2564
|
|
|
2565
2565
|
Create documents in a specific project
|
|
2566
2566
|
|
|
2567
|
-
$ sanity documents create myDocument.json --project
|
|
2567
|
+
$ sanity documents create myDocument.json --project abc123
|
|
2568
2568
|
```
|
|
2569
2569
|
|
|
2570
2570
|
## `sanity documents delete ID [IDS]`
|
|
@@ -2580,8 +2580,8 @@ ARGUMENTS
|
|
|
2580
2580
|
[IDS...] Additional document IDs to delete
|
|
2581
2581
|
|
|
2582
2582
|
OVERRIDE FLAGS
|
|
2583
|
-
-d, --dataset=<name>
|
|
2584
|
-
-p, --project
|
|
2583
|
+
-d, --dataset=<name> Dataset to delete from (overrides CLI configuration)
|
|
2584
|
+
-p, --project=<id> Project ID to delete from (overrides CLI configuration)
|
|
2585
2585
|
|
|
2586
2586
|
DESCRIPTION
|
|
2587
2587
|
Delete one or more documents from the project's configured dataset
|
|
@@ -2605,7 +2605,7 @@ EXAMPLES
|
|
|
2605
2605
|
|
|
2606
2606
|
Delete a document from a specific project
|
|
2607
2607
|
|
|
2608
|
-
$ sanity documents delete myDocId --project
|
|
2608
|
+
$ sanity documents delete myDocId --project abc123
|
|
2609
2609
|
```
|
|
2610
2610
|
|
|
2611
2611
|
## `sanity documents get DOCUMENTID`
|
|
@@ -2623,8 +2623,8 @@ FLAGS
|
|
|
2623
2623
|
--pretty Colorize JSON output
|
|
2624
2624
|
|
|
2625
2625
|
OVERRIDE FLAGS
|
|
2626
|
-
-d, --dataset=<name>
|
|
2627
|
-
-p, --project
|
|
2626
|
+
-d, --dataset=<name> Dataset to get document from (overrides CLI configuration)
|
|
2627
|
+
-p, --project=<id> Project ID to get document from (overrides CLI configuration)
|
|
2628
2628
|
|
|
2629
2629
|
DESCRIPTION
|
|
2630
2630
|
Get and print a document by ID
|
|
@@ -2644,7 +2644,7 @@ EXAMPLES
|
|
|
2644
2644
|
|
|
2645
2645
|
Get a document from a specific project
|
|
2646
2646
|
|
|
2647
|
-
$ sanity documents get myDocId --project
|
|
2647
|
+
$ sanity documents get myDocId --project abc123
|
|
2648
2648
|
```
|
|
2649
2649
|
|
|
2650
2650
|
## `sanity documents query QUERY`
|
|
@@ -2664,8 +2664,8 @@ FLAGS
|
|
|
2664
2664
|
--pretty Colorize JSON output
|
|
2665
2665
|
|
|
2666
2666
|
OVERRIDE FLAGS
|
|
2667
|
-
-d, --dataset=<name>
|
|
2668
|
-
-p, --project
|
|
2667
|
+
-d, --dataset=<name> Dataset to query (overrides CLI configuration)
|
|
2668
|
+
-p, --project=<id> Project ID to query (overrides CLI configuration)
|
|
2669
2669
|
|
|
2670
2670
|
DESCRIPTION
|
|
2671
2671
|
Query for documents
|
|
@@ -2685,7 +2685,7 @@ EXAMPLES
|
|
|
2685
2685
|
|
|
2686
2686
|
Query documents in a specific project and dataset
|
|
2687
2687
|
|
|
2688
|
-
$ sanity documents query '*[_type == "post"]' --project
|
|
2688
|
+
$ sanity documents query '*[_type == "post"]' --project abc123 --dataset production
|
|
2689
2689
|
```
|
|
2690
2690
|
|
|
2691
2691
|
## `sanity documents validate`
|
|
@@ -2701,7 +2701,7 @@ USAGE
|
|
|
2701
2701
|
FLAGS
|
|
2702
2702
|
-d, --dataset=<name> Override the dataset used. By default, this is derived from the given
|
|
2703
2703
|
workspace
|
|
2704
|
-
-p, --project
|
|
2704
|
+
-p, --project=<id> Override the project ID used. By default, this is derived from the
|
|
2705
2705
|
given workspace
|
|
2706
2706
|
-y, --yes Skips the first confirmation prompt
|
|
2707
2707
|
--file=<value> Path to an NDJSON file or tar archive containing an NDJSON file
|
|
@@ -2739,7 +2739,7 @@ EXAMPLES
|
|
|
2739
2739
|
|
|
2740
2740
|
Validate documents in a specific project and dataset
|
|
2741
2741
|
|
|
2742
|
-
$ sanity documents validate --project
|
|
2742
|
+
$ sanity documents validate --project abc123 --dataset production
|
|
2743
2743
|
```
|
|
2744
2744
|
|
|
2745
2745
|
## `sanity exec SCRIPT`
|
|
@@ -3097,7 +3097,7 @@ USAGE
|
|
|
3097
3097
|
$ sanity graphql list [-p <id>]
|
|
3098
3098
|
|
|
3099
3099
|
OVERRIDE FLAGS
|
|
3100
|
-
-p, --project
|
|
3100
|
+
-p, --project=<id> Project ID to list GraphQL endpoints for (overrides CLI configuration)
|
|
3101
3101
|
|
|
3102
3102
|
DESCRIPTION
|
|
3103
3103
|
List deployed GraphQL endpoints for the project
|
|
@@ -3109,7 +3109,7 @@ EXAMPLES
|
|
|
3109
3109
|
|
|
3110
3110
|
List GraphQL endpoints for a specific project
|
|
3111
3111
|
|
|
3112
|
-
$ sanity graphql list --project
|
|
3112
|
+
$ sanity graphql list --project abc123
|
|
3113
3113
|
```
|
|
3114
3114
|
|
|
3115
3115
|
## `sanity graphql undeploy`
|
|
@@ -3118,7 +3118,7 @@ Remove a deployed GraphQL API
|
|
|
3118
3118
|
|
|
3119
3119
|
```
|
|
3120
3120
|
USAGE
|
|
3121
|
-
$ sanity graphql undeploy [--api <value> | -p <id>
|
|
3121
|
+
$ sanity graphql undeploy [--api <value> | -p <id>] [-d <name>] [--force] [--tag <value>]
|
|
3122
3122
|
|
|
3123
3123
|
FLAGS
|
|
3124
3124
|
--api=<value> Undeploy API with this ID
|
|
@@ -3126,8 +3126,8 @@ FLAGS
|
|
|
3126
3126
|
--tag=<value> [default: default] Tag to undeploy GraphQL API from
|
|
3127
3127
|
|
|
3128
3128
|
OVERRIDE FLAGS
|
|
3129
|
-
-d, --dataset=<name>
|
|
3130
|
-
-p, --project
|
|
3129
|
+
-d, --dataset=<name> Dataset to undeploy GraphQL API from (overrides CLI configuration)
|
|
3130
|
+
-p, --project=<id> Project ID to undeploy GraphQL API from (overrides CLI configuration)
|
|
3131
3131
|
|
|
3132
3132
|
DESCRIPTION
|
|
3133
3133
|
Remove a deployed GraphQL API
|
|
@@ -3155,7 +3155,7 @@ EXAMPLES
|
|
|
3155
3155
|
|
|
3156
3156
|
Undeploy GraphQL API for a specific project and dataset
|
|
3157
3157
|
|
|
3158
|
-
$ sanity graphql undeploy --project
|
|
3158
|
+
$ sanity graphql undeploy --project abc123 --dataset production
|
|
3159
3159
|
```
|
|
3160
3160
|
|
|
3161
3161
|
## `sanity help [COMMAND]`
|
|
@@ -3188,7 +3188,7 @@ ARGUMENTS
|
|
|
3188
3188
|
ATTEMPTID The delivery attempt ID to get details for
|
|
3189
3189
|
|
|
3190
3190
|
OVERRIDE FLAGS
|
|
3191
|
-
-p, --project
|
|
3191
|
+
-p, --project=<id> Project ID to view webhook attempt for (overrides CLI configuration)
|
|
3192
3192
|
|
|
3193
3193
|
DESCRIPTION
|
|
3194
3194
|
Print details of a given webhook delivery attempt
|
|
@@ -3200,7 +3200,7 @@ EXAMPLES
|
|
|
3200
3200
|
|
|
3201
3201
|
Get attempt details for a specific project
|
|
3202
3202
|
|
|
3203
|
-
$ sanity hooks attempt abc123 --project
|
|
3203
|
+
$ sanity hooks attempt abc123 --project projectId
|
|
3204
3204
|
```
|
|
3205
3205
|
|
|
3206
3206
|
## `sanity hooks create`
|
|
@@ -3212,7 +3212,7 @@ USAGE
|
|
|
3212
3212
|
$ sanity hooks create [-p <id>]
|
|
3213
3213
|
|
|
3214
3214
|
OVERRIDE FLAGS
|
|
3215
|
-
-p, --project
|
|
3215
|
+
-p, --project=<id> Project ID to create webhook for (overrides CLI configuration)
|
|
3216
3216
|
|
|
3217
3217
|
DESCRIPTION
|
|
3218
3218
|
Create a new webhook for the project
|
|
@@ -3224,7 +3224,7 @@ EXAMPLES
|
|
|
3224
3224
|
|
|
3225
3225
|
Create a webhook for a specific project
|
|
3226
3226
|
|
|
3227
|
-
$ sanity hooks create --project
|
|
3227
|
+
$ sanity hooks create --project abc123
|
|
3228
3228
|
```
|
|
3229
3229
|
|
|
3230
3230
|
## `sanity hooks delete [NAME]`
|
|
@@ -3239,7 +3239,7 @@ ARGUMENTS
|
|
|
3239
3239
|
[NAME] Name of webhook to delete (will prompt if not provided)
|
|
3240
3240
|
|
|
3241
3241
|
OVERRIDE FLAGS
|
|
3242
|
-
-p, --project
|
|
3242
|
+
-p, --project=<id> Project ID to delete webhook from (overrides CLI configuration)
|
|
3243
3243
|
|
|
3244
3244
|
DESCRIPTION
|
|
3245
3245
|
Delete a webhook from the project
|
|
@@ -3255,7 +3255,7 @@ EXAMPLES
|
|
|
3255
3255
|
|
|
3256
3256
|
Delete a webhook from a specific project
|
|
3257
3257
|
|
|
3258
|
-
$ sanity hooks delete --project
|
|
3258
|
+
$ sanity hooks delete --project abc123
|
|
3259
3259
|
```
|
|
3260
3260
|
|
|
3261
3261
|
## `sanity hooks list`
|
|
@@ -3267,7 +3267,7 @@ USAGE
|
|
|
3267
3267
|
$ sanity hooks list [-p <id>]
|
|
3268
3268
|
|
|
3269
3269
|
OVERRIDE FLAGS
|
|
3270
|
-
-p, --project
|
|
3270
|
+
-p, --project=<id> Project ID to list webhooks for (overrides CLI configuration)
|
|
3271
3271
|
|
|
3272
3272
|
DESCRIPTION
|
|
3273
3273
|
List webhooks for the project
|
|
@@ -3279,7 +3279,7 @@ EXAMPLES
|
|
|
3279
3279
|
|
|
3280
3280
|
List webhooks for a specific project
|
|
3281
3281
|
|
|
3282
|
-
$ sanity hooks list --project
|
|
3282
|
+
$ sanity hooks list --project abc123
|
|
3283
3283
|
```
|
|
3284
3284
|
|
|
3285
3285
|
## `sanity hooks logs [NAME]`
|
|
@@ -3297,7 +3297,7 @@ FLAGS
|
|
|
3297
3297
|
--detailed Include detailed payload and attempts
|
|
3298
3298
|
|
|
3299
3299
|
OVERRIDE FLAGS
|
|
3300
|
-
-p, --project
|
|
3300
|
+
-p, --project=<id> Project ID to view webhook logs for (overrides CLI configuration)
|
|
3301
3301
|
|
|
3302
3302
|
DESCRIPTION
|
|
3303
3303
|
Show log entries for project webhooks
|
|
@@ -3313,7 +3313,7 @@ EXAMPLES
|
|
|
3313
3313
|
|
|
3314
3314
|
Show log entries for a specific project
|
|
3315
3315
|
|
|
3316
|
-
$ sanity hooks logs --project
|
|
3316
|
+
$ sanity hooks logs --project abc123
|
|
3317
3317
|
```
|
|
3318
3318
|
|
|
3319
3319
|
## `sanity init`
|
|
@@ -3325,10 +3325,11 @@ USAGE
|
|
|
3325
3325
|
$ sanity init [--json] [--auto-updates | --bare] [--coupon <code> | --project-plan <name>] [--dashboard
|
|
3326
3326
|
| | --env <filename>] [--dataset <name> | --dataset-default] [--git <message> | ] [--import-dataset] [--install | ]
|
|
3327
3327
|
[--mcp] [--nextjs-add-config-files] [--nextjs-append-env] [--nextjs-embed-studio] [--organization <id>]
|
|
3328
|
-
[--output-path <path> | ] [--overwrite-files] [--package-manager <manager> | ] [
|
|
3329
|
-
|
|
3328
|
+
[--output-path <path> | ] [--overwrite-files] [--package-manager <manager> | ] [-p <id> | | --project-name <name>]
|
|
3329
|
+
[--provider <provider>] [--skills] [--template <template> | ] [--typescript | ] [--visibility <mode>] [-y]
|
|
3330
3330
|
|
|
3331
3331
|
FLAGS
|
|
3332
|
+
-p, --project=<id> Project ID to use for the studio
|
|
3332
3333
|
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
|
3333
3334
|
--[no-]auto-updates Enable auto updates of studio versions
|
|
3334
3335
|
--bare Skip the Studio initialization and only print the selected project ID and dataset
|
|
@@ -3346,7 +3347,6 @@ FLAGS
|
|
|
3346
3347
|
--output-path=<path> Path to write studio project to
|
|
3347
3348
|
--[no-]overwrite-files Overwrite existing files
|
|
3348
3349
|
--package-manager=<manager> Specify which package manager to use [allowed: npm, yarn, pnpm]
|
|
3349
|
-
--project=<id> Project ID to use for the studio
|
|
3350
3350
|
--project-name=<name> Create a new project with the given name
|
|
3351
3351
|
--project-plan=<name> Optionally select a plan for a new project
|
|
3352
3352
|
--provider=<provider> Login provider to use
|
|
@@ -3566,7 +3566,7 @@ FLAGS
|
|
|
3566
3566
|
--media-library-id=<value> The id of the target media library
|
|
3567
3567
|
|
|
3568
3568
|
OVERRIDE FLAGS
|
|
3569
|
-
-p, --project
|
|
3569
|
+
-p, --project=<id> Project ID to delete media aspect from (overrides CLI configuration)
|
|
3570
3570
|
|
|
3571
3571
|
DESCRIPTION
|
|
3572
3572
|
Delete an aspect definition
|
|
@@ -3593,7 +3593,7 @@ FLAGS
|
|
|
3593
3593
|
--media-library-id=<value> The id of the target media library
|
|
3594
3594
|
|
|
3595
3595
|
OVERRIDE FLAGS
|
|
3596
|
-
-p, --project
|
|
3596
|
+
-p, --project=<id> Project ID to deploy media aspect to (overrides CLI configuration)
|
|
3597
3597
|
|
|
3598
3598
|
DESCRIPTION
|
|
3599
3599
|
Deploy an aspect
|
|
@@ -3627,7 +3627,7 @@ FLAGS
|
|
|
3627
3627
|
--overwrite Overwrite any file with the same name
|
|
3628
3628
|
|
|
3629
3629
|
OVERRIDE FLAGS
|
|
3630
|
-
-p, --project
|
|
3630
|
+
-p, --project=<id> Project ID to export media from (overrides CLI configuration)
|
|
3631
3631
|
|
|
3632
3632
|
DESCRIPTION
|
|
3633
3633
|
Export file and image assets from a media library (excludes video)
|
|
@@ -3668,7 +3668,7 @@ FLAGS
|
|
|
3668
3668
|
aspect data). Only applies to directory and archive imports
|
|
3669
3669
|
|
|
3670
3670
|
OVERRIDE FLAGS
|
|
3671
|
-
-p, --project
|
|
3671
|
+
-p, --project=<id> Project ID to import media to (overrides CLI configuration)
|
|
3672
3672
|
|
|
3673
3673
|
DESCRIPTION
|
|
3674
3674
|
Import a set of assets to the target media library.
|
|
@@ -3743,7 +3743,7 @@ Run a migration against a dataset
|
|
|
3743
3743
|
```
|
|
3744
3744
|
USAGE
|
|
3745
3745
|
$ sanity migrations run [ID] [--api-version <value>] [--concurrency <value>] [--confirm] [--dataset <value>]
|
|
3746
|
-
[--dry-run] [--from-export <value>] [--progress] [
|
|
3746
|
+
[--dry-run] [--from-export <value>] [--progress] [-p <id>]
|
|
3747
3747
|
|
|
3748
3748
|
ARGUMENTS
|
|
3749
3749
|
[ID] ID
|
|
@@ -3758,8 +3758,9 @@ FLAGS
|
|
|
3758
3758
|
--from-export=<value> Use a local dataset export as source for migration instead of calling the Sanity API. Note:
|
|
3759
3759
|
this is only supported for dry runs.
|
|
3760
3760
|
--[no-]progress Display progress during migration (default: true). Use --no-progress to hide output.
|
|
3761
|
-
|
|
3762
|
-
|
|
3761
|
+
|
|
3762
|
+
OVERRIDE FLAGS
|
|
3763
|
+
-p, --project=<id> Project ID of the dataset to migrate (overrides CLI configuration)
|
|
3763
3764
|
|
|
3764
3765
|
DESCRIPTION
|
|
3765
3766
|
Run a migration against a dataset
|
|
@@ -4145,10 +4146,10 @@ Recover details for unclaimed projects created on this machine
|
|
|
4145
4146
|
|
|
4146
4147
|
```
|
|
4147
4148
|
USAGE
|
|
4148
|
-
$ sanity projects unclaimed [
|
|
4149
|
+
$ sanity projects unclaimed [-p <id>]
|
|
4149
4150
|
|
|
4150
4151
|
FLAGS
|
|
4151
|
-
--project
|
|
4152
|
+
-p, --project=<id> Project ID to recover
|
|
4152
4153
|
|
|
4153
4154
|
DESCRIPTION
|
|
4154
4155
|
Recover details for unclaimed projects created on this machine
|
|
@@ -4160,7 +4161,7 @@ EXAMPLES
|
|
|
4160
4161
|
|
|
4161
4162
|
Show recovery details for one project
|
|
4162
4163
|
|
|
4163
|
-
$ sanity projects unclaimed --project
|
|
4164
|
+
$ sanity projects unclaimed --project abc123
|
|
4164
4165
|
```
|
|
4165
4166
|
|
|
4166
4167
|
## `sanity schemas delete`
|
|
@@ -4178,7 +4179,7 @@ FLAGS
|
|
|
4178
4179
|
--verbose Enable verbose logging
|
|
4179
4180
|
|
|
4180
4181
|
OVERRIDE FLAGS
|
|
4181
|
-
-p, --project
|
|
4182
|
+
-p, --project=<id> Project ID to delete schema from (overrides CLI configuration)
|
|
4182
4183
|
|
|
4183
4184
|
DESCRIPTION
|
|
4184
4185
|
Delete schema documents by id
|
|
@@ -4434,7 +4435,7 @@ FLAGS
|
|
|
4434
4435
|
--role=viewer Role to assign on the project (defaults to viewer in unattended mode)
|
|
4435
4436
|
|
|
4436
4437
|
OVERRIDE FLAGS
|
|
4437
|
-
-p, --project
|
|
4438
|
+
-p, --project=<id> Project ID to create token in (overrides CLI configuration)
|
|
4438
4439
|
--organization=<id> Organization to create an organization token in (overrides CLI configuration)
|
|
4439
4440
|
|
|
4440
4441
|
GLOBAL FLAGS
|
|
@@ -4454,7 +4455,7 @@ EXAMPLES
|
|
|
4454
4455
|
|
|
4455
4456
|
Create a project token with editor role
|
|
4456
4457
|
|
|
4457
|
-
$ sanity tokens create "My Token" --project
|
|
4458
|
+
$ sanity tokens create "My Token" --project abc123 --role=editor
|
|
4458
4459
|
|
|
4459
4460
|
Create a project token in unattended mode
|
|
4460
4461
|
|
|
@@ -4485,7 +4486,7 @@ FLAGS
|
|
|
4485
4486
|
--organization=<id> Delete a token managed by this organization
|
|
4486
4487
|
|
|
4487
4488
|
OVERRIDE FLAGS
|
|
4488
|
-
-p, --project
|
|
4489
|
+
-p, --project=<id> Project ID to delete token from (overrides CLI configuration)
|
|
4489
4490
|
|
|
4490
4491
|
DESCRIPTION
|
|
4491
4492
|
Delete an API token from a project or organization
|
|
@@ -4513,7 +4514,7 @@ EXAMPLES
|
|
|
4513
4514
|
|
|
4514
4515
|
Delete a token from a specific project
|
|
4515
4516
|
|
|
4516
|
-
$ sanity tokens delete --project
|
|
4517
|
+
$ sanity tokens delete --project abc123
|
|
4517
4518
|
```
|
|
4518
4519
|
|
|
4519
4520
|
## `sanity tokens list`
|
|
@@ -4528,7 +4529,7 @@ FLAGS
|
|
|
4528
4529
|
--organization=<id> List tokens managed by this organization
|
|
4529
4530
|
|
|
4530
4531
|
OVERRIDE FLAGS
|
|
4531
|
-
-p, --project
|
|
4532
|
+
-p, --project=<id> Project ID to list tokens for (overrides CLI configuration)
|
|
4532
4533
|
|
|
4533
4534
|
GLOBAL FLAGS
|
|
4534
4535
|
--json Format output as json.
|
|
@@ -4551,7 +4552,7 @@ EXAMPLES
|
|
|
4551
4552
|
|
|
4552
4553
|
List tokens for a specific project
|
|
4553
4554
|
|
|
4554
|
-
$ sanity tokens list --project
|
|
4555
|
+
$ sanity tokens list --project abc123
|
|
4555
4556
|
```
|
|
4556
4557
|
|
|
4557
4558
|
## `sanity tokens rotate`
|
|
@@ -4684,7 +4685,7 @@ FLAGS
|
|
|
4684
4685
|
--role=<value> Role to invite the user as
|
|
4685
4686
|
|
|
4686
4687
|
OVERRIDE FLAGS
|
|
4687
|
-
-p, --project
|
|
4688
|
+
-p, --project=<id> Project ID to invite user to (overrides CLI configuration)
|
|
4688
4689
|
|
|
4689
4690
|
DESCRIPTION
|
|
4690
4691
|
Invite a new user to the project
|
|
@@ -4704,7 +4705,7 @@ EXAMPLES
|
|
|
4704
4705
|
|
|
4705
4706
|
Invite a user to a specific project
|
|
4706
4707
|
|
|
4707
|
-
$ sanity users invite pippi@sanity.io --project
|
|
4708
|
+
$ sanity users invite pippi@sanity.io --project abc123
|
|
4708
4709
|
```
|
|
4709
4710
|
|
|
4710
4711
|
## `sanity users list`
|
|
@@ -4724,7 +4725,7 @@ FLAGS
|
|
|
4724
4725
|
<options: id|name|role|date>
|
|
4725
4726
|
|
|
4726
4727
|
OVERRIDE FLAGS
|
|
4727
|
-
-p, --project
|
|
4728
|
+
-p, --project=<id> Project ID to list users for (overrides CLI configuration)
|
|
4728
4729
|
|
|
4729
4730
|
DESCRIPTION
|
|
4730
4731
|
List project members
|
|
@@ -4744,7 +4745,7 @@ EXAMPLES
|
|
|
4744
4745
|
|
|
4745
4746
|
List users for a specific project
|
|
4746
4747
|
|
|
4747
|
-
$ sanity users list --project
|
|
4748
|
+
$ sanity users list --project abc123
|
|
4748
4749
|
```
|
|
4749
4750
|
|
|
4750
4751
|
## `sanity versions`
|