@salesforce/plugin-org 3.5.1 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -99,8 +99,924 @@ the [SandboxNuts](https://github.com/salesforcecli/plugin-org/actions/workflows/
99
99
 
100
100
  <!-- commands -->
101
101
 
102
- # Command Topics
102
+ - [`sf org create sandbox`](#sf-org-create-sandbox)
103
+ - [`sf org create scratch`](#sf-org-create-scratch)
104
+ - [`sf org delete sandbox`](#sf-org-delete-sandbox)
105
+ - [`sf org delete scratch`](#sf-org-delete-scratch)
106
+ - [`sf org disable tracking`](#sf-org-disable-tracking)
107
+ - [`sf org display`](#sf-org-display)
108
+ - [`sf org enable tracking`](#sf-org-enable-tracking)
109
+ - [`sf org list`](#sf-org-list)
110
+ - [`sf org list metadata`](#sf-org-list-metadata)
111
+ - [`sf org list metadata-types`](#sf-org-list-metadata-types)
112
+ - [`sf org open`](#sf-org-open)
113
+ - [`sf org refresh sandbox`](#sf-org-refresh-sandbox)
114
+ - [`sf org resume sandbox`](#sf-org-resume-sandbox)
115
+ - [`sf org resume scratch`](#sf-org-resume-scratch)
103
116
 
104
- - [`sf org`](docs/org.md) - Commands to create and manage orgs and scratch org users.
117
+ ## `sf org create sandbox`
118
+
119
+ Create a sandbox org.
120
+
121
+ ```
122
+ USAGE
123
+ $ sf org create sandbox -o <value> [--json] [--flags-dir <value>] [-f <value>] [-s] [-a <value>] [-w <value> |
124
+ --async] [-i <value> | ] [-n <value>] [-c <value> | -l Developer|Developer_Pro|Partial|Full] [--no-prompt]
125
+ [--no-track-source]
126
+
127
+ FLAGS
128
+ -a, --alias=<value> Alias for the sandbox org.
129
+ -c, --clone=<value> Name of the sandbox org to clone.
130
+ -f, --definition-file=<value> Path to a sandbox definition file.
131
+ -i, --poll-interval=<seconds> Number of seconds to wait between retries.
132
+ -l, --license-type=<option> Type of sandbox license.
133
+ <options: Developer|Developer_Pro|Partial|Full>
134
+ -n, --name=<value> Name of the sandbox org.
135
+ -o, --target-org=<value> (required) Username or alias of the production org that contains the sandbox license.
136
+ -s, --set-default Set the sandbox org as your default org.
137
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
138
+ --async Request the sandbox creation, but don't wait for it to complete.
139
+ --no-prompt Don't prompt for confirmation about the sandbox configuration.
140
+ --no-track-source Do not use source tracking for this sandbox.
141
+
142
+ GLOBAL FLAGS
143
+ --flags-dir=<value> Import flag values from a directory.
144
+ --json Format output as json.
145
+
146
+ DESCRIPTION
147
+ Create a sandbox org.
148
+
149
+ There are two ways to create a sandbox org: specify a definition file that contains the sandbox options or use the
150
+ --name and --license-type flags to specify the two required options. If you want to set an option other than name or
151
+ license type, such as apexClassId, you must use a definition file.
152
+
153
+ You can also use this command to clone an existing sandbox. Use the --clone flag to specify the existing sandbox name
154
+ and the --name flag to the name of the new sandbox.
155
+
156
+ ALIASES
157
+ $ sf env create sandbox
158
+
159
+ EXAMPLES
160
+ Create a sandbox org using a definition file and give it the alias "MyDevSandbox". The production org that contains
161
+ the sandbox license has the alias "prodOrg".
162
+
163
+ $ sf org create sandbox --definition-file config/dev-sandbox-def.json --alias MyDevSandbox --target-org prodOrg
164
+
165
+ Create a sandbox org by directly specifying its name and type of license (Developer) instead of using a definition
166
+ file. Set the sandbox org as your default.
167
+
168
+ $ sf org create sandbox --name mysandbox --license-type Developer --alias MyDevSandbox --target-org prodOrg \
169
+ --set-default
170
+
171
+ Clone the existing sandbox with name "ExistingSandbox" and name the new sandbox "NewClonedSandbox". Set the new
172
+ sandbox as your default org. Wait for 30 minutes for the sandbox creation to complete.
173
+
174
+ $ sf org create sandbox --clone ExistingSandbox --name NewClonedSandbox --target-org prodOrg --alias \
175
+ MyDevSandbox --set-default --wait 30
176
+
177
+ FLAG DESCRIPTIONS
178
+ -a, --alias=<value> Alias for the sandbox org.
179
+
180
+ When you create a sandbox, the generated usernames are based on the usernames present in the production org. To
181
+ ensure uniqueness, the new usernames are appended with the name of the sandbox. For example, the username
182
+ "user@example.com" in the production org results in the username "user@example.com.mysandbox" in a sandbox named
183
+ "mysandbox". When you set an alias for a sandbox org, it's assigned to the resulting username of the user running
184
+ this command.
185
+
186
+ -c, --clone=<value> Name of the sandbox org to clone.
187
+
188
+ The value of --clone must be an existing sandbox. The existing sandbox, and the new sandbox specified with the
189
+ --name flag, must both be associated with the production org (--target-org) that contains the sandbox licenses.
190
+
191
+ -f, --definition-file=<value> Path to a sandbox definition file.
192
+
193
+ The sandbox definition file is a blueprint for the sandbox. You can create different definition files for each
194
+ sandbox type that you use in the development process. See
195
+ <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm> for all
196
+ the options you can specify in the definition file.
197
+
198
+ -n, --name=<value> Name of the sandbox org.
199
+
200
+ The name must be a unique alphanumeric string (10 or fewer characters) to identify the sandbox. You can’t reuse a
201
+ name while a sandbox is in the process of being deleted.
202
+
203
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
204
+
205
+ When it creates the sandbox org, Salesforce copies the metadata, and optionally data, from your production org to
206
+ the new sandbox org.
207
+
208
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
209
+
210
+ If the command continues to run after the wait period, the CLI returns control of the terminal to you and displays
211
+ the "sf org resume sandbox" command you run to check the status of the create. The displayed command includes the
212
+ job ID for the running sandbox creation.
213
+
214
+ --async Request the sandbox creation, but don't wait for it to complete.
215
+
216
+ The command immediately displays the job ID and returns control of the terminal to you. This way, you can continue
217
+ to use the CLI. To check the status of the sandbox creation, run "sf org resume sandbox".
218
+
219
+ --no-track-source Do not use source tracking for this sandbox.
220
+
221
+ We recommend you enable source tracking in Developer and Developer Pro sandbox, which is why it's the default
222
+ behavior. Source tracking allows you to track the changes you make to your metadata, both in your local project and
223
+ in the sandbox, and to detect any conflicts between the two.
224
+
225
+ To disable source tracking in the new sandbox, specify the --no-track-source flag. The main reason to disable source
226
+ tracking is for performance. For example, while you probably want to deploy metadata and run Apex tests in your
227
+ CI/CD jobs, you probably don't want to incur the costs of source tracking (checking for conflicts, polling the
228
+ SourceMember object, various file system operations.) This is a good use case for disabling source tracking in the
229
+ sandbox.
230
+ ```
231
+
232
+ _See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/create/sandbox.ts)_
233
+
234
+ ## `sf org create scratch`
235
+
236
+ Create a scratch org.
237
+
238
+ ```
239
+ USAGE
240
+ $ sf org create scratch -v <value> [--json] [--flags-dir <value>] [-a <value>] [--async] [-d] [-f <value>] [-c] [-e
241
+ developer|enterprise|group|professional|partner-developer|partner-enterprise|partner-group|partner-professional]
242
+ [-m] [-y <value>] [-w <value>] [--api-version <value>] [-i <value>] [-t] [--username <value>] [--description
243
+ <value>] [--name <value>] [--release preview|previous] [--admin-email <value>] [--source-org <value>]
244
+
245
+ FLAGS
246
+ -a, --alias=<value> Alias for the scratch org.
247
+ -d, --set-default Set the scratch org as your default org
248
+ -f, --definition-file=<value> Path to a scratch org definition file.
249
+ -i, --client-id=<value> Consumer key of the Dev Hub connected app.
250
+ -t, --[no-]track-source Use source tracking for this scratch org. Set --no-track-source to disable source
251
+ tracking.
252
+ -v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org.
253
+ -w, --wait=<minutes> Number of minutes to wait for the scratch org to be ready.
254
+ -y, --duration-days=<days> Number of days before the org expires.
255
+ --api-version=<value> Override the api version used for api requests made by this command
256
+ --async Request the org, but don't wait for it to complete.
257
+
258
+ PACKAGING FLAGS
259
+ -c, --no-ancestors Don't include second-generation managed package (2GP) ancestors in the scratch org.
260
+ -m, --no-namespace Create the scratch org with no namespace, even if the Dev Hub has a namespace.
261
+
262
+ DEFINITION FILE OVERRIDE FLAGS
263
+ -e, --edition=<option> Salesforce edition of the scratch org. Overrides the value of the "edition" option in the
264
+ definition file, if set.
265
+ <options: developer|enterprise|group|professional|partner-developer|partner-enterprise|part
266
+ ner-group|partner-professional>
267
+ --admin-email=<value> Email address that will be applied to the org's admin user. Overrides the value of the
268
+ "adminEmail" option in the definition file, if set.
269
+ --description=<value> Description of the scratch org in the Dev Hub. Overrides the value of the "description"
270
+ option in the definition file, if set.
271
+ --name=<value> Name of the org, such as "Acme Company". Overrides the value of the "orgName" option in the
272
+ definition file, if set.
273
+ --release=<option> Release of the scratch org as compared to the Dev Hub release.
274
+ <options: preview|previous>
275
+ --source-org=<value> 15-character ID of the org whose shape the new scratch org will be based on. Overrides the
276
+ value of the "sourceOrg" option in the definition file, if set.
277
+ --username=<value> Username of the scratch org admin user. Overrides the value of the "username" option in the
278
+ definition file, if set.
279
+
280
+ GLOBAL FLAGS
281
+ --flags-dir=<value> Import flag values from a directory.
282
+ --json Format output as json.
283
+
284
+ DESCRIPTION
285
+ Create a scratch org.
286
+
287
+ There are two ways to create a scratch org: either specify a definition file that contains the options or use the
288
+ --edition flag to specify the one required option.
289
+
290
+ For either method, you can also use these flags; if you use them with --definition-file, they override their
291
+ equivalent option in the scratch org definition file:
292
+
293
+ * --description
294
+ * --name (equivalent to the "orgName" option)
295
+ * --username
296
+ * --release
297
+ * --edition
298
+ * --admin-email (equivalent to the "adminEmail" option)
299
+ * --source-org (equivalent to the "sourceOrg" option)
300
+
301
+ If you want to set options other than the preceding ones, such as org features or settings, you must use a definition
302
+ file.
303
+
304
+ You must specify a Dev Hub to create a scratch org, either with the --target-dev-hub flag or by setting your default
305
+ Dev Hub with the target-dev-hub configuration variable.
306
+
307
+ ALIASES
308
+ $ sf env create scratch
309
+
310
+ EXAMPLES
311
+ Create a Developer edition scratch org using your default Dev Hub and give the scratch org an alias:
312
+
313
+ $ sf org create scratch --edition developer --alias my-scratch-org
314
+
315
+ Create a scratch org with a definition file. Specify the Dev Hub using its alias, set the scratch org as your
316
+ default, and specify that it expires in 3 days:
317
+
318
+ $ sf org create scratch --target-dev-hub MyHub --definition-file config/project-scratch-def.json --set-default \
319
+ --duration-days 3
320
+
321
+ Create a preview Enterprise edition scratch org; for use only during Salesforce release transition periods:
322
+
323
+ $ sf org create scratch --edition enterprise --alias my-scratch-org --target-dev-hub MyHub --release preview
324
+
325
+ FLAG DESCRIPTIONS
326
+ -a, --alias=<value> Alias for the scratch org.
327
+
328
+ New scratch orgs include one administrator by default. The admin user's username is auto-generated and looks
329
+ something like test-wvkpnfm5z113@example.com. When you set an alias for a new scratch org, it's assigned this
330
+ username.
331
+
332
+ -e, --edition=developer|enterprise|group|professional|partner-developer|partner-enterprise|partner-group|partner-professional
333
+
334
+ Salesforce edition of the scratch org. Overrides the value of the "edition" option in the definition file, if set.
335
+
336
+ The editions that begin with "partner-" are available only if the Dev Hub org is a Partner Business Org.
337
+
338
+ -f, --definition-file=<value> Path to a scratch org definition file.
339
+
340
+ The scratch org definition file is a blueprint for the scratch org. It mimics the shape of an org that you use in
341
+ the development life cycle, such as acceptance testing, packaging, or production. See
342
+ <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file.htm> for
343
+ all the option you can specify in the definition file.
344
+
345
+ -t, --[no-]track-source Use source tracking for this scratch org. Set --no-track-source to disable source tracking.
346
+
347
+ We recommend you enable source tracking in scratch orgs, which is why it's the default behavior. Source tracking
348
+ allows you to track the changes you make to your metadata, both in your local project and in the scratch org, and to
349
+ detect any conflicts between the two.
350
+
351
+ To disable source tracking in the new scratch org, specify the --no-track-source flag. The main reason to disable
352
+ source tracking is for performance. For example, while you probably want to deploy metadata and run Apex tests in
353
+ your CI/CD jobs, you probably don't want to incur the costs of source tracking (checking for conflicts, polling the
354
+ SourceMember object, various file system operations.) This is a good use case for disabling source tracking in the
355
+ scratch org.
356
+
357
+ -v, --target-dev-hub=<value> Username or alias of the Dev Hub org.
358
+
359
+ Overrides the value of the target-dev-hub configuration variable, if set.
360
+
361
+ -w, --wait=<minutes> Number of minutes to wait for the scratch org to be ready.
362
+
363
+ If the command continues to run after the wait period, the CLI returns control of the terminal to you and displays
364
+ the job ID. To resume the scratch org creation, run the org resume scratch command and pass it the job ID.
365
+
366
+ --async Request the org, but don't wait for it to complete.
367
+
368
+ The command immediately displays the job ID and returns control of the terminal to you. This way, you can continue
369
+ to use the CLI. To resume the scratch org creation, run "sf org resume scratch".
370
+
371
+ --release=preview|previous Release of the scratch org as compared to the Dev Hub release.
372
+
373
+ By default, scratch orgs are on the same release as the Dev Hub. During Salesforce release transition periods, you
374
+ can override this default behavior and opt in or out of the new release.
375
+
376
+ --username=<value>
377
+
378
+ Username of the scratch org admin user. Overrides the value of the "username" option in the definition file, if set.
379
+
380
+ The username must be unique within the entire scratch org and sandbox universe. You must add your own logic to
381
+ ensure uniqueness.
382
+
383
+ Omit this flag to have Salesforce generate a unique username for your org.
384
+ ```
385
+
386
+ _See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/create/scratch.ts)_
387
+
388
+ ## `sf org delete sandbox`
389
+
390
+ Delete a sandbox.
391
+
392
+ ```
393
+ USAGE
394
+ $ sf org delete sandbox -o <value> [--json] [--flags-dir <value>] [-p]
395
+
396
+ FLAGS
397
+ -o, --target-org=<value> (required) Sandbox alias or login user.
398
+ -p, --no-prompt Don't prompt the user to confirm the deletion.
399
+
400
+ GLOBAL FLAGS
401
+ --flags-dir=<value> Import flag values from a directory.
402
+ --json Format output as json.
403
+
404
+ DESCRIPTION
405
+ Delete a sandbox.
406
+
407
+ Salesforce CLI marks the org for deletion in the production org that contains the sandbox licenses and then deletes
408
+ all local references to the org from your computer.
409
+ Specify a sandbox with either the username you used when you logged into it, or the alias you gave the sandbox when
410
+ you created it. Run "sf org list" to view all your orgs, including sandboxes, and their aliases.
411
+ Both the sandbox and the associated production org must already be authenticated with the CLI to successfully delete
412
+ the sandbox.
413
+
414
+ ALIASES
415
+ $ sf env delete sandbox
416
+
417
+ EXAMPLES
418
+ Delete a sandbox with alias my-sandbox:
419
+
420
+ $ sf org delete sandbox --target-org my-sandbox
421
+
422
+ Specify a username instead of an alias:
423
+
424
+ $ sf org delete sandbox --target-org myusername@example.com.qa
425
+
426
+ Delete the sandbox without prompting to confirm:
427
+
428
+ $ sf org delete sandbox --target-org my-sandbox --no-prompt
429
+ ```
430
+
431
+ _See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/delete/sandbox.ts)_
432
+
433
+ ## `sf org delete scratch`
434
+
435
+ Delete a scratch org.
436
+
437
+ ```
438
+ USAGE
439
+ $ sf org delete scratch -o <value> [--json] [--flags-dir <value>] [-p]
440
+
441
+ FLAGS
442
+ -o, --target-org=<value> (required) Scratch org alias or login user.
443
+ -p, --no-prompt Don't prompt the user to confirm the deletion.
444
+
445
+ GLOBAL FLAGS
446
+ --flags-dir=<value> Import flag values from a directory.
447
+ --json Format output as json.
448
+
449
+ DESCRIPTION
450
+ Delete a scratch org.
451
+
452
+ Salesforce CLI marks the org for deletion in the Dev Hub org and then deletes all local references to the org from
453
+ your computer.
454
+ Specify a scratch org with either the username or the alias you gave the scratch org when you created it. Run "sf org
455
+ list" to view all your orgs, including scratch orgs, and their aliases.
456
+
457
+ ALIASES
458
+ $ sf env delete scratch
459
+
460
+ EXAMPLES
461
+ Delete a scratch org with alias my-scratch-org:
462
+
463
+ $ sf org delete scratch --target-org my-scratch-org
464
+
465
+ Specify a username instead of an alias:
466
+
467
+ $ sf org delete scratch --target-org test-123456-abcdefg@example.com
468
+
469
+ Delete the scratch org without prompting to confirm :
470
+
471
+ $ sf org delete scratch --target-org my-scratch-org --no-prompt
472
+ ```
473
+
474
+ _See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/delete/scratch.ts)_
475
+
476
+ ## `sf org disable tracking`
477
+
478
+ Prevent Salesforce CLI from tracking changes in your source files between your project and an org.
479
+
480
+ ```
481
+ USAGE
482
+ $ sf org disable tracking -o <value> [--json] [--flags-dir <value>]
483
+
484
+ FLAGS
485
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
486
+ configuration variable is already set.
487
+
488
+ GLOBAL FLAGS
489
+ --flags-dir=<value> Import flag values from a directory.
490
+ --json Format output as json.
491
+
492
+ DESCRIPTION
493
+ Prevent Salesforce CLI from tracking changes in your source files between your project and an org.
494
+
495
+ Disabling source tracking has no direct effect on the org, it affects only your local environment. Specifically,
496
+ Salesforce CLI stores the setting in the org's local configuration file so that no source tracking operations are
497
+ executed when working with the org.
498
+
499
+ EXAMPLES
500
+ Disable source tracking for an org with alias "myscratch":
501
+
502
+ $ sf org disable tracking --target-org myscratch
503
+
504
+ Disable source tracking for an org using a username:
505
+
506
+ $ sf org disable tracking --target-org you@example.com
507
+
508
+ Disable source tracking for your default org:
509
+
510
+ $ sf org disable tracking
511
+ ```
512
+
513
+ _See code: [src/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/disable/tracking.ts)_
514
+
515
+ ## `sf org display`
516
+
517
+ Display information about an org.
518
+
519
+ ```
520
+ USAGE
521
+ $ sf org display -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [--verbose]
522
+
523
+ FLAGS
524
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
525
+ configuration variable is already set.
526
+ --api-version=<value> Override the api version used for api requests made by this command
527
+ --verbose Display the sfdxAuthUrl property.
528
+
529
+ GLOBAL FLAGS
530
+ --flags-dir=<value> Import flag values from a directory.
531
+ --json Format output as json.
532
+
533
+ DESCRIPTION
534
+ Display information about an org.
535
+
536
+ Output includes your access token, client Id, connected status, org ID, instance URL, username, and alias, if
537
+ applicable.
538
+
539
+ Use --verbose to include the SFDX auth URL. WARNING: The SFDX auth URL contains sensitive information, such as a
540
+ refresh token that can be used to access an org. Don't share or distribute this URL or token.
541
+
542
+ Including --verbose displays the sfdxAuthUrl property only if you authenticated to the org using "org login web" (not
543
+ "org login jwt").
544
+
545
+ ALIASES
546
+ $ sf force org display
547
+
548
+ EXAMPLES
549
+ Display information about your default org:
550
+
551
+ $ sf org display
552
+
553
+ Display information, including the sfdxAuthUrl property, about the org with alias TestOrg1:
554
+
555
+ $ sf org display --target-org TestOrg1 --verbose
556
+ ```
557
+
558
+ _See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/display.ts)_
559
+
560
+ ## `sf org enable tracking`
561
+
562
+ Allow Salesforce CLI to track changes in your source files between your project and an org.
563
+
564
+ ```
565
+ USAGE
566
+ $ sf org enable tracking -o <value> [--json] [--flags-dir <value>]
567
+
568
+ FLAGS
569
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
570
+ configuration variable is already set.
571
+
572
+ GLOBAL FLAGS
573
+ --flags-dir=<value> Import flag values from a directory.
574
+ --json Format output as json.
575
+
576
+ DESCRIPTION
577
+ Allow Salesforce CLI to track changes in your source files between your project and an org.
578
+
579
+ Enabling source tracking has no direct effect on the org, it affects only your local environment. Specifically,
580
+ Salesforce CLI stores the setting in the org's local configuration file so that source tracking operations are
581
+ executed when working with the org.
582
+
583
+ This command throws an error if the org doesn't support tracking. Examples of orgs that don't support source tracking
584
+ include Developer Edition orgs, production orgs, Partial Copy sandboxes, and Full sandboxes.
585
+
586
+ EXAMPLES
587
+ Enable source tracking for an org with alias "myscratch":
588
+
589
+ $ sf org enable tracking --target-org myscratch
590
+
591
+ Enable source tracking for an org using a username:
592
+
593
+ $ sf org enable tracking --target-org you@example.com
594
+
595
+ Enable source tracking for your default org:
596
+
597
+ $ sf org enable tracking
598
+ ```
599
+
600
+ _See code: [src/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/enable/tracking.ts)_
601
+
602
+ ## `sf org list`
603
+
604
+ List all orgs you’ve created or authenticated to.
605
+
606
+ ```
607
+ USAGE
608
+ $ sf org list [--json] [--flags-dir <value>] [--verbose] [--all] [-p --clean] [--skip-connection-status]
609
+
610
+ FLAGS
611
+ -p, --no-prompt Don't prompt for confirmation.
612
+ --all Include expired, deleted, and unknown-status scratch orgs.
613
+ --clean Remove all local org authorizations for non-active scratch orgs. Use "org logout" to
614
+ remove non-scratch orgs.
615
+ --skip-connection-status Skip retrieving the connection status of non-scratch orgs.
616
+ --verbose List more information about each org.
617
+
618
+ GLOBAL FLAGS
619
+ --flags-dir=<value> Import flag values from a directory.
620
+ --json Format output as json.
621
+
622
+ ALIASES
623
+ $ sf force org list
624
+
625
+ EXAMPLES
626
+ List all orgs you've created or authenticated to:
627
+
628
+ $ sf org list
629
+
630
+ List all orgs, including expired, deleted, and unknown-status orgs; don't include the connection status:
631
+
632
+ $ sf org list --skip-connection-status --all
633
+
634
+ List orgs and remove local org authorization info about non-active scratch orgs:
635
+
636
+ $ sf org list --clean
637
+ ```
638
+
639
+ _See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/list.ts)_
640
+
641
+ ## `sf org list metadata`
642
+
643
+ List the metadata components and properties of a specified type.
644
+
645
+ ```
646
+ USAGE
647
+ $ sf org list metadata -o <value> -m <value> [--json] [--flags-dir <value>] [--api-version <value>] [-f <value>]
648
+ [--folder <value>]
649
+
650
+ FLAGS
651
+ -f, --output-file=<value> Pathname of the file in which to write the results.
652
+ -m, --metadata-type=<value> (required) Metadata type to be retrieved, such as CustomObject; metadata type names are
653
+ case-sensitive.
654
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
655
+ configuration variable is already set.
656
+ --api-version=<value> API version to use; default is the most recent API version.
657
+ --folder=<value> Folder associated with the component; required for components that use folders; folder
658
+ names are case-sensitive.
659
+
660
+ GLOBAL FLAGS
661
+ --flags-dir=<value> Import flag values from a directory.
662
+ --json Format output as json.
663
+
664
+ DESCRIPTION
665
+ List the metadata components and properties of a specified type.
666
+
667
+ Use this command to identify individual components in your manifest file or if you want a high-level view of
668
+ particular metadata types in your org. For example, you can use this command to return a list of names of all the
669
+ CustomObject or Layout components in your org, then use this information in a retrieve command that returns a subset
670
+ of these components.
671
+
672
+ The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API
673
+ Functions permission.
674
+
675
+ ALIASES
676
+ $ sf force mdapi listmetadata
677
+
678
+ EXAMPLES
679
+ List the CustomObject components, and their properties, in the org with alias "my-dev-org":
680
+
681
+ $ sf org list metadata --metadata-type CustomObject --target-org my-dev-org
682
+
683
+ List the CustomObject components in your default org, write the output to the specified file, and use API version
684
+ 57.0:
685
+
686
+ $ sf org list metadata --metadata-type CustomObject --api-version 57.0 --output-file /path/to/outputfilename.txt
687
+
688
+ List the Dashboard components in your default org that are contained in the "folderSales" folder, write the output
689
+ to the specified file, and use API version 57.0:
690
+
691
+ $ sf org list metadata --metadata-type Dashboard --folder folderSales --api-version 57.0 --output-file \
692
+ /path/to/outputfilename.txt
693
+
694
+ FLAG DESCRIPTIONS
695
+ --api-version=<value> API version to use; default is the most recent API version.
696
+
697
+ Override the api version used for api requests made by this command
698
+
699
+ --folder=<value>
700
+
701
+ Folder associated with the component; required for components that use folders; folder names are case-sensitive.
702
+
703
+ Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
704
+ ```
705
+
706
+ _See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/list/metadata.ts)_
707
+
708
+ ## `sf org list metadata-types`
709
+
710
+ Display details about the metadata types that are enabled for your org.
711
+
712
+ ```
713
+ USAGE
714
+ $ sf org list metadata-types -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-f <value>]
715
+
716
+ FLAGS
717
+ -f, --output-file=<value> Pathname of the file in which to write the results.
718
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
719
+ configuration variable is already set.
720
+ --api-version=<value> API version to use; default is the most recent API version.
721
+
722
+ GLOBAL FLAGS
723
+ --flags-dir=<value> Import flag values from a directory.
724
+ --json Format output as json.
725
+
726
+ DESCRIPTION
727
+ Display details about the metadata types that are enabled for your org.
728
+
729
+ The information includes Apex classes and triggers, custom objects, custom fields on standard objects, tab sets that
730
+ define an app, and many other metadata types. Use this information to identify the syntax needed for a <name> element
731
+ in a manifest file (package.xml).
732
+
733
+ The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API
734
+ Functions permission.
735
+
736
+ ALIASES
737
+ $ sf force mdapi describemetadata
738
+
739
+ EXAMPLES
740
+ Display information about all known and enabled metadata types in the org with alias "my-dev-org" using API version
741
+ 57.0:
742
+
743
+ $ sf org list metadata-types --api-version 57.0 --target-org my-dev-org
744
+
745
+ Display only the metadata types that aren't yet supported by Salesforce CLI in your default org and write the
746
+ results to the specified file:
747
+
748
+ $ sf org list metadata-types --output-file /path/to/outputfilename.txt --filter-known
749
+
750
+ FLAG DESCRIPTIONS
751
+ -f, --output-file=<value> Pathname of the file in which to write the results.
752
+
753
+ Directing the output to a file makes it easier to extract relevant information for your package.xml manifest file.
754
+ The default output destination is the terminal or command window console.
755
+
756
+ --api-version=<value> API version to use; default is the most recent API version.
757
+
758
+ Override the api version used for api requests made by this command
759
+ ```
760
+
761
+ _See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/list/metadata-types.ts)_
762
+
763
+ ## `sf org open`
764
+
765
+ Open your default scratch org, or another specified org, in a browser.
766
+
767
+ ```
768
+ USAGE
769
+ $ sf org open -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [--private | -r | -b
770
+ chrome|edge|firefox] [-p <value> | -f <value>]
771
+
772
+ FLAGS
773
+ -b, --browser=<option> Browser where the org opens.
774
+ <options: chrome|edge|firefox>
775
+ -f, --source-file=<value> Path to an ApexPage or FlexiPage to open in Lightning App Builder.
776
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
777
+ configuration variable is already set.
778
+ -p, --path=<value> Navigation URL path to open a specific page.
779
+ -r, --url-only Display navigation URL, but don’t launch browser.
780
+ --api-version=<value> Override the api version used for api requests made by this command
781
+ --private Open the org in the default browser using private (incognito) mode.
782
+
783
+ GLOBAL FLAGS
784
+ --flags-dir=<value> Import flag values from a directory.
785
+ --json Format output as json.
786
+
787
+ DESCRIPTION
788
+ Open your default scratch org, or another specified org, in a browser.
789
+
790
+ To open a specific page, specify the portion of the URL after "https://mydomain.my.salesforce.com" as the value for
791
+ the --path flag. For example, specify "--path lightning" to open Lightning Experience, or specify "--path
792
+ /apex/YourPage" to open a Visualforce page.
793
+
794
+ Use the --source-file to open a Lightning Page from your local project in Lightning App Builder. Lightning page files
795
+ have the suffix .flexipage-meta.xml, and are stored in the "flexipages" directory.
796
+
797
+ To generate a URL but not launch it in your browser, specify --url-only.
798
+
799
+ To open in a specific browser, use the --browser flag. Supported browsers are "chrome", "edge", and "firefox". If you
800
+ don't specify --browser, the org opens in your default browser.
801
+
802
+ ALIASES
803
+ $ sf force org open
804
+ $ sf force source open
805
+
806
+ EXAMPLES
807
+ Open your default org in your default browser:
808
+
809
+ $ sf org open
810
+
811
+ Open your default org in an incognito window of your default browser:
812
+
813
+ $ sf org open --private
814
+
815
+ Open the org with alias MyTestOrg1 in the Firefox browser:
816
+
817
+ $ sf org open --target-org MyTestOrg1 --browser firefox
818
+
819
+ Display the navigation URL for the Lightning Experience page for your default org, but don't open the page in a
820
+ browser:
821
+
822
+ $ sf org open --url-only --path lightning
823
+
824
+ Open a local Lightning page in your default org's Lightning App Builder:
825
+
826
+ $ sf org open --source-file force-app/main/default/flexipages/Hello.flexipage-meta.xml
827
+
828
+ Open a local Flow in Flow Builder:
829
+
830
+ $ sf org open --source-file force-app/main/default/flows/Hello.flow-meta.xml
831
+ ```
832
+
833
+ _See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/open.ts)_
834
+
835
+ ## `sf org refresh sandbox`
836
+
837
+ Refresh a sandbox org using the sandbox name.
838
+
839
+ ```
840
+ USAGE
841
+ $ sf org refresh sandbox -o <value> [--json] [--flags-dir <value>] [--no-auto-activate] [-w <value> | --async] [-i
842
+ <value> | ] [-n <value>] [-f <value>] [--no-prompt]
843
+
844
+ FLAGS
845
+ -f, --definition-file=<value> Path to a sandbox definition file for overriding its configuration when you refresh it.
846
+ -i, --poll-interval=<seconds> Number of seconds to wait between status polling requests.
847
+ -n, --name=<value> Name of the existing sandbox org in your production org that you want to refresh.
848
+ -o, --target-org=<value> (required) Username or alias of the production org that contains the sandbox license.
849
+ -w, --wait=<minutes> Number of minutes to poll for sandbox refresh status.
850
+ --async Request the sandbox refresh, but don't wait for it to complete.
851
+ --no-auto-activate Disable auto-activation of the sandbox after a successful refresh.
852
+ --no-prompt Don't prompt for confirmation about the sandbox refresh.
853
+
854
+ GLOBAL FLAGS
855
+ --flags-dir=<value> Import flag values from a directory.
856
+ --json Format output as json.
857
+
858
+ DESCRIPTION
859
+ Refresh a sandbox org using the sandbox name.
860
+
861
+ Refreshing a sandbox copies the metadata, and optionally data, from your production org to the refreshed sandbox org.
862
+ You can optionally specify a definition file if you want to change the configuration of the refreshed sandbox, such as
863
+ its license type or template ID.
864
+
865
+ You're not allowed to change the sandbox name when you refresh it with this command. If you want to change the sandbox
866
+ name, first delete it with the "org delete sandbox" command. And then recreate it with the "org create sandbox"
867
+ command and give it a new name.
868
+
869
+ EXAMPLES
870
+ Refresh the sandbox named "devSbx1". The production org that contains the sandbox license has the alias "prodOrg".
871
+
872
+ $ sf org refresh sandbox --name devSbx1 --target-org prodOrg
873
+
874
+ Refresh the sandbox named "devSbx2", and override the configuration of the refreshed sandbox with the properties in
875
+ the specified defintion file. The default target org is the production org, so you don't need to specify the
876
+ `--target-org` flag in this case.
877
+
878
+ $ sf org refresh sandbox --name devSbx2 --definition-file devSbx2-config.json
879
+
880
+ Refresh the sandbox using the name defined in the definition file. The production org that contains the sandbox
881
+ license has the alias "prodOrg".
882
+
883
+ $ sf org refresh sandbox --definition-file devSbx3-config.json --target-org prodOrg
884
+
885
+ FLAG DESCRIPTIONS
886
+ -f, --definition-file=<value> Path to a sandbox definition file for overriding its configuration when you refresh it.
887
+
888
+ The sandbox definition file is a blueprint for the sandbox; use the file to change the sandbox configuration during
889
+ a refresh. If you don't want to change the sandbox configuration when you refresh it, then simply use the --name
890
+ flag to specify the sandbox and don't use this flag. See
891
+ <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm> for all
892
+ the options you can specify in the definition file.
893
+
894
+ -w, --wait=<minutes> Number of minutes to poll for sandbox refresh status.
895
+
896
+ If the command continues to run after the wait period, the CLI returns control of the terminal to you and displays
897
+ the "sf org resume sandbox" command for you run to check the status of the refresh. The displayed command includes
898
+ the job ID for the running sandbox refresh.
899
+
900
+ --async Request the sandbox refresh, but don't wait for it to complete.
901
+
902
+ The command immediately displays the job ID and returns control of the terminal to you. This way, you can continue
903
+ to use the CLI. To check the status of the sandbox refresh, run "sf org resume sandbox".
904
+
905
+ --no-auto-activate Disable auto-activation of the sandbox after a successful refresh.
906
+
907
+ By default, a sandbox auto-activates after a refresh. Use this flag to control sandbox activation manually.
908
+ ```
909
+
910
+ _See code: [src/commands/org/refresh/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/refresh/sandbox.ts)_
911
+
912
+ ## `sf org resume sandbox`
913
+
914
+ Check the status of a sandbox creation, and log in to it if it's ready.
915
+
916
+ ```
917
+ USAGE
918
+ $ sf org resume sandbox [--json] [--flags-dir <value>] [-w <value>] [-n <value> | -i <value>] [-l] [-o <value>]
919
+
920
+ FLAGS
921
+ -i, --job-id=<value> Job ID of the incomplete sandbox creation that you want to check the status of.
922
+ -l, --use-most-recent Use the most recent sandbox create request.
923
+ -n, --name=<value> Name of the sandbox org.
924
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
925
+ -w, --wait=<minutes> [default: 0 minutes] Number of minutes to wait for the sandbox org to be ready.
926
+
927
+ GLOBAL FLAGS
928
+ --flags-dir=<value> Import flag values from a directory.
929
+ --json Format output as json.
930
+
931
+ DESCRIPTION
932
+ Check the status of a sandbox creation, and log in to it if it's ready.
933
+
934
+ Sandbox creation can take a long time. If the original "sf org create sandbox" command either times out, or you
935
+ specified the --async flag, the command displays a job ID. Use this job ID to check whether the sandbox creation is
936
+ complete, and if it is, the command then logs into it.
937
+
938
+ You can also use the sandbox name to check the status or the --use-most-recent flag to use the job ID of the most
939
+ recent sandbox creation.
940
+
941
+ ALIASES
942
+ $ sf env resume sandbox
943
+
944
+ EXAMPLES
945
+ Check the status of a sandbox creation using its name and specify a production org with alias "prodOrg":
946
+
947
+ $ sf org resume sandbox --name mysandbox --target-org prodOrg
948
+
949
+ Check the status using the job ID:
950
+
951
+ $ sf org resume sandbox --job-id 0GRxxxxxxxx
952
+
953
+ Check the status of the most recent sandbox create request:
954
+
955
+ $ sf org resume sandbox --use-most-recent
956
+
957
+ FLAG DESCRIPTIONS
958
+ -i, --job-id=<value> Job ID of the incomplete sandbox creation that you want to check the status of.
959
+
960
+ The job ID is valid for 24 hours after you start the sandbox creation.
961
+
962
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
963
+
964
+ When it creates the sandbox org, Salesforce copies the metadata, and optionally data, from your production org to
965
+ the new sandbox org.
966
+
967
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
968
+
969
+ If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
970
+ returns the job ID. To resume checking the sandbox creation, rerun this command.
971
+ ```
972
+
973
+ _See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/resume/sandbox.ts)_
974
+
975
+ ## `sf org resume scratch`
976
+
977
+ Resume the creation of an incomplete scratch org.
978
+
979
+ ```
980
+ USAGE
981
+ $ sf org resume scratch [--json] [--flags-dir <value>] [-i <value>] [-r]
982
+
983
+ FLAGS
984
+ -i, --job-id=<value> Job ID of the incomplete scratch org create that you want to resume.
985
+ -r, --use-most-recent Use the job ID of the most recent incomplete scratch org.
986
+
987
+ GLOBAL FLAGS
988
+ --flags-dir=<value> Import flag values from a directory.
989
+ --json Format output as json.
990
+
991
+ DESCRIPTION
992
+ Resume the creation of an incomplete scratch org.
993
+
994
+ When the original "sf org create scratch" command either times out or is run with the --async flag, it displays a job
995
+ ID.
996
+
997
+ Run this command by either passing it a job ID or using the --use-most-recent flag to specify the most recent
998
+ incomplete scratch org.
999
+
1000
+ ALIASES
1001
+ $ sf env resume scratch
1002
+
1003
+ EXAMPLES
1004
+ Resume a scratch org create with a job ID:
1005
+
1006
+ $ sf org resume scratch --job-id 2SR3u0000008fBDGAY
1007
+
1008
+ Resume your most recent incomplete scratch org:
1009
+
1010
+ $ sf org resume scratch --use-most-recent
1011
+
1012
+ FLAG DESCRIPTIONS
1013
+ -i, --job-id=<value> Job ID of the incomplete scratch org create that you want to resume.
1014
+
1015
+ The job ID is the same as the record ID of the incomplete scratch org in the ScratchOrgInfo object of the Dev Hub.
1016
+
1017
+ The job ID is valid for 24 hours after you start the scratch org creation.
1018
+ ```
1019
+
1020
+ _See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.6.1/src/commands/org/resume/scratch.ts)_
105
1021
 
106
1022
  <!-- commandsstop -->