@sanity/cli 7.1.0 → 7.2.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.
@@ -1029,43 +1029,56 @@
1029
1029
  "versions.js"
1030
1030
  ]
1031
1031
  },
1032
- "backups:disable": {
1032
+ "cors:add": {
1033
1033
  "aliases": [],
1034
1034
  "args": {
1035
- "dataset": {
1036
- "description": "Dataset name to disable backup for",
1037
- "name": "dataset",
1038
- "required": false
1035
+ "origin": {
1036
+ "description": "Origin to allow (e.g., https://example.com)",
1037
+ "name": "origin",
1038
+ "required": true
1039
1039
  }
1040
1040
  },
1041
- "description": "Disable backup for a dataset",
1041
+ "description": "Add a CORS origin to the project",
1042
1042
  "examples": [
1043
1043
  {
1044
1044
  "command": "<%= config.bin %> <%= command.id %>",
1045
- "description": "Interactively disable backup for a dataset"
1045
+ "description": "Interactively add a CORS origin"
1046
1046
  },
1047
1047
  {
1048
- "command": "<%= config.bin %> <%= command.id %> production",
1049
- "description": "Disable backup for the production dataset"
1048
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
1049
+ "description": "Add a localhost origin without credentials"
1050
+ },
1051
+ {
1052
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1053
+ "description": "Add a production origin with credentials allowed"
1054
+ },
1055
+ {
1056
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
1057
+ "description": "Add a CORS origin for a specific project"
1050
1058
  }
1051
1059
  ],
1052
1060
  "flags": {
1053
1061
  "project-id": {
1054
1062
  "char": "p",
1055
- "description": "Project ID to disable backups for (overrides CLI configuration)",
1063
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1056
1064
  "helpGroup": "OVERRIDE",
1057
1065
  "name": "project-id",
1058
1066
  "hasDynamicHelp": false,
1059
1067
  "helpValue": "<id>",
1060
1068
  "multiple": false,
1061
1069
  "type": "option"
1070
+ },
1071
+ "credentials": {
1072
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
1073
+ "name": "credentials",
1074
+ "required": false,
1075
+ "allowNo": true,
1076
+ "type": "boolean"
1062
1077
  }
1063
1078
  },
1064
1079
  "hasDynamicHelp": false,
1065
- "hiddenAliases": [
1066
- "backup:disable"
1067
- ],
1068
- "id": "backups:disable",
1080
+ "hiddenAliases": [],
1081
+ "id": "cors:add",
1069
1082
  "pluginAlias": "@sanity/cli",
1070
1083
  "pluginName": "@sanity/cli",
1071
1084
  "pluginType": "core",
@@ -1074,83 +1087,49 @@
1074
1087
  "relativePath": [
1075
1088
  "dist",
1076
1089
  "commands",
1077
- "backups",
1078
- "disable.js"
1090
+ "cors",
1091
+ "add.js"
1079
1092
  ]
1080
1093
  },
1081
- "backups:download": {
1094
+ "cors:delete": {
1082
1095
  "aliases": [],
1083
1096
  "args": {
1084
- "dataset": {
1085
- "description": "Dataset name to download backup from",
1086
- "name": "dataset",
1097
+ "origin": {
1098
+ "description": "Origin to delete (will prompt if not provided)",
1099
+ "name": "origin",
1087
1100
  "required": false
1088
1101
  }
1089
1102
  },
1090
- "description": "Download a dataset backup to a local file",
1103
+ "description": "Delete a CORS origin from the project",
1091
1104
  "examples": [
1092
1105
  {
1093
1106
  "command": "<%= config.bin %> <%= command.id %>",
1094
- "description": "Interactively download a backup"
1095
- },
1096
- {
1097
- "command": "<%= config.bin %> <%= command.id %> production --backup-id 2024-01-01-backup-1",
1098
- "description": "Download a specific backup for the production dataset"
1107
+ "description": "Interactively select and delete a CORS origin"
1099
1108
  },
1100
1109
  {
1101
- "command": "<%= config.bin %> <%= command.id %> production --backup-id 2024-01-01-backup-2 --out /path/to/file",
1102
- "description": "Download backup to a specific file"
1110
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
1111
+ "description": "Delete a specific CORS origin"
1103
1112
  },
1104
1113
  {
1105
- "command": "<%= config.bin %> <%= command.id %> production --backup-id 2024-01-01-backup-3 --out /path/to/file --overwrite",
1106
- "description": "Download backup and overwrite existing file"
1114
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1115
+ "description": "Delete a CORS origin from a specific project"
1107
1116
  }
1108
1117
  ],
1109
1118
  "flags": {
1110
1119
  "project-id": {
1111
1120
  "char": "p",
1112
- "description": "Project ID to download backup from (overrides CLI configuration)",
1121
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
1113
1122
  "helpGroup": "OVERRIDE",
1114
1123
  "name": "project-id",
1115
1124
  "hasDynamicHelp": false,
1116
1125
  "helpValue": "<id>",
1117
1126
  "multiple": false,
1118
1127
  "type": "option"
1119
- },
1120
- "backup-id": {
1121
- "description": "The backup ID to download",
1122
- "name": "backup-id",
1123
- "hasDynamicHelp": false,
1124
- "multiple": false,
1125
- "type": "option"
1126
- },
1127
- "concurrency": {
1128
- "description": "Concurrent number of backup item downloads (max: 24)",
1129
- "name": "concurrency",
1130
- "default": 10,
1131
- "hasDynamicHelp": false,
1132
- "multiple": false,
1133
- "type": "option"
1134
- },
1135
- "out": {
1136
- "description": "The file or directory path the backup should download to",
1137
- "name": "out",
1138
- "hasDynamicHelp": false,
1139
- "multiple": false,
1140
- "type": "option"
1141
- },
1142
- "overwrite": {
1143
- "description": "Allows overwriting of existing backup file",
1144
- "name": "overwrite",
1145
- "allowNo": false,
1146
- "type": "boolean"
1147
1128
  }
1148
1129
  },
1149
1130
  "hasDynamicHelp": false,
1150
- "hiddenAliases": [
1151
- "backup:download"
1152
- ],
1153
- "id": "backups:download",
1131
+ "hiddenAliases": [],
1132
+ "id": "cors:delete",
1154
1133
  "pluginAlias": "@sanity/cli",
1155
1134
  "pluginName": "@sanity/cli",
1156
1135
  "pluginType": "core",
@@ -1159,34 +1138,28 @@
1159
1138
  "relativePath": [
1160
1139
  "dist",
1161
1140
  "commands",
1162
- "backups",
1163
- "download.js"
1141
+ "cors",
1142
+ "delete.js"
1164
1143
  ]
1165
1144
  },
1166
- "backups:enable": {
1145
+ "cors:list": {
1167
1146
  "aliases": [],
1168
- "args": {
1169
- "dataset": {
1170
- "description": "Dataset name to enable backup for",
1171
- "name": "dataset",
1172
- "required": false
1173
- }
1174
- },
1175
- "description": "Enable backup for a dataset",
1147
+ "args": {},
1148
+ "description": "List CORS origins for the project",
1176
1149
  "examples": [
1177
1150
  {
1178
1151
  "command": "<%= config.bin %> <%= command.id %>",
1179
- "description": "Interactively enable backup for a dataset"
1152
+ "description": "List CORS origins for the project"
1180
1153
  },
1181
1154
  {
1182
- "command": "<%= config.bin %> <%= command.id %> production",
1183
- "description": "Enable backup for the production dataset"
1155
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1156
+ "description": "List CORS origins for a specific project"
1184
1157
  }
1185
1158
  ],
1186
1159
  "flags": {
1187
1160
  "project-id": {
1188
1161
  "char": "p",
1189
- "description": "Project ID to enable backups for (overrides CLI configuration)",
1162
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
1190
1163
  "helpGroup": "OVERRIDE",
1191
1164
  "name": "project-id",
1192
1165
  "hasDynamicHelp": false,
@@ -1196,10 +1169,8 @@
1196
1169
  }
1197
1170
  },
1198
1171
  "hasDynamicHelp": false,
1199
- "hiddenAliases": [
1200
- "backup:enable"
1201
- ],
1202
- "id": "backups:enable",
1172
+ "hiddenAliases": [],
1173
+ "id": "cors:list",
1203
1174
  "pluginAlias": "@sanity/cli",
1204
1175
  "pluginName": "@sanity/cli",
1205
1176
  "pluginType": "core",
@@ -1208,42 +1179,67 @@
1208
1179
  "relativePath": [
1209
1180
  "dist",
1210
1181
  "commands",
1211
- "backups",
1212
- "enable.js"
1182
+ "cors",
1183
+ "list.js"
1213
1184
  ]
1214
1185
  },
1215
- "backups:list": {
1186
+ "datasets:copy": {
1216
1187
  "aliases": [],
1217
1188
  "args": {
1218
- "dataset": {
1219
- "description": "Dataset name to list backups for",
1220
- "name": "dataset",
1189
+ "source": {
1190
+ "description": "Name of the dataset to copy from",
1191
+ "name": "source",
1192
+ "required": false
1193
+ },
1194
+ "target": {
1195
+ "description": "Name of the dataset to copy to",
1196
+ "name": "target",
1221
1197
  "required": false
1222
1198
  }
1223
1199
  },
1224
- "description": "List available backups for a dataset",
1200
+ "description": "Copy a dataset or manage copy jobs",
1225
1201
  "examples": [
1226
1202
  {
1227
1203
  "command": "<%= config.bin %> <%= command.id %>",
1228
- "description": "List backups for a dataset interactively"
1204
+ "description": "Interactively copy a dataset"
1229
1205
  },
1230
1206
  {
1231
- "command": "<%= config.bin %> <%= command.id %> production",
1232
- "description": "List backups for the production dataset"
1207
+ "command": "<%= config.bin %> <%= command.id %> source-dataset",
1208
+ "description": "Copy from source-dataset (prompts for target)"
1233
1209
  },
1234
1210
  {
1235
- "command": "<%= config.bin %> <%= command.id %> production --limit 50",
1236
- "description": "List up to 50 backups for the production dataset"
1211
+ "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
1212
+ "description": "Copy from source-dataset to target-dataset"
1237
1213
  },
1238
1214
  {
1239
- "command": "<%= config.bin %> <%= command.id %> production --after 2024-01-31 --limit 10",
1240
- "description": "List up to 10 backups created after 2024-01-31"
1215
+ "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
1216
+ "description": "Copy without preserving document history (faster for large datasets)"
1217
+ },
1218
+ {
1219
+ "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
1220
+ "description": "Copy without content release documents"
1221
+ },
1222
+ {
1223
+ "command": "<%= config.bin %> <%= command.id %> --detach source target",
1224
+ "description": "Start copy job without waiting for completion"
1225
+ },
1226
+ {
1227
+ "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
1228
+ "description": "Attach to a running copy job to follow progress"
1229
+ },
1230
+ {
1231
+ "command": "<%= config.bin %> <%= command.id %> --list",
1232
+ "description": "List all dataset copy jobs"
1233
+ },
1234
+ {
1235
+ "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
1236
+ "description": "List copy jobs with pagination"
1241
1237
  }
1242
1238
  ],
1243
1239
  "flags": {
1244
1240
  "project-id": {
1245
1241
  "char": "p",
1246
- "description": "Project ID to list backups for (overrides CLI configuration)",
1242
+ "description": "Project ID to copy dataset in (overrides CLI configuration)",
1247
1243
  "helpGroup": "OVERRIDE",
1248
1244
  "name": "project-id",
1249
1245
  "hasDynamicHelp": false,
@@ -1251,97 +1247,92 @@
1251
1247
  "multiple": false,
1252
1248
  "type": "option"
1253
1249
  },
1254
- "after": {
1255
- "description": "Only return backups after this date (inclusive, YYYY-MM-DD format)",
1256
- "name": "after",
1250
+ "attach": {
1251
+ "description": "Attach to the running copy process to show progress",
1252
+ "exclusive": [
1253
+ "list",
1254
+ "detach",
1255
+ "skip-history"
1256
+ ],
1257
+ "name": "attach",
1258
+ "required": false,
1257
1259
  "hasDynamicHelp": false,
1258
1260
  "multiple": false,
1259
1261
  "type": "option"
1260
1262
  },
1261
- "before": {
1262
- "description": "Only return backups before this date (exclusive, YYYY-MM-DD format)",
1263
- "name": "before",
1263
+ "detach": {
1264
+ "description": "Start the copy without waiting for it to finish",
1265
+ "exclusive": [
1266
+ "list",
1267
+ "attach"
1268
+ ],
1269
+ "name": "detach",
1270
+ "required": false,
1271
+ "allowNo": false,
1272
+ "type": "boolean"
1273
+ },
1274
+ "limit": {
1275
+ "dependsOn": [
1276
+ "list"
1277
+ ],
1278
+ "description": "Maximum number of jobs returned (default 10, max 1000)",
1279
+ "name": "limit",
1280
+ "required": false,
1264
1281
  "hasDynamicHelp": false,
1265
1282
  "multiple": false,
1266
1283
  "type": "option"
1267
1284
  },
1268
- "limit": {
1269
- "char": "l",
1270
- "description": "Maximum number of backups returned",
1271
- "name": "limit",
1272
- "default": 30,
1285
+ "list": {
1286
+ "description": "Lists all dataset copy jobs",
1287
+ "exclusive": [
1288
+ "attach",
1289
+ "detach",
1290
+ "skip-history"
1291
+ ],
1292
+ "name": "list",
1293
+ "required": false,
1294
+ "allowNo": false,
1295
+ "type": "boolean"
1296
+ },
1297
+ "offset": {
1298
+ "dependsOn": [
1299
+ "list"
1300
+ ],
1301
+ "description": "Start position in the list of jobs (default 0)",
1302
+ "name": "offset",
1303
+ "required": false,
1273
1304
  "hasDynamicHelp": false,
1274
1305
  "multiple": false,
1275
1306
  "type": "option"
1276
- }
1277
- },
1278
- "hasDynamicHelp": false,
1279
- "hiddenAliases": [
1280
- "backup:list"
1281
- ],
1282
- "id": "backups:list",
1283
- "pluginAlias": "@sanity/cli",
1284
- "pluginName": "@sanity/cli",
1285
- "pluginType": "core",
1286
- "strict": true,
1287
- "isESM": true,
1288
- "relativePath": [
1289
- "dist",
1290
- "commands",
1291
- "backups",
1292
- "list.js"
1293
- ]
1294
- },
1295
- "cors:add": {
1296
- "aliases": [],
1297
- "args": {
1298
- "origin": {
1299
- "description": "Origin to allow (e.g., https://example.com)",
1300
- "name": "origin",
1301
- "required": true
1302
- }
1303
- },
1304
- "description": "Add a CORS origin to the project",
1305
- "examples": [
1306
- {
1307
- "command": "<%= config.bin %> <%= command.id %>",
1308
- "description": "Interactively add a CORS origin"
1309
- },
1310
- {
1311
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
1312
- "description": "Add a localhost origin without credentials"
1313
- },
1314
- {
1315
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1316
- "description": "Add a production origin with credentials allowed"
1317
1307
  },
1318
- {
1319
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
1320
- "description": "Add a CORS origin for a specific project"
1321
- }
1322
- ],
1323
- "flags": {
1324
- "project-id": {
1325
- "char": "p",
1326
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1327
- "helpGroup": "OVERRIDE",
1328
- "name": "project-id",
1329
- "hasDynamicHelp": false,
1330
- "helpValue": "<id>",
1331
- "multiple": false,
1332
- "type": "option"
1308
+ "skip-content-releases": {
1309
+ "description": "Don't copy content release documents to the target dataset",
1310
+ "exclusive": [
1311
+ "list",
1312
+ "attach"
1313
+ ],
1314
+ "name": "skip-content-releases",
1315
+ "required": false,
1316
+ "allowNo": false,
1317
+ "type": "boolean"
1333
1318
  },
1334
- "credentials": {
1335
- "description": "Allow credentials (token/cookie) to be sent from this origin",
1336
- "name": "credentials",
1319
+ "skip-history": {
1320
+ "description": "Don't preserve document history on copy",
1321
+ "exclusive": [
1322
+ "list",
1323
+ "attach"
1324
+ ],
1325
+ "name": "skip-history",
1337
1326
  "required": false,
1338
- "allowNo": true,
1327
+ "allowNo": false,
1339
1328
  "type": "boolean"
1340
1329
  }
1341
1330
  },
1342
1331
  "hasDynamicHelp": false,
1343
- "hiddenAliases": [],
1344
- "id": "cors:add",
1332
+ "hiddenAliases": [
1333
+ "dataset:copy"
1334
+ ],
1335
+ "id": "datasets:copy",
1345
1336
  "pluginAlias": "@sanity/cli",
1346
1337
  "pluginName": "@sanity/cli",
1347
1338
  "pluginType": "core",
@@ -1350,49 +1341,80 @@
1350
1341
  "relativePath": [
1351
1342
  "dist",
1352
1343
  "commands",
1353
- "cors",
1354
- "add.js"
1344
+ "datasets",
1345
+ "copy.js"
1355
1346
  ]
1356
1347
  },
1357
- "cors:delete": {
1348
+ "datasets:create": {
1358
1349
  "aliases": [],
1359
1350
  "args": {
1360
- "origin": {
1361
- "description": "Origin to delete (will prompt if not provided)",
1362
- "name": "origin",
1351
+ "name": {
1352
+ "description": "Name of the dataset to create",
1353
+ "name": "name",
1363
1354
  "required": false
1364
1355
  }
1365
1356
  },
1366
- "description": "Delete a CORS origin from the project",
1357
+ "description": "Create a new dataset for the project",
1367
1358
  "examples": [
1368
1359
  {
1369
1360
  "command": "<%= config.bin %> <%= command.id %>",
1370
- "description": "Interactively select and delete a CORS origin"
1361
+ "description": "Interactively create a dataset"
1371
1362
  },
1372
1363
  {
1373
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
1374
- "description": "Delete a specific CORS origin"
1364
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
1365
+ "description": "Create a dataset named \"my-dataset\""
1375
1366
  },
1376
1367
  {
1377
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1378
- "description": "Delete a CORS origin from a specific project"
1368
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
1369
+ "description": "Create a private dataset named \"my-dataset\""
1379
1370
  }
1380
1371
  ],
1381
1372
  "flags": {
1382
1373
  "project-id": {
1383
1374
  "char": "p",
1384
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
1375
+ "description": "Project ID to create dataset in (overrides CLI configuration)",
1385
1376
  "helpGroup": "OVERRIDE",
1386
1377
  "name": "project-id",
1387
1378
  "hasDynamicHelp": false,
1388
1379
  "helpValue": "<id>",
1389
1380
  "multiple": false,
1390
1381
  "type": "option"
1382
+ },
1383
+ "embeddings": {
1384
+ "description": "Enable embeddings for this dataset",
1385
+ "name": "embeddings",
1386
+ "allowNo": false,
1387
+ "type": "boolean"
1388
+ },
1389
+ "embeddings-projection": {
1390
+ "dependsOn": [
1391
+ "embeddings"
1392
+ ],
1393
+ "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
1394
+ "name": "embeddings-projection",
1395
+ "hasDynamicHelp": false,
1396
+ "multiple": false,
1397
+ "type": "option"
1398
+ },
1399
+ "visibility": {
1400
+ "description": "Set visibility for this dataset (custom/private/public)",
1401
+ "name": "visibility",
1402
+ "required": false,
1403
+ "hasDynamicHelp": false,
1404
+ "multiple": false,
1405
+ "options": [
1406
+ "custom",
1407
+ "private",
1408
+ "public"
1409
+ ],
1410
+ "type": "option"
1391
1411
  }
1392
1412
  },
1393
1413
  "hasDynamicHelp": false,
1394
- "hiddenAliases": [],
1395
- "id": "cors:delete",
1414
+ "hiddenAliases": [
1415
+ "dataset:create"
1416
+ ],
1417
+ "id": "datasets:create",
1396
1418
  "pluginAlias": "@sanity/cli",
1397
1419
  "pluginName": "@sanity/cli",
1398
1420
  "pluginType": "core",
@@ -1401,39 +1423,54 @@
1401
1423
  "relativePath": [
1402
1424
  "dist",
1403
1425
  "commands",
1404
- "cors",
1405
- "delete.js"
1426
+ "datasets",
1427
+ "create.js"
1406
1428
  ]
1407
1429
  },
1408
- "cors:list": {
1430
+ "datasets:delete": {
1409
1431
  "aliases": [],
1410
- "args": {},
1411
- "description": "List CORS origins for the project",
1432
+ "args": {
1433
+ "datasetName": {
1434
+ "description": "Dataset name to delete",
1435
+ "name": "datasetName",
1436
+ "required": true
1437
+ }
1438
+ },
1439
+ "description": "Delete a dataset from the project",
1412
1440
  "examples": [
1413
1441
  {
1414
- "command": "<%= config.bin %> <%= command.id %>",
1415
- "description": "List CORS origins for the project"
1442
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
1443
+ "description": "Delete a specific dataset"
1416
1444
  },
1417
1445
  {
1418
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1419
- "description": "List CORS origins for a specific project"
1446
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
1447
+ "description": "Delete a specific dataset without confirmation"
1420
1448
  }
1421
1449
  ],
1422
1450
  "flags": {
1423
1451
  "project-id": {
1424
1452
  "char": "p",
1425
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
1453
+ "description": "Project ID to delete dataset from (overrides CLI configuration)",
1426
1454
  "helpGroup": "OVERRIDE",
1427
1455
  "name": "project-id",
1428
1456
  "hasDynamicHelp": false,
1429
1457
  "helpValue": "<id>",
1430
1458
  "multiple": false,
1431
1459
  "type": "option"
1460
+ },
1461
+ "force": {
1462
+ "description": "Do not prompt for delete confirmation - forcefully delete",
1463
+ "name": "force",
1464
+ "required": false,
1465
+ "allowNo": false,
1466
+ "type": "boolean"
1432
1467
  }
1433
1468
  },
1434
1469
  "hasDynamicHelp": false,
1435
- "hiddenAliases": [],
1436
- "id": "cors:list",
1470
+ "hiddenAliases": [
1471
+ "dataset:delete"
1472
+ ],
1473
+ "id": "datasets:delete",
1437
1474
  "pluginAlias": "@sanity/cli",
1438
1475
  "pluginName": "@sanity/cli",
1439
1476
  "pluginType": "core",
@@ -1442,67 +1479,49 @@
1442
1479
  "relativePath": [
1443
1480
  "dist",
1444
1481
  "commands",
1445
- "cors",
1446
- "list.js"
1482
+ "datasets",
1483
+ "delete.js"
1447
1484
  ]
1448
1485
  },
1449
- "datasets:copy": {
1486
+ "datasets:export": {
1450
1487
  "aliases": [],
1451
1488
  "args": {
1452
- "source": {
1453
- "description": "Name of the dataset to copy from",
1454
- "name": "source",
1455
- "required": false
1489
+ "name": {
1490
+ "description": "Name of the dataset to export",
1491
+ "name": "name"
1456
1492
  },
1457
- "target": {
1458
- "description": "Name of the dataset to copy to",
1459
- "name": "target",
1460
- "required": false
1493
+ "destination": {
1494
+ "description": "Output destination file path",
1495
+ "name": "destination"
1461
1496
  }
1462
1497
  },
1463
- "description": "Copy a dataset or manage copy jobs",
1498
+ "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
1464
1499
  "examples": [
1465
1500
  {
1466
- "command": "<%= config.bin %> <%= command.id %>",
1467
- "description": "Interactively copy a dataset"
1468
- },
1469
- {
1470
- "command": "<%= config.bin %> <%= command.id %> source-dataset",
1471
- "description": "Copy from source-dataset (prompts for target)"
1472
- },
1473
- {
1474
- "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
1475
- "description": "Copy from source-dataset to target-dataset"
1476
- },
1477
- {
1478
- "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
1479
- "description": "Copy without preserving document history (faster for large datasets)"
1480
- },
1481
- {
1482
- "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
1483
- "description": "Copy without content release documents"
1501
+ "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
1502
+ "description": "Export dataset \"moviedb\" to localPath.tar.gz"
1484
1503
  },
1485
1504
  {
1486
- "command": "<%= config.bin %> <%= command.id %> --detach source target",
1487
- "description": "Start copy job without waiting for completion"
1505
+ "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
1506
+ "description": "Export dataset without assets"
1488
1507
  },
1489
1508
  {
1490
- "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
1491
- "description": "Attach to a running copy job to follow progress"
1509
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
1510
+ "description": "Export raw documents without asset reference rewriting"
1492
1511
  },
1493
1512
  {
1494
- "command": "<%= config.bin %> <%= command.id %> --list",
1495
- "description": "List all dataset copy jobs"
1513
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
1514
+ "description": "Export specific document types"
1496
1515
  },
1497
1516
  {
1498
- "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
1499
- "description": "List copy jobs with pagination"
1517
+ "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
1518
+ "description": "Export dataset without aborting on asset verification failures"
1500
1519
  }
1501
1520
  ],
1502
1521
  "flags": {
1503
1522
  "project-id": {
1504
1523
  "char": "p",
1505
- "description": "Project ID to copy dataset in (overrides CLI configuration)",
1524
+ "description": "Project ID to export dataset from (overrides CLI configuration)",
1506
1525
  "helpGroup": "OVERRIDE",
1507
1526
  "name": "project-id",
1508
1527
  "hasDynamicHelp": false,
@@ -1510,92 +1529,75 @@
1510
1529
  "multiple": false,
1511
1530
  "type": "option"
1512
1531
  },
1513
- "attach": {
1514
- "description": "Attach to the running copy process to show progress",
1515
- "exclusive": [
1516
- "list",
1517
- "detach",
1518
- "skip-history"
1519
- ],
1520
- "name": "attach",
1521
- "required": false,
1532
+ "asset-concurrency": {
1533
+ "description": "Concurrent number of asset downloads",
1534
+ "name": "asset-concurrency",
1535
+ "default": 8,
1522
1536
  "hasDynamicHelp": false,
1523
1537
  "multiple": false,
1524
1538
  "type": "option"
1525
1539
  },
1526
- "detach": {
1527
- "description": "Start the copy without waiting for it to finish",
1528
- "exclusive": [
1529
- "list",
1530
- "attach"
1531
- ],
1532
- "name": "detach",
1533
- "required": false,
1534
- "allowNo": false,
1535
- "type": "boolean"
1536
- },
1537
- "limit": {
1538
- "dependsOn": [
1539
- "list"
1540
- ],
1541
- "description": "Maximum number of jobs returned (default 10, max 1000)",
1542
- "name": "limit",
1543
- "required": false,
1540
+ "mode": {
1541
+ "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
1542
+ "name": "mode",
1543
+ "default": "stream",
1544
1544
  "hasDynamicHelp": false,
1545
1545
  "multiple": false,
1546
+ "options": [
1547
+ "stream",
1548
+ "cursor"
1549
+ ],
1546
1550
  "type": "option"
1547
1551
  },
1548
- "list": {
1549
- "description": "Lists all dataset copy jobs",
1550
- "exclusive": [
1551
- "attach",
1552
- "detach",
1553
- "skip-history"
1554
- ],
1555
- "name": "list",
1556
- "required": false,
1552
+ "no-assets": {
1553
+ "description": "Export only non-asset documents and remove references to image assets",
1554
+ "name": "no-assets",
1557
1555
  "allowNo": false,
1558
1556
  "type": "boolean"
1559
1557
  },
1560
- "offset": {
1561
- "dependsOn": [
1562
- "list"
1563
- ],
1564
- "description": "Start position in the list of jobs (default 0)",
1565
- "name": "offset",
1566
- "required": false,
1567
- "hasDynamicHelp": false,
1568
- "multiple": false,
1569
- "type": "option"
1558
+ "no-compress": {
1559
+ "description": "Skips compressing tarball entries (still generates a gzip file)",
1560
+ "name": "no-compress",
1561
+ "allowNo": false,
1562
+ "type": "boolean"
1570
1563
  },
1571
- "skip-content-releases": {
1572
- "description": "Don't copy content release documents to the target dataset",
1573
- "exclusive": [
1574
- "list",
1575
- "attach"
1576
- ],
1577
- "name": "skip-content-releases",
1578
- "required": false,
1564
+ "no-drafts": {
1565
+ "description": "Export only published versions of documents",
1566
+ "name": "no-drafts",
1579
1567
  "allowNo": false,
1580
1568
  "type": "boolean"
1581
1569
  },
1582
- "skip-history": {
1583
- "description": "Don't preserve document history on copy",
1584
- "exclusive": [
1585
- "list",
1586
- "attach"
1587
- ],
1588
- "name": "skip-history",
1589
- "required": false,
1570
+ "no-strict-asset-verification": {
1571
+ "description": "Do not abort the export when an asset fails hash or content-length verification",
1572
+ "name": "no-strict-asset-verification",
1573
+ "allowNo": false,
1574
+ "type": "boolean"
1575
+ },
1576
+ "overwrite": {
1577
+ "description": "Overwrite any file with the same name",
1578
+ "name": "overwrite",
1579
+ "allowNo": false,
1580
+ "type": "boolean"
1581
+ },
1582
+ "raw": {
1583
+ "description": "Extract only documents, without rewriting asset references",
1584
+ "name": "raw",
1590
1585
  "allowNo": false,
1591
1586
  "type": "boolean"
1587
+ },
1588
+ "types": {
1589
+ "description": "Defines which document types to export (comma-separated)",
1590
+ "name": "types",
1591
+ "hasDynamicHelp": false,
1592
+ "multiple": false,
1593
+ "type": "option"
1592
1594
  }
1593
1595
  },
1594
1596
  "hasDynamicHelp": false,
1595
1597
  "hiddenAliases": [
1596
- "dataset:copy"
1598
+ "dataset:export"
1597
1599
  ],
1598
- "id": "datasets:copy",
1600
+ "id": "datasets:export",
1599
1601
  "pluginAlias": "@sanity/cli",
1600
1602
  "pluginName": "@sanity/cli",
1601
1603
  "pluginType": "core",
@@ -1605,37 +1607,95 @@
1605
1607
  "dist",
1606
1608
  "commands",
1607
1609
  "datasets",
1608
- "copy.js"
1610
+ "export.js"
1609
1611
  ]
1610
1612
  },
1611
- "datasets:create": {
1613
+ "datasets:import": {
1612
1614
  "aliases": [],
1613
1615
  "args": {
1614
- "name": {
1615
- "description": "Name of the dataset to create",
1616
- "name": "name",
1616
+ "source": {
1617
+ "description": "Source file (use \"-\" for stdin)",
1618
+ "name": "source",
1619
+ "required": true
1620
+ },
1621
+ "targetDataset": {
1622
+ "description": "Target dataset (prefer --dataset flag instead)",
1623
+ "name": "targetDataset",
1617
1624
  "required": false
1618
1625
  }
1619
1626
  },
1620
- "description": "Create a new dataset for the project",
1627
+ "description": "Import documents to a Sanity dataset",
1621
1628
  "examples": [
1622
1629
  {
1623
- "command": "<%= config.bin %> <%= command.id %>",
1624
- "description": "Interactively create a dataset"
1630
+ "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
1631
+ "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
1625
1632
  },
1626
1633
  {
1627
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
1628
- "description": "Create a dataset named \"my-dataset\""
1634
+ "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
1635
+ "description": "Import into dataset \"test\" from stdin"
1629
1636
  },
1630
1637
  {
1631
- "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
1632
- "description": "Create a private dataset named \"my-dataset\""
1638
+ "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
1639
+ "description": "Import with explicit project ID (overrides CLI configuration)"
1640
+ },
1641
+ {
1642
+ "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
1643
+ "description": "Import with an explicit token (e.g. for CI/CD)"
1633
1644
  }
1634
1645
  ],
1635
1646
  "flags": {
1647
+ "allow-assets-in-different-dataset": {
1648
+ "description": "Allow asset documents to reference different project/dataset",
1649
+ "name": "allow-assets-in-different-dataset",
1650
+ "allowNo": false,
1651
+ "type": "boolean"
1652
+ },
1653
+ "allow-failing-assets": {
1654
+ "description": "Skip assets that cannot be fetched/uploaded",
1655
+ "name": "allow-failing-assets",
1656
+ "allowNo": false,
1657
+ "type": "boolean"
1658
+ },
1659
+ "allow-replacement-characters": {
1660
+ "description": "Allow unicode replacement characters in imported documents",
1661
+ "name": "allow-replacement-characters",
1662
+ "allowNo": false,
1663
+ "type": "boolean"
1664
+ },
1665
+ "allow-system-documents": {
1666
+ "description": "Imports system documents",
1667
+ "name": "allow-system-documents",
1668
+ "allowNo": false,
1669
+ "type": "boolean"
1670
+ },
1671
+ "asset-concurrency": {
1672
+ "description": "Number of parallel asset imports",
1673
+ "name": "asset-concurrency",
1674
+ "hasDynamicHelp": false,
1675
+ "multiple": false,
1676
+ "type": "option"
1677
+ },
1678
+ "dataset": {
1679
+ "char": "d",
1680
+ "description": "Dataset to import to",
1681
+ "name": "dataset",
1682
+ "hasDynamicHelp": false,
1683
+ "helpValue": "<name>",
1684
+ "multiple": false,
1685
+ "type": "option"
1686
+ },
1687
+ "missing": {
1688
+ "description": "Skip documents that already exist",
1689
+ "exclusive": [
1690
+ "replace"
1691
+ ],
1692
+ "name": "missing",
1693
+ "allowNo": false,
1694
+ "type": "boolean"
1695
+ },
1636
1696
  "project-id": {
1637
1697
  "char": "p",
1638
- "description": "Project ID to create dataset in (overrides CLI configuration)",
1698
+ "description": "Project ID to import to (overrides CLI configuration)",
1639
1699
  "helpGroup": "OVERRIDE",
1640
1700
  "name": "project-id",
1641
1701
  "hasDynamicHelp": false,
@@ -1643,41 +1703,54 @@
1643
1703
  "multiple": false,
1644
1704
  "type": "option"
1645
1705
  },
1646
- "embeddings": {
1647
- "description": "Enable embeddings for this dataset",
1648
- "name": "embeddings",
1649
- "allowNo": false,
1650
- "type": "boolean"
1651
- },
1652
- "embeddings-projection": {
1653
- "dependsOn": [
1654
- "embeddings"
1655
- ],
1656
- "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
1657
- "name": "embeddings-projection",
1706
+ "project": {
1707
+ "deprecated": {
1708
+ "to": "project-id"
1709
+ },
1710
+ "description": "Project ID to import to",
1711
+ "hidden": true,
1712
+ "name": "project",
1658
1713
  "hasDynamicHelp": false,
1659
1714
  "multiple": false,
1660
1715
  "type": "option"
1661
1716
  },
1662
- "visibility": {
1663
- "description": "Set visibility for this dataset (custom/private/public)",
1664
- "name": "visibility",
1717
+ "replace": {
1718
+ "description": "Replace documents with the same IDs",
1719
+ "exclusive": [
1720
+ "missing"
1721
+ ],
1722
+ "name": "replace",
1723
+ "allowNo": false,
1724
+ "type": "boolean"
1725
+ },
1726
+ "replace-assets": {
1727
+ "description": "Skip reuse of existing assets",
1728
+ "name": "replace-assets",
1729
+ "allowNo": false,
1730
+ "type": "boolean"
1731
+ },
1732
+ "skip-cross-dataset-references": {
1733
+ "description": "Skips references to other datasets",
1734
+ "name": "skip-cross-dataset-references",
1735
+ "allowNo": false,
1736
+ "type": "boolean"
1737
+ },
1738
+ "token": {
1739
+ "char": "t",
1740
+ "description": "Token to authenticate with",
1741
+ "env": "SANITY_IMPORT_TOKEN",
1742
+ "name": "token",
1665
1743
  "required": false,
1666
1744
  "hasDynamicHelp": false,
1667
1745
  "multiple": false,
1668
- "options": [
1669
- "custom",
1670
- "private",
1671
- "public"
1672
- ],
1673
1746
  "type": "option"
1674
1747
  }
1675
1748
  },
1676
1749
  "hasDynamicHelp": false,
1677
1750
  "hiddenAliases": [
1678
- "dataset:create"
1751
+ "dataset:import"
1679
1752
  ],
1680
- "id": "datasets:create",
1753
+ "id": "datasets:import",
1681
1754
  "pluginAlias": "@sanity/cli",
1682
1755
  "pluginName": "@sanity/cli",
1683
1756
  "pluginType": "core",
@@ -1687,363 +1760,27 @@
1687
1760
  "dist",
1688
1761
  "commands",
1689
1762
  "datasets",
1690
- "create.js"
1763
+ "import.js"
1691
1764
  ]
1692
1765
  },
1693
- "datasets:delete": {
1766
+ "datasets:list": {
1694
1767
  "aliases": [],
1695
- "args": {
1696
- "datasetName": {
1697
- "description": "Dataset name to delete",
1698
- "name": "datasetName",
1699
- "required": true
1700
- }
1701
- },
1702
- "description": "Delete a dataset from the project",
1768
+ "args": {},
1769
+ "description": "List datasets for the project",
1703
1770
  "examples": [
1704
1771
  {
1705
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
1706
- "description": "Delete a specific dataset"
1772
+ "command": "<%= config.bin %> <%= command.id %>",
1773
+ "description": "List datasets for the project"
1707
1774
  },
1708
1775
  {
1709
- "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
1710
- "description": "Delete a specific dataset without confirmation"
1776
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1777
+ "description": "List datasets for a specific project"
1711
1778
  }
1712
1779
  ],
1713
1780
  "flags": {
1714
1781
  "project-id": {
1715
1782
  "char": "p",
1716
- "description": "Project ID to delete dataset from (overrides CLI configuration)",
1717
- "helpGroup": "OVERRIDE",
1718
- "name": "project-id",
1719
- "hasDynamicHelp": false,
1720
- "helpValue": "<id>",
1721
- "multiple": false,
1722
- "type": "option"
1723
- },
1724
- "force": {
1725
- "description": "Do not prompt for delete confirmation - forcefully delete",
1726
- "name": "force",
1727
- "required": false,
1728
- "allowNo": false,
1729
- "type": "boolean"
1730
- }
1731
- },
1732
- "hasDynamicHelp": false,
1733
- "hiddenAliases": [
1734
- "dataset:delete"
1735
- ],
1736
- "id": "datasets:delete",
1737
- "pluginAlias": "@sanity/cli",
1738
- "pluginName": "@sanity/cli",
1739
- "pluginType": "core",
1740
- "strict": true,
1741
- "isESM": true,
1742
- "relativePath": [
1743
- "dist",
1744
- "commands",
1745
- "datasets",
1746
- "delete.js"
1747
- ]
1748
- },
1749
- "datasets:export": {
1750
- "aliases": [],
1751
- "args": {
1752
- "name": {
1753
- "description": "Name of the dataset to export",
1754
- "name": "name"
1755
- },
1756
- "destination": {
1757
- "description": "Output destination file path",
1758
- "name": "destination"
1759
- }
1760
- },
1761
- "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
1762
- "examples": [
1763
- {
1764
- "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
1765
- "description": "Export dataset \"moviedb\" to localPath.tar.gz"
1766
- },
1767
- {
1768
- "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
1769
- "description": "Export dataset without assets"
1770
- },
1771
- {
1772
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
1773
- "description": "Export raw documents without asset reference rewriting"
1774
- },
1775
- {
1776
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
1777
- "description": "Export specific document types"
1778
- },
1779
- {
1780
- "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
1781
- "description": "Export dataset without aborting on asset verification failures"
1782
- }
1783
- ],
1784
- "flags": {
1785
- "project-id": {
1786
- "char": "p",
1787
- "description": "Project ID to export dataset from (overrides CLI configuration)",
1788
- "helpGroup": "OVERRIDE",
1789
- "name": "project-id",
1790
- "hasDynamicHelp": false,
1791
- "helpValue": "<id>",
1792
- "multiple": false,
1793
- "type": "option"
1794
- },
1795
- "asset-concurrency": {
1796
- "description": "Concurrent number of asset downloads",
1797
- "name": "asset-concurrency",
1798
- "default": 8,
1799
- "hasDynamicHelp": false,
1800
- "multiple": false,
1801
- "type": "option"
1802
- },
1803
- "mode": {
1804
- "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
1805
- "name": "mode",
1806
- "default": "stream",
1807
- "hasDynamicHelp": false,
1808
- "multiple": false,
1809
- "options": [
1810
- "stream",
1811
- "cursor"
1812
- ],
1813
- "type": "option"
1814
- },
1815
- "no-assets": {
1816
- "description": "Export only non-asset documents and remove references to image assets",
1817
- "name": "no-assets",
1818
- "allowNo": false,
1819
- "type": "boolean"
1820
- },
1821
- "no-compress": {
1822
- "description": "Skips compressing tarball entries (still generates a gzip file)",
1823
- "name": "no-compress",
1824
- "allowNo": false,
1825
- "type": "boolean"
1826
- },
1827
- "no-drafts": {
1828
- "description": "Export only published versions of documents",
1829
- "name": "no-drafts",
1830
- "allowNo": false,
1831
- "type": "boolean"
1832
- },
1833
- "no-strict-asset-verification": {
1834
- "description": "Do not abort the export when an asset fails hash or content-length verification",
1835
- "name": "no-strict-asset-verification",
1836
- "allowNo": false,
1837
- "type": "boolean"
1838
- },
1839
- "overwrite": {
1840
- "description": "Overwrite any file with the same name",
1841
- "name": "overwrite",
1842
- "allowNo": false,
1843
- "type": "boolean"
1844
- },
1845
- "raw": {
1846
- "description": "Extract only documents, without rewriting asset references",
1847
- "name": "raw",
1848
- "allowNo": false,
1849
- "type": "boolean"
1850
- },
1851
- "types": {
1852
- "description": "Defines which document types to export (comma-separated)",
1853
- "name": "types",
1854
- "hasDynamicHelp": false,
1855
- "multiple": false,
1856
- "type": "option"
1857
- }
1858
- },
1859
- "hasDynamicHelp": false,
1860
- "hiddenAliases": [
1861
- "dataset:export"
1862
- ],
1863
- "id": "datasets:export",
1864
- "pluginAlias": "@sanity/cli",
1865
- "pluginName": "@sanity/cli",
1866
- "pluginType": "core",
1867
- "strict": true,
1868
- "isESM": true,
1869
- "relativePath": [
1870
- "dist",
1871
- "commands",
1872
- "datasets",
1873
- "export.js"
1874
- ]
1875
- },
1876
- "datasets:import": {
1877
- "aliases": [],
1878
- "args": {
1879
- "source": {
1880
- "description": "Source file (use \"-\" for stdin)",
1881
- "name": "source",
1882
- "required": true
1883
- },
1884
- "targetDataset": {
1885
- "description": "Target dataset (prefer --dataset flag instead)",
1886
- "name": "targetDataset",
1887
- "required": false
1888
- }
1889
- },
1890
- "description": "Import documents to a Sanity dataset",
1891
- "examples": [
1892
- {
1893
- "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
1894
- "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
1895
- },
1896
- {
1897
- "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
1898
- "description": "Import into dataset \"test\" from stdin"
1899
- },
1900
- {
1901
- "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
1902
- "description": "Import with explicit project ID (overrides CLI configuration)"
1903
- },
1904
- {
1905
- "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
1906
- "description": "Import with an explicit token (e.g. for CI/CD)"
1907
- }
1908
- ],
1909
- "flags": {
1910
- "allow-assets-in-different-dataset": {
1911
- "description": "Allow asset documents to reference different project/dataset",
1912
- "name": "allow-assets-in-different-dataset",
1913
- "allowNo": false,
1914
- "type": "boolean"
1915
- },
1916
- "allow-failing-assets": {
1917
- "description": "Skip assets that cannot be fetched/uploaded",
1918
- "name": "allow-failing-assets",
1919
- "allowNo": false,
1920
- "type": "boolean"
1921
- },
1922
- "allow-replacement-characters": {
1923
- "description": "Allow unicode replacement characters in imported documents",
1924
- "name": "allow-replacement-characters",
1925
- "allowNo": false,
1926
- "type": "boolean"
1927
- },
1928
- "allow-system-documents": {
1929
- "description": "Imports system documents",
1930
- "name": "allow-system-documents",
1931
- "allowNo": false,
1932
- "type": "boolean"
1933
- },
1934
- "asset-concurrency": {
1935
- "description": "Number of parallel asset imports",
1936
- "name": "asset-concurrency",
1937
- "hasDynamicHelp": false,
1938
- "multiple": false,
1939
- "type": "option"
1940
- },
1941
- "dataset": {
1942
- "char": "d",
1943
- "description": "Dataset to import to",
1944
- "name": "dataset",
1945
- "hasDynamicHelp": false,
1946
- "helpValue": "<name>",
1947
- "multiple": false,
1948
- "type": "option"
1949
- },
1950
- "missing": {
1951
- "description": "Skip documents that already exist",
1952
- "exclusive": [
1953
- "replace"
1954
- ],
1955
- "name": "missing",
1956
- "allowNo": false,
1957
- "type": "boolean"
1958
- },
1959
- "project-id": {
1960
- "char": "p",
1961
- "description": "Project ID to import to (overrides CLI configuration)",
1962
- "helpGroup": "OVERRIDE",
1963
- "name": "project-id",
1964
- "hasDynamicHelp": false,
1965
- "helpValue": "<id>",
1966
- "multiple": false,
1967
- "type": "option"
1968
- },
1969
- "project": {
1970
- "deprecated": {
1971
- "to": "project-id"
1972
- },
1973
- "description": "Project ID to import to",
1974
- "hidden": true,
1975
- "name": "project",
1976
- "hasDynamicHelp": false,
1977
- "multiple": false,
1978
- "type": "option"
1979
- },
1980
- "replace": {
1981
- "description": "Replace documents with the same IDs",
1982
- "exclusive": [
1983
- "missing"
1984
- ],
1985
- "name": "replace",
1986
- "allowNo": false,
1987
- "type": "boolean"
1988
- },
1989
- "replace-assets": {
1990
- "description": "Skip reuse of existing assets",
1991
- "name": "replace-assets",
1992
- "allowNo": false,
1993
- "type": "boolean"
1994
- },
1995
- "skip-cross-dataset-references": {
1996
- "description": "Skips references to other datasets",
1997
- "name": "skip-cross-dataset-references",
1998
- "allowNo": false,
1999
- "type": "boolean"
2000
- },
2001
- "token": {
2002
- "char": "t",
2003
- "description": "Token to authenticate with",
2004
- "env": "SANITY_IMPORT_TOKEN",
2005
- "name": "token",
2006
- "required": false,
2007
- "hasDynamicHelp": false,
2008
- "multiple": false,
2009
- "type": "option"
2010
- }
2011
- },
2012
- "hasDynamicHelp": false,
2013
- "hiddenAliases": [
2014
- "dataset:import"
2015
- ],
2016
- "id": "datasets:import",
2017
- "pluginAlias": "@sanity/cli",
2018
- "pluginName": "@sanity/cli",
2019
- "pluginType": "core",
2020
- "strict": true,
2021
- "isESM": true,
2022
- "relativePath": [
2023
- "dist",
2024
- "commands",
2025
- "datasets",
2026
- "import.js"
2027
- ]
2028
- },
2029
- "datasets:list": {
2030
- "aliases": [],
2031
- "args": {},
2032
- "description": "List datasets for the project",
2033
- "examples": [
2034
- {
2035
- "command": "<%= config.bin %> <%= command.id %>",
2036
- "description": "List datasets for the project"
2037
- },
2038
- {
2039
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2040
- "description": "List datasets for a specific project"
2041
- }
2042
- ],
2043
- "flags": {
2044
- "project-id": {
2045
- "char": "p",
2046
- "description": "Project ID to list datasets for (overrides CLI configuration)",
1783
+ "description": "Project ID to list datasets for (overrides CLI configuration)",
2047
1784
  "helpGroup": "OVERRIDE",
2048
1785
  "name": "project-id",
2049
1786
  "hasDynamicHelp": false,
@@ -4140,19 +3877,179 @@
4140
3877
  ],
4141
3878
  "type": "option"
4142
3879
  },
4143
- "workspace": {
4144
- "description": "The name of the workspace to use when validating all schema types",
4145
- "name": "workspace",
3880
+ "workspace": {
3881
+ "description": "The name of the workspace to use when validating all schema types",
3882
+ "name": "workspace",
3883
+ "hasDynamicHelp": false,
3884
+ "multiple": false,
3885
+ "type": "option"
3886
+ }
3887
+ },
3888
+ "hasDynamicHelp": false,
3889
+ "hiddenAliases": [
3890
+ "schema:validate"
3891
+ ],
3892
+ "id": "schemas:validate",
3893
+ "pluginAlias": "@sanity/cli",
3894
+ "pluginName": "@sanity/cli",
3895
+ "pluginType": "core",
3896
+ "strict": true,
3897
+ "isESM": true,
3898
+ "relativePath": [
3899
+ "dist",
3900
+ "commands",
3901
+ "schemas",
3902
+ "validate.js"
3903
+ ]
3904
+ },
3905
+ "telemetry:disable": {
3906
+ "aliases": [],
3907
+ "args": {},
3908
+ "description": "Disable telemetry for your account",
3909
+ "examples": [
3910
+ {
3911
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3912
+ "description": "Disable telemetry for your account"
3913
+ }
3914
+ ],
3915
+ "flags": {},
3916
+ "hasDynamicHelp": false,
3917
+ "hiddenAliases": [],
3918
+ "id": "telemetry:disable",
3919
+ "pluginAlias": "@sanity/cli",
3920
+ "pluginName": "@sanity/cli",
3921
+ "pluginType": "core",
3922
+ "strict": true,
3923
+ "isESM": true,
3924
+ "relativePath": [
3925
+ "dist",
3926
+ "commands",
3927
+ "telemetry",
3928
+ "disable.js"
3929
+ ]
3930
+ },
3931
+ "telemetry:enable": {
3932
+ "aliases": [],
3933
+ "args": {},
3934
+ "description": "Enable telemetry for your account",
3935
+ "examples": [
3936
+ {
3937
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3938
+ "description": "Enable telemetry for your account"
3939
+ }
3940
+ ],
3941
+ "flags": {},
3942
+ "hasDynamicHelp": false,
3943
+ "hiddenAliases": [],
3944
+ "id": "telemetry:enable",
3945
+ "pluginAlias": "@sanity/cli",
3946
+ "pluginName": "@sanity/cli",
3947
+ "pluginType": "core",
3948
+ "strict": true,
3949
+ "isESM": true,
3950
+ "relativePath": [
3951
+ "dist",
3952
+ "commands",
3953
+ "telemetry",
3954
+ "enable.js"
3955
+ ]
3956
+ },
3957
+ "telemetry:status": {
3958
+ "aliases": [],
3959
+ "args": {},
3960
+ "description": "Check telemetry status for your account",
3961
+ "examples": [
3962
+ {
3963
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3964
+ "description": "Check telemetry status for your account"
3965
+ }
3966
+ ],
3967
+ "flags": {},
3968
+ "hasDynamicHelp": false,
3969
+ "hiddenAliases": [],
3970
+ "id": "telemetry:status",
3971
+ "pluginAlias": "@sanity/cli",
3972
+ "pluginName": "@sanity/cli",
3973
+ "pluginType": "core",
3974
+ "strict": true,
3975
+ "isESM": true,
3976
+ "relativePath": [
3977
+ "dist",
3978
+ "commands",
3979
+ "telemetry",
3980
+ "status.js"
3981
+ ]
3982
+ },
3983
+ "tokens:add": {
3984
+ "aliases": [],
3985
+ "args": {
3986
+ "label": {
3987
+ "description": "Label for the new token",
3988
+ "name": "label",
3989
+ "required": false
3990
+ }
3991
+ },
3992
+ "description": "Create a new API token for the project",
3993
+ "examples": [
3994
+ {
3995
+ "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
3996
+ "description": "Create a token with a label"
3997
+ },
3998
+ {
3999
+ "command": "<%= config.bin %> <%= command.id %> \"My API Token\" --role=editor",
4000
+ "description": "Create a token with editor role"
4001
+ },
4002
+ {
4003
+ "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
4004
+ "description": "Create a token in unattended mode"
4005
+ },
4006
+ {
4007
+ "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
4008
+ "description": "Output token information as JSON"
4009
+ },
4010
+ {
4011
+ "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
4012
+ "description": "Create a token for a specific project"
4013
+ }
4014
+ ],
4015
+ "flags": {
4016
+ "project-id": {
4017
+ "char": "p",
4018
+ "description": "Project ID to add token to (overrides CLI configuration)",
4019
+ "helpGroup": "OVERRIDE",
4020
+ "name": "project-id",
4021
+ "hasDynamicHelp": false,
4022
+ "helpValue": "<id>",
4023
+ "multiple": false,
4024
+ "type": "option"
4025
+ },
4026
+ "json": {
4027
+ "description": "Output as JSON",
4028
+ "name": "json",
4029
+ "allowNo": false,
4030
+ "type": "boolean"
4031
+ },
4032
+ "role": {
4033
+ "description": "Role to assign to the token",
4034
+ "name": "role",
4146
4035
  "hasDynamicHelp": false,
4036
+ "helpValue": "viewer",
4147
4037
  "multiple": false,
4148
4038
  "type": "option"
4039
+ },
4040
+ "yes": {
4041
+ "char": "y",
4042
+ "description": "Skip prompts and use defaults (unattended mode)",
4043
+ "name": "yes",
4044
+ "allowNo": false,
4045
+ "type": "boolean"
4149
4046
  }
4150
4047
  },
4151
4048
  "hasDynamicHelp": false,
4152
4049
  "hiddenAliases": [
4153
- "schema:validate"
4050
+ "token:add"
4154
4051
  ],
4155
- "id": "schemas:validate",
4052
+ "id": "tokens:add",
4156
4053
  "pluginAlias": "@sanity/cli",
4157
4054
  "pluginName": "@sanity/cli",
4158
4055
  "pluginType": "core",
@@ -4161,24 +4058,65 @@
4161
4058
  "relativePath": [
4162
4059
  "dist",
4163
4060
  "commands",
4164
- "schemas",
4165
- "validate.js"
4061
+ "tokens",
4062
+ "add.js"
4166
4063
  ]
4167
4064
  },
4168
- "telemetry:disable": {
4065
+ "tokens:delete": {
4169
4066
  "aliases": [],
4170
- "args": {},
4171
- "description": "Disable telemetry for your account",
4067
+ "args": {
4068
+ "tokenId": {
4069
+ "description": "Token ID to delete (will prompt if not provided)",
4070
+ "name": "tokenId",
4071
+ "required": false
4072
+ }
4073
+ },
4074
+ "description": "Delete an API token from the project",
4172
4075
  "examples": [
4173
4076
  {
4174
- "command": "<%= config.bin %> telemetry <%= command.id %>",
4175
- "description": "Disable telemetry for your account"
4077
+ "command": "<%= config.bin %> <%= command.id %>",
4078
+ "description": "Interactively select and delete a token"
4079
+ },
4080
+ {
4081
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB",
4082
+ "description": "Delete a specific token by ID"
4083
+ },
4084
+ {
4085
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --yes",
4086
+ "description": "Delete a specific token without confirmation prompt"
4087
+ },
4088
+ {
4089
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4090
+ "description": "Delete a token from a specific project"
4176
4091
  }
4177
4092
  ],
4178
- "flags": {},
4093
+ "flags": {
4094
+ "project-id": {
4095
+ "char": "p",
4096
+ "description": "Project ID to delete token from (overrides CLI configuration)",
4097
+ "helpGroup": "OVERRIDE",
4098
+ "name": "project-id",
4099
+ "hasDynamicHelp": false,
4100
+ "helpValue": "<id>",
4101
+ "multiple": false,
4102
+ "type": "option"
4103
+ },
4104
+ "yes": {
4105
+ "aliases": [
4106
+ "y"
4107
+ ],
4108
+ "description": "Skip confirmation prompt (unattended mode)",
4109
+ "name": "yes",
4110
+ "required": false,
4111
+ "allowNo": false,
4112
+ "type": "boolean"
4113
+ }
4114
+ },
4179
4115
  "hasDynamicHelp": false,
4180
- "hiddenAliases": [],
4181
- "id": "telemetry:disable",
4116
+ "hiddenAliases": [
4117
+ "token:delete"
4118
+ ],
4119
+ "id": "tokens:delete",
4182
4120
  "pluginAlias": "@sanity/cli",
4183
4121
  "pluginName": "@sanity/cli",
4184
4122
  "pluginType": "core",
@@ -4187,24 +4125,51 @@
4187
4125
  "relativePath": [
4188
4126
  "dist",
4189
4127
  "commands",
4190
- "telemetry",
4191
- "disable.js"
4128
+ "tokens",
4129
+ "delete.js"
4192
4130
  ]
4193
4131
  },
4194
- "telemetry:enable": {
4132
+ "tokens:list": {
4195
4133
  "aliases": [],
4196
4134
  "args": {},
4197
- "description": "Enable telemetry for your account",
4135
+ "description": "List API tokens for the project",
4198
4136
  "examples": [
4199
4137
  {
4200
- "command": "<%= config.bin %> telemetry <%= command.id %>",
4201
- "description": "Enable telemetry for your account"
4138
+ "command": "<%= config.bin %> <%= command.id %>",
4139
+ "description": "List tokens for the project"
4140
+ },
4141
+ {
4142
+ "command": "<%= config.bin %> <%= command.id %> --json",
4143
+ "description": "List tokens in JSON format"
4144
+ },
4145
+ {
4146
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4147
+ "description": "List tokens for a specific project"
4202
4148
  }
4203
4149
  ],
4204
- "flags": {},
4150
+ "flags": {
4151
+ "project-id": {
4152
+ "char": "p",
4153
+ "description": "Project ID to list tokens for (overrides CLI configuration)",
4154
+ "helpGroup": "OVERRIDE",
4155
+ "name": "project-id",
4156
+ "hasDynamicHelp": false,
4157
+ "helpValue": "<id>",
4158
+ "multiple": false,
4159
+ "type": "option"
4160
+ },
4161
+ "json": {
4162
+ "description": "Output tokens in JSON format",
4163
+ "name": "json",
4164
+ "allowNo": false,
4165
+ "type": "boolean"
4166
+ }
4167
+ },
4205
4168
  "hasDynamicHelp": false,
4206
- "hiddenAliases": [],
4207
- "id": "telemetry:enable",
4169
+ "hiddenAliases": [
4170
+ "token:list"
4171
+ ],
4172
+ "id": "tokens:list",
4208
4173
  "pluginAlias": "@sanity/cli",
4209
4174
  "pluginName": "@sanity/cli",
4210
4175
  "pluginType": "core",
@@ -4213,24 +4178,63 @@
4213
4178
  "relativePath": [
4214
4179
  "dist",
4215
4180
  "commands",
4216
- "telemetry",
4217
- "enable.js"
4181
+ "tokens",
4182
+ "list.js"
4218
4183
  ]
4219
4184
  },
4220
- "telemetry:status": {
4185
+ "users:invite": {
4221
4186
  "aliases": [],
4222
- "args": {},
4223
- "description": "Check telemetry status for your account",
4187
+ "args": {
4188
+ "email": {
4189
+ "description": "Email address to invite",
4190
+ "name": "email",
4191
+ "required": false
4192
+ }
4193
+ },
4194
+ "description": "Invite a new user to the project",
4224
4195
  "examples": [
4225
4196
  {
4226
- "command": "<%= config.bin %> telemetry <%= command.id %>",
4227
- "description": "Check telemetry status for your account"
4197
+ "command": "<%= config.bin %> <%= command.id %>",
4198
+ "description": "Invite a new user to the project (prompt for details)"
4199
+ },
4200
+ {
4201
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io",
4202
+ "description": "Send a new user invite to the email \"pippi@sanity.io\", prompt for role"
4203
+ },
4204
+ {
4205
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --role administrator",
4206
+ "description": "Send a new user invite to the email \"pippi@sanity.io\", as administrator"
4207
+ },
4208
+ {
4209
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --project-id abc123",
4210
+ "description": "Invite a user to a specific project"
4228
4211
  }
4229
4212
  ],
4230
- "flags": {},
4213
+ "flags": {
4214
+ "project-id": {
4215
+ "char": "p",
4216
+ "description": "Project ID to invite user to (overrides CLI configuration)",
4217
+ "helpGroup": "OVERRIDE",
4218
+ "name": "project-id",
4219
+ "hasDynamicHelp": false,
4220
+ "helpValue": "<id>",
4221
+ "multiple": false,
4222
+ "type": "option"
4223
+ },
4224
+ "role": {
4225
+ "description": "Role to invite the user as",
4226
+ "name": "role",
4227
+ "required": false,
4228
+ "hasDynamicHelp": false,
4229
+ "multiple": false,
4230
+ "type": "option"
4231
+ }
4232
+ },
4231
4233
  "hasDynamicHelp": false,
4232
- "hiddenAliases": [],
4233
- "id": "telemetry:status",
4234
+ "hiddenAliases": [
4235
+ "user:invite"
4236
+ ],
4237
+ "id": "users:invite",
4234
4238
  "pluginAlias": "@sanity/cli",
4235
4239
  "pluginName": "@sanity/cli",
4236
4240
  "pluginType": "core",
@@ -4239,46 +4243,36 @@
4239
4243
  "relativePath": [
4240
4244
  "dist",
4241
4245
  "commands",
4242
- "telemetry",
4243
- "status.js"
4246
+ "users",
4247
+ "invite.js"
4244
4248
  ]
4245
4249
  },
4246
- "tokens:add": {
4250
+ "users:list": {
4247
4251
  "aliases": [],
4248
- "args": {
4249
- "label": {
4250
- "description": "Label for the new token",
4251
- "name": "label",
4252
- "required": false
4253
- }
4254
- },
4255
- "description": "Create a new API token for the project",
4252
+ "args": {},
4253
+ "description": "List project members",
4256
4254
  "examples": [
4257
4255
  {
4258
- "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
4259
- "description": "Create a token with a label"
4260
- },
4261
- {
4262
- "command": "<%= config.bin %> <%= command.id %> \"My API Token\" --role=editor",
4263
- "description": "Create a token with editor role"
4256
+ "command": "<%= config.bin %> <%= command.id %>",
4257
+ "description": "List all users of the project"
4264
4258
  },
4265
4259
  {
4266
- "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
4267
- "description": "Create a token in unattended mode"
4260
+ "command": "<%= config.bin %> <%= command.id %> --no-invitations --no-robots",
4261
+ "description": "List all users of the project, but exclude pending invitations and robots"
4268
4262
  },
4269
4263
  {
4270
- "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
4271
- "description": "Output token information as JSON"
4264
+ "command": "<%= config.bin %> <%= command.id %> --sort role",
4265
+ "description": "List all users, sorted by role"
4272
4266
  },
4273
4267
  {
4274
- "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
4275
- "description": "Create a token for a specific project"
4268
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4269
+ "description": "List users for a specific project"
4276
4270
  }
4277
4271
  ],
4278
4272
  "flags": {
4279
4273
  "project-id": {
4280
4274
  "char": "p",
4281
- "description": "Project ID to add token to (overrides CLI configuration)",
4275
+ "description": "Project ID to list users for (overrides CLI configuration)",
4282
4276
  "helpGroup": "OVERRIDE",
4283
4277
  "name": "project-id",
4284
4278
  "hasDynamicHelp": false,
@@ -4286,33 +4280,50 @@
4286
4280
  "multiple": false,
4287
4281
  "type": "option"
4288
4282
  },
4289
- "json": {
4290
- "description": "Output as JSON",
4291
- "name": "json",
4292
- "allowNo": false,
4283
+ "invitations": {
4284
+ "description": "Includes or excludes pending invitations",
4285
+ "name": "invitations",
4286
+ "allowNo": true,
4287
+ "type": "boolean"
4288
+ },
4289
+ "order": {
4290
+ "description": "Sort output ascending/descending",
4291
+ "name": "order",
4292
+ "default": "asc",
4293
+ "hasDynamicHelp": false,
4294
+ "multiple": false,
4295
+ "options": [
4296
+ "asc",
4297
+ "desc"
4298
+ ],
4299
+ "type": "option"
4300
+ },
4301
+ "robots": {
4302
+ "description": "Includes or excludes robots (token users)",
4303
+ "name": "robots",
4304
+ "allowNo": true,
4293
4305
  "type": "boolean"
4294
4306
  },
4295
- "role": {
4296
- "description": "Role to assign to the token",
4297
- "name": "role",
4307
+ "sort": {
4308
+ "description": "Sort users by specified column",
4309
+ "name": "sort",
4310
+ "default": "date",
4298
4311
  "hasDynamicHelp": false,
4299
- "helpValue": "viewer",
4300
4312
  "multiple": false,
4313
+ "options": [
4314
+ "id",
4315
+ "name",
4316
+ "role",
4317
+ "date"
4318
+ ],
4301
4319
  "type": "option"
4302
- },
4303
- "yes": {
4304
- "char": "y",
4305
- "description": "Skip prompts and use defaults (unattended mode)",
4306
- "name": "yes",
4307
- "allowNo": false,
4308
- "type": "boolean"
4309
4320
  }
4310
4321
  },
4311
4322
  "hasDynamicHelp": false,
4312
4323
  "hiddenAliases": [
4313
- "token:add"
4324
+ "user:list"
4314
4325
  ],
4315
- "id": "tokens:add",
4326
+ "id": "users:list",
4316
4327
  "pluginAlias": "@sanity/cli",
4317
4328
  "pluginName": "@sanity/cli",
4318
4329
  "pluginType": "core",
@@ -4321,65 +4332,47 @@
4321
4332
  "relativePath": [
4322
4333
  "dist",
4323
4334
  "commands",
4324
- "tokens",
4325
- "add.js"
4335
+ "users",
4336
+ "list.js"
4326
4337
  ]
4327
4338
  },
4328
- "tokens:delete": {
4339
+ "backups:disable": {
4329
4340
  "aliases": [],
4330
4341
  "args": {
4331
- "tokenId": {
4332
- "description": "Token ID to delete (will prompt if not provided)",
4333
- "name": "tokenId",
4342
+ "dataset": {
4343
+ "description": "Dataset name to disable backup for",
4344
+ "name": "dataset",
4334
4345
  "required": false
4335
4346
  }
4336
4347
  },
4337
- "description": "Delete an API token from the project",
4348
+ "description": "Disable backup for a dataset",
4338
4349
  "examples": [
4339
4350
  {
4340
4351
  "command": "<%= config.bin %> <%= command.id %>",
4341
- "description": "Interactively select and delete a token"
4342
- },
4343
- {
4344
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB",
4345
- "description": "Delete a specific token by ID"
4346
- },
4347
- {
4348
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --yes",
4349
- "description": "Delete a specific token without confirmation prompt"
4352
+ "description": "Interactively disable backup for a dataset"
4350
4353
  },
4351
4354
  {
4352
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4353
- "description": "Delete a token from a specific project"
4355
+ "command": "<%= config.bin %> <%= command.id %> production",
4356
+ "description": "Disable backup for the production dataset"
4354
4357
  }
4355
4358
  ],
4356
4359
  "flags": {
4357
4360
  "project-id": {
4358
4361
  "char": "p",
4359
- "description": "Project ID to delete token from (overrides CLI configuration)",
4362
+ "description": "Project ID to disable backups for (overrides CLI configuration)",
4360
4363
  "helpGroup": "OVERRIDE",
4361
4364
  "name": "project-id",
4362
4365
  "hasDynamicHelp": false,
4363
4366
  "helpValue": "<id>",
4364
4367
  "multiple": false,
4365
4368
  "type": "option"
4366
- },
4367
- "yes": {
4368
- "aliases": [
4369
- "y"
4370
- ],
4371
- "description": "Skip confirmation prompt (unattended mode)",
4372
- "name": "yes",
4373
- "required": false,
4374
- "allowNo": false,
4375
- "type": "boolean"
4376
4369
  }
4377
4370
  },
4378
4371
  "hasDynamicHelp": false,
4379
4372
  "hiddenAliases": [
4380
- "token:delete"
4373
+ "backup:disable"
4381
4374
  ],
4382
- "id": "tokens:delete",
4375
+ "id": "backups:disable",
4383
4376
  "pluginAlias": "@sanity/cli",
4384
4377
  "pluginName": "@sanity/cli",
4385
4378
  "pluginType": "core",
@@ -4388,32 +4381,42 @@
4388
4381
  "relativePath": [
4389
4382
  "dist",
4390
4383
  "commands",
4391
- "tokens",
4392
- "delete.js"
4384
+ "backups",
4385
+ "disable.js"
4393
4386
  ]
4394
4387
  },
4395
- "tokens:list": {
4388
+ "backups:download": {
4396
4389
  "aliases": [],
4397
- "args": {},
4398
- "description": "List API tokens for the project",
4390
+ "args": {
4391
+ "dataset": {
4392
+ "description": "Dataset name to download backup from",
4393
+ "name": "dataset",
4394
+ "required": false
4395
+ }
4396
+ },
4397
+ "description": "Download a dataset backup to a local file",
4399
4398
  "examples": [
4400
4399
  {
4401
4400
  "command": "<%= config.bin %> <%= command.id %>",
4402
- "description": "List tokens for the project"
4401
+ "description": "Interactively download a backup"
4403
4402
  },
4404
4403
  {
4405
- "command": "<%= config.bin %> <%= command.id %> --json",
4406
- "description": "List tokens in JSON format"
4404
+ "command": "<%= config.bin %> <%= command.id %> production --backup-id 2024-01-01-backup-1",
4405
+ "description": "Download a specific backup for the production dataset"
4407
4406
  },
4408
4407
  {
4409
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4410
- "description": "List tokens for a specific project"
4408
+ "command": "<%= config.bin %> <%= command.id %> production --backup-id 2024-01-01-backup-2 --out /path/to/file",
4409
+ "description": "Download backup to a specific file"
4410
+ },
4411
+ {
4412
+ "command": "<%= config.bin %> <%= command.id %> production --backup-id 2024-01-01-backup-3 --out /path/to/file --overwrite",
4413
+ "description": "Download backup and overwrite existing file"
4411
4414
  }
4412
4415
  ],
4413
4416
  "flags": {
4414
4417
  "project-id": {
4415
4418
  "char": "p",
4416
- "description": "Project ID to list tokens for (overrides CLI configuration)",
4419
+ "description": "Project ID to download backup from (overrides CLI configuration)",
4417
4420
  "helpGroup": "OVERRIDE",
4418
4421
  "name": "project-id",
4419
4422
  "hasDynamicHelp": false,
@@ -4421,18 +4424,40 @@
4421
4424
  "multiple": false,
4422
4425
  "type": "option"
4423
4426
  },
4424
- "json": {
4425
- "description": "Output tokens in JSON format",
4426
- "name": "json",
4427
+ "backup-id": {
4428
+ "description": "The backup ID to download",
4429
+ "name": "backup-id",
4430
+ "hasDynamicHelp": false,
4431
+ "multiple": false,
4432
+ "type": "option"
4433
+ },
4434
+ "concurrency": {
4435
+ "description": "Concurrent number of backup item downloads (max: 24)",
4436
+ "name": "concurrency",
4437
+ "default": 10,
4438
+ "hasDynamicHelp": false,
4439
+ "multiple": false,
4440
+ "type": "option"
4441
+ },
4442
+ "out": {
4443
+ "description": "The file or directory path the backup should download to",
4444
+ "name": "out",
4445
+ "hasDynamicHelp": false,
4446
+ "multiple": false,
4447
+ "type": "option"
4448
+ },
4449
+ "overwrite": {
4450
+ "description": "Allows overwriting of existing backup file",
4451
+ "name": "overwrite",
4427
4452
  "allowNo": false,
4428
4453
  "type": "boolean"
4429
4454
  }
4430
4455
  },
4431
4456
  "hasDynamicHelp": false,
4432
4457
  "hiddenAliases": [
4433
- "token:list"
4458
+ "backup:download"
4434
4459
  ],
4435
- "id": "tokens:list",
4460
+ "id": "backups:download",
4436
4461
  "pluginAlias": "@sanity/cli",
4437
4462
  "pluginName": "@sanity/cli",
4438
4463
  "pluginType": "core",
@@ -4441,63 +4466,47 @@
4441
4466
  "relativePath": [
4442
4467
  "dist",
4443
4468
  "commands",
4444
- "tokens",
4445
- "list.js"
4469
+ "backups",
4470
+ "download.js"
4446
4471
  ]
4447
4472
  },
4448
- "users:invite": {
4473
+ "backups:enable": {
4449
4474
  "aliases": [],
4450
4475
  "args": {
4451
- "email": {
4452
- "description": "Email address to invite",
4453
- "name": "email",
4476
+ "dataset": {
4477
+ "description": "Dataset name to enable backup for",
4478
+ "name": "dataset",
4454
4479
  "required": false
4455
4480
  }
4456
4481
  },
4457
- "description": "Invite a new user to the project",
4482
+ "description": "Enable backup for a dataset",
4458
4483
  "examples": [
4459
4484
  {
4460
4485
  "command": "<%= config.bin %> <%= command.id %>",
4461
- "description": "Invite a new user to the project (prompt for details)"
4462
- },
4463
- {
4464
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io",
4465
- "description": "Send a new user invite to the email \"pippi@sanity.io\", prompt for role"
4466
- },
4467
- {
4468
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --role administrator",
4469
- "description": "Send a new user invite to the email \"pippi@sanity.io\", as administrator"
4486
+ "description": "Interactively enable backup for a dataset"
4470
4487
  },
4471
4488
  {
4472
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --project-id abc123",
4473
- "description": "Invite a user to a specific project"
4489
+ "command": "<%= config.bin %> <%= command.id %> production",
4490
+ "description": "Enable backup for the production dataset"
4474
4491
  }
4475
4492
  ],
4476
4493
  "flags": {
4477
4494
  "project-id": {
4478
4495
  "char": "p",
4479
- "description": "Project ID to invite user to (overrides CLI configuration)",
4496
+ "description": "Project ID to enable backups for (overrides CLI configuration)",
4480
4497
  "helpGroup": "OVERRIDE",
4481
4498
  "name": "project-id",
4482
4499
  "hasDynamicHelp": false,
4483
4500
  "helpValue": "<id>",
4484
4501
  "multiple": false,
4485
4502
  "type": "option"
4486
- },
4487
- "role": {
4488
- "description": "Role to invite the user as",
4489
- "name": "role",
4490
- "required": false,
4491
- "hasDynamicHelp": false,
4492
- "multiple": false,
4493
- "type": "option"
4494
4503
  }
4495
4504
  },
4496
4505
  "hasDynamicHelp": false,
4497
4506
  "hiddenAliases": [
4498
- "user:invite"
4507
+ "backup:enable"
4499
4508
  ],
4500
- "id": "users:invite",
4509
+ "id": "backups:enable",
4501
4510
  "pluginAlias": "@sanity/cli",
4502
4511
  "pluginName": "@sanity/cli",
4503
4512
  "pluginType": "core",
@@ -4506,36 +4515,42 @@
4506
4515
  "relativePath": [
4507
4516
  "dist",
4508
4517
  "commands",
4509
- "users",
4510
- "invite.js"
4518
+ "backups",
4519
+ "enable.js"
4511
4520
  ]
4512
4521
  },
4513
- "users:list": {
4522
+ "backups:list": {
4514
4523
  "aliases": [],
4515
- "args": {},
4516
- "description": "List project members",
4524
+ "args": {
4525
+ "dataset": {
4526
+ "description": "Dataset name to list backups for",
4527
+ "name": "dataset",
4528
+ "required": false
4529
+ }
4530
+ },
4531
+ "description": "List available backups for a dataset",
4517
4532
  "examples": [
4518
4533
  {
4519
4534
  "command": "<%= config.bin %> <%= command.id %>",
4520
- "description": "List all users of the project"
4535
+ "description": "List backups for a dataset interactively"
4521
4536
  },
4522
4537
  {
4523
- "command": "<%= config.bin %> <%= command.id %> --no-invitations --no-robots",
4524
- "description": "List all users of the project, but exclude pending invitations and robots"
4538
+ "command": "<%= config.bin %> <%= command.id %> production",
4539
+ "description": "List backups for the production dataset"
4525
4540
  },
4526
4541
  {
4527
- "command": "<%= config.bin %> <%= command.id %> --sort role",
4528
- "description": "List all users, sorted by role"
4542
+ "command": "<%= config.bin %> <%= command.id %> production --limit 50",
4543
+ "description": "List up to 50 backups for the production dataset"
4529
4544
  },
4530
4545
  {
4531
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4532
- "description": "List users for a specific project"
4546
+ "command": "<%= config.bin %> <%= command.id %> production --after 2024-01-31 --limit 10",
4547
+ "description": "List up to 10 backups created after 2024-01-31"
4533
4548
  }
4534
4549
  ],
4535
4550
  "flags": {
4536
4551
  "project-id": {
4537
4552
  "char": "p",
4538
- "description": "Project ID to list users for (overrides CLI configuration)",
4553
+ "description": "Project ID to list backups for (overrides CLI configuration)",
4539
4554
  "helpGroup": "OVERRIDE",
4540
4555
  "name": "project-id",
4541
4556
  "hasDynamicHelp": false,
@@ -4543,50 +4558,35 @@
4543
4558
  "multiple": false,
4544
4559
  "type": "option"
4545
4560
  },
4546
- "invitations": {
4547
- "description": "Includes or excludes pending invitations",
4548
- "name": "invitations",
4549
- "allowNo": true,
4550
- "type": "boolean"
4551
- },
4552
- "order": {
4553
- "description": "Sort output ascending/descending",
4554
- "name": "order",
4555
- "default": "asc",
4561
+ "after": {
4562
+ "description": "Only return backups after this date (inclusive, YYYY-MM-DD format)",
4563
+ "name": "after",
4556
4564
  "hasDynamicHelp": false,
4557
4565
  "multiple": false,
4558
- "options": [
4559
- "asc",
4560
- "desc"
4561
- ],
4562
4566
  "type": "option"
4563
4567
  },
4564
- "robots": {
4565
- "description": "Includes or excludes robots (token users)",
4566
- "name": "robots",
4567
- "allowNo": true,
4568
- "type": "boolean"
4568
+ "before": {
4569
+ "description": "Only return backups before this date (exclusive, YYYY-MM-DD format)",
4570
+ "name": "before",
4571
+ "hasDynamicHelp": false,
4572
+ "multiple": false,
4573
+ "type": "option"
4569
4574
  },
4570
- "sort": {
4571
- "description": "Sort users by specified column",
4572
- "name": "sort",
4573
- "default": "date",
4575
+ "limit": {
4576
+ "char": "l",
4577
+ "description": "Maximum number of backups returned",
4578
+ "name": "limit",
4579
+ "default": 30,
4574
4580
  "hasDynamicHelp": false,
4575
4581
  "multiple": false,
4576
- "options": [
4577
- "id",
4578
- "name",
4579
- "role",
4580
- "date"
4581
- ],
4582
4582
  "type": "option"
4583
4583
  }
4584
4584
  },
4585
4585
  "hasDynamicHelp": false,
4586
4586
  "hiddenAliases": [
4587
- "user:list"
4587
+ "backup:list"
4588
4588
  ],
4589
- "id": "users:list",
4589
+ "id": "backups:list",
4590
4590
  "pluginAlias": "@sanity/cli",
4591
4591
  "pluginName": "@sanity/cli",
4592
4592
  "pluginType": "core",
@@ -4595,7 +4595,7 @@
4595
4595
  "relativePath": [
4596
4596
  "dist",
4597
4597
  "commands",
4598
- "users",
4598
+ "backups",
4599
4599
  "list.js"
4600
4600
  ]
4601
4601
  },
@@ -5116,5 +5116,5 @@
5116
5116
  ]
5117
5117
  }
5118
5118
  },
5119
- "version": "7.1.0"
5119
+ "version": "7.2.0"
5120
5120
  }