@salesforce/plugin-org 2.9.29 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,24 +2,36 @@
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/@salesforce/plugin-org.svg?label=@salesforce/plugin-org)](https://www.npmjs.com/package/@salesforce/plugin-org) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-org.svg)](https://npmjs.org/package/@salesforce/plugin-org) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/plugin-org/main/LICENSE.txt)
4
4
 
5
- Commands for working with Salesforce orgs. As the Salesforce CLI is transitioning commands owned by various teams to open source, it may not represent all of the `org` commands.
5
+ Commands for working with Salesforce orgs. As the Salesforce CLI is transitioning commands owned by various teams to
6
+ open source, it may not represent all of the `org` commands.
6
7
 
7
8
  ## About Salesforce CLI plugins
8
9
 
9
- Salesforce CLI plugins are based on the [oclif plugin framework](<(https://oclif.io/docs/introduction.html)>). Read the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm) to learn about Salesforce CLI plugin development.
10
+ Salesforce CLI plugins are based on the [oclif plugin framework](<(https://oclif.io/docs/introduction.html)>). Read
11
+ the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm)
12
+ to learn about Salesforce CLI plugin development.
10
13
 
11
- This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the [node developer packages](https://github.com/forcedotcom/sfdx-dev-packages/) used by Salesforce. There is also a default circleci config using the [release management orb](https://github.com/forcedotcom/npm-release-management-orb) standards.
14
+ This repository contains a lot of additional scripts and tools to help with general Salesforce node development and
15
+ enforce coding standards. You should familiarize yourself with some of
16
+ the [node developer packages](https://github.com/forcedotcom/sfdx-dev-packages/) used by Salesforce. There is also a
17
+ default circleci config using the [release management orb](https://github.com/forcedotcom/npm-release-management-orb)
18
+ standards.
12
19
 
13
- Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the `posttest` script and it is recommended to keep these tests active in your plugin, regardless if you plan to have it bundled.
20
+ Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with
21
+ the CLI. These test are included by default under the `posttest` script and it is recommended to keep these tests active
22
+ in your plugin, regardless if you plan to have it bundled.
14
23
 
15
- This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). For more information on the CLI, read the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm).
24
+ This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). For more information
25
+ on the CLI, read
26
+ the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm).
16
27
 
17
- We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.
28
+ We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific
29
+ version or tag if needed.
18
30
 
19
31
  ## Install
20
32
 
21
33
  ```bash
22
- sfdx plugins:install @salesforce/plugin-org
34
+ sf plugins:install @salesforce/plugin-org
23
35
  ```
24
36
 
25
37
  ## Issues
@@ -34,9 +46,11 @@ Please report any issues at <https://github.com/forcedotcom/cli/issues>
34
46
  let you know if there is already an effort in progress.
35
47
  3. Fork this repository.
36
48
  4. [Build the plugin locally](#build)
37
- 5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
49
+ 5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing
50
+ using a fork.
38
51
  6. Edit the code in your fork.
39
- 7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
52
+ 7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request
53
+ will be accepted without unit tests.
40
54
  8. Sign CLA (see [CLA](#cla) below).
41
55
  9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
42
56
 
@@ -65,254 +79,813 @@ To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file.
65
79
  ./bin/dev force:org:list
66
80
  ```
67
81
 
68
- There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
82
+ There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be
83
+ useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
69
84
 
70
85
  ```bash
71
- # Link your plugin to the sfdx cli
72
- sfdx plugins:link .
86
+ # Link your plugin to the sf cli
87
+ sf plugins:link .
73
88
  # To verify
74
- sfdx plugins
89
+ sf plugins
75
90
  ```
76
91
 
77
92
  ### Sandbox NUTs
78
93
 
79
- Sandboxes are pretty slow, and there's a constraint to how many we can have. So if your changes might impact sandboxes, and you want to check those in the real world, run the [SandboxNuts](https://github.com/salesforcecli/plugin-org/actions/workflows/sandboxNuts.yml) Github Action.
94
+ Sandboxes are pretty slow, and there's a constraint to how many we can have. So if your changes might impact sandboxes,
95
+ and you want to check those in the real world, run
96
+ the [SandboxNuts](https://github.com/salesforcecli/plugin-org/actions/workflows/sandboxNuts.yml) Github Action.
80
97
 
81
98
  ## Commands
82
99
 
83
100
  <!-- commands -->
84
101
 
85
- - [`sfdx force:org:beta:create [name=value...] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-s] [-a <string>] [-w <minutes>] [-d <integer>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgbetacreate-namevalue--t-scratchsandbox--f-filepath--n--c--i-string--s--a-string--w-minutes--d-integer--v-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
86
- - [`sfdx force:org:clone [name=value...] -t sandbox [-f <filepath>] [-s] [-a <string>] [-w <minutes>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgclone-namevalue--t-sandbox--f-filepath--s--a-string--w-minutes--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
87
- - [`sfdx force:org:create [name=value...] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-s] [-a <string>] [-w <minutes>] [-d <integer>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgcreate-namevalue--t-scratchsandbox--f-filepath--n--c--i-string--s--a-string--w-minutes--d-integer--v-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
88
- - [`sfdx force:org:delete [-p] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgdelete--p--v-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
89
- - [`sfdx force:org:display [-u <string>] [--apiversion <string>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgdisplay--u-string---apiversion-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
90
- - [`sfdx force:org:list [--all] [-p --clean] [--skipconnectionstatus] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorglist---all--p---clean---skipconnectionstatus---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
91
- - [`sfdx force:org:open [-b <string> | -r] [-p <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgopen--b-string---r--p-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
92
- - [`sfdx force:org:status -n <string> [-s] [-a <string>] [-w <minutes>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forceorgstatus--n-string--s--a-string--w-minutes--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
102
+ - [`sf env:create:sandbox`](#sf-envcreatesandbox)
103
+ - [`sf env:delete:sandbox`](#sf-envdeletesandbox)
104
+ - [`sf env:delete:scratch`](#sf-envdeletescratch)
105
+ - [`sf env:resume:sandbox`](#sf-envresumesandbox)
106
+ - [`sf env:resume:scratch`](#sf-envresumescratch)
107
+ - [`sf force:mdapi:describemetadata`](#sf-forcemdapidescribemetadata)
108
+ - [`sf force:mdapi:listmetadata`](#sf-forcemdapilistmetadata)
109
+ - [`sf force:org:display`](#sf-forceorgdisplay)
110
+ - [`sf force:org:open`](#sf-forceorgopen)
111
+ - [`sf force:source:open`](#sf-forcesourceopen)
112
+ - [`sf org:create:sandbox`](#sf-orgcreatesandbox)
113
+ - [`sf org:delete:sandbox`](#sf-orgdeletesandbox)
114
+ - [`sf org:delete:scratch`](#sf-orgdeletescratch)
115
+ - [`sf org:display`](#sf-orgdisplay)
116
+ - [`sf org:list:metadata`](#sf-orglistmetadata)
117
+ - [`sf org:list:metadata-types`](#sf-orglistmetadata-types)
118
+ - [`sf org:open`](#sf-orgopen)
119
+ - [`sf org:resume:sandbox`](#sf-orgresumesandbox)
120
+ - [`sf org:resume:scratch`](#sf-orgresumescratch)
121
+
122
+ ## `sf env:create:sandbox`
123
+
124
+ Create a sandbox org.
93
125
 
94
- ## `sfdx force:org:beta:create [name=value...] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-s] [-a <string>] [-w <minutes>] [-d <integer>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
126
+ ```
127
+ USAGE
128
+ $ sf env:create:sandbox -o <value> [--json] [-f <value> | -n <value> | -l Developer|Developer_Pro|Partial|Full] [-s]
129
+ [-a <value>] [-w <value> | --async] [-i <value> | ] [-c <value> | ] [--no-prompt] [--no-track-source]
130
+
131
+ FLAGS
132
+ -a, --alias=<value> Alias for the sandbox org.
133
+ -c, --clone=<value> Name of the sandbox org to clone.
134
+ -f, --definition-file=<value> Path to a sandbox definition file.
135
+ -i, --poll-interval=<seconds> [default: 30 seconds] Number of seconds to wait between retries.
136
+ -l, --license-type=<option> Type of sandbox license.
137
+ <options: Developer|Developer_Pro|Partial|Full>
138
+ -n, --name=<value> Name of the sandbox org.
139
+ -o, --target-org=<value> (required) Username or alias of the production org that contains the sandbox license.
140
+ -s, --set-default Set the sandbox org as your default org.
141
+ -w, --wait=<minutes> [default: 30 minutes] Number of minutes to wait for the sandbox org to be ready.
142
+ --async Request the sandbox creation, but don't wait for it to complete.
143
+ --no-prompt Don't prompt for confirmation about the sandbox configuration.
144
+ --no-track-source Do not use source tracking for this sandbox.
145
+
146
+ GLOBAL FLAGS
147
+ --json Format output as json.
148
+
149
+ DESCRIPTION
150
+ Create a sandbox org.
151
+
152
+ There are two ways to create a sandbox org: specify a definition file that contains the sandbox options or use the
153
+ --name and --license-type flags to specify the two required options. If you want to set an option other than name or
154
+ license type, such as apexClassId, you must use a definition file.
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 env:create:sandbox -f 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 env:create:sandbox --name mysandbox --license-type Developer --alias MyDevSandbox --target-org prodOrg \
169
+ --set-default
170
+
171
+ FLAG DESCRIPTIONS
172
+ -a, --alias=<value> Alias for the sandbox org.
173
+
174
+ When you create a sandbox, the generated usernames are based on the usernames present in the production org. To
175
+ ensure uniqueness, the new usernames are appended with the name of the sandbox. For example, the username
176
+ "user@example.com" in the production org results in the username "user@example.com.mysandbox" in a sandbox named
177
+ "mysandbox". When you set an alias for a sandbox org, it's assigned to the resulting username of the user running
178
+ this command.
179
+
180
+ -c, --clone=<value> Name of the sandbox org to clone.
181
+
182
+ The value of clone must be an existing sandbox in the same target-org.
183
+
184
+ -f, --definition-file=<value> Path to a sandbox definition file.
185
+
186
+ The sandbox definition file is a blueprint for the sandbox. You can create different definition files for each
187
+ sandbox type that you use in the development process. See
188
+ <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm> for all
189
+ the options you can specify in the defintion file.
190
+
191
+ -n, --name=<value> Name of the sandbox org.
192
+
193
+ The name must be a unique alphanumeric string (10 or fewer characters) to identify the sandbox. You can’t reuse a
194
+ name while a sandbox is in the process of being deleted.
95
195
 
96
- create a scratch or sandbox org
196
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
197
+
198
+ When it creates the sandbox org, Salesforce copies the metadata, and optionally data, from your production org to
199
+ the new sandbox org.
200
+
201
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
202
+
203
+ If the command continues to run after the wait period, the CLI returns control of the terminal to you and displays
204
+ the "sf org resume sandbox" command you run to check the status of the create. The displayed command includes the
205
+ job ID for the running sandbox creation.
206
+
207
+ --async Request the sandbox creation, but don't wait for it to complete.
208
+
209
+ The command immediately displays the job ID and returns control of the terminal to you. This way, you can continue
210
+ to use the CLI. To check the status of the sandbox creation, run "sf org resume sandbox".
211
+
212
+ --no-track-source Do not use source tracking for this sandbox.
213
+
214
+ We recommend you enable source tracking in Developer and Developer Pro sandbox, which is why it's the default
215
+ behavior. Source tracking allows you to track the changes you make to your metadata, both in your local project and
216
+ in the sandbox, and to detect any conflicts between the two.
217
+
218
+ To disable source tracking in the new sandbox, specify the --no-track-source flag. The main reason to disable source
219
+ tracking is for performance. For example, while you probably want to deploy metadata and run Apex tests in your
220
+ CI/CD jobs, you probably don't want to incur the costs of source tracking (checking for conflicts, polling the
221
+ SourceMember object, various file system operations.) This is a good use case for disabling source tracking in the
222
+ sandbox.
223
+ ```
224
+
225
+ ## `sf env:delete:sandbox`
226
+
227
+ Delete a sandbox.
97
228
 
98
229
  ```
99
230
  USAGE
100
- $ sfdx force:org:beta:create [name=value...] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-s] [-a
101
- <string>] [-w <minutes>] [-d <integer>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
102
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
231
+ $ sf env:delete:sandbox -o <value> [--json] [-p]
103
232
 
104
233
  FLAGS
105
- -a, --setalias=<value> alias for the created org
106
- -c, --noancestors do not include second-generation
107
- package ancestors in the scratch org
108
- -d, --durationdays=<value> [default: 7] duration of the scratch
109
- org (in days) (default:7, min:1,
110
- max:30)
111
- -f, --definitionfile=<value> path to an org definition file
112
- -i, --clientid=<value> connected app consumer key; not
113
- supported for sandbox org creation
114
- -n, --nonamespace create the scratch org with no
115
- namespace
116
- -s, --setdefaultusername set the created org as the default
117
- username
118
- -t, --type=(scratch|sandbox) [default: scratch] type of org to
119
- create
120
- -u, --targetusername=<value> username or alias for the target
121
- org; overrides default target org
122
- -v, --targetdevhubusername=<value> username or alias for the dev hub
123
- org; overrides default dev hub org
124
- -w, --wait=<value> [default: 6 minutes] the streaming
125
- client socket timeout (in minutes)
126
- --apiversion=<value> override the api version used for
127
- api requests made by this command
128
- --json format output as json
129
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
130
- this command invocation
234
+ -o, --target-org=<value> (required) Sandbox alias or login user.
235
+ -p, --no-prompt Don't prompt the user to confirm the deletion.
236
+
237
+ GLOBAL FLAGS
238
+ --json Format output as json.
131
239
 
132
240
  DESCRIPTION
133
- create a scratch or sandbox org
241
+ Delete a sandbox.
134
242
 
135
- Creates a scratch org or a sandbox org using the values specified in a configuration file or key=value pairs that you
136
- specify on the command line. Values specified on the command line override values in the configuration file. Specify a
137
- configuration file or provide key=value pairs while creating a scratch org or a sandbox. When creating scratch orgs,
138
- —targetdevhubusername (-v) must be a Dev Hub org. When creating sandboxes, the --targetusername (-u) must be a
139
- production org with sandbox licenses. The —type (-t) is required if creating a sandbox.
243
+ Salesforce CLI marks the org for deletion in the production org that contains the sandbox licenses and then deletes
244
+ all local references to the org from your computer.
245
+ Specify a sandbox with either the username you used when you logged into it, or the alias you gave the sandbox when
246
+ you created it. Run "sf org list" to view all your orgs, including sandboxes, and their aliases.
140
247
 
141
248
  ALIASES
142
- $ sfdx force:org:beta:create
249
+ $ sf env:delete:sandbox
143
250
 
144
251
  EXAMPLES
145
- $ sfdx force:org:create -f config/enterprise-scratch-def.json -a MyScratchOrg
252
+ Delete a sandbox with alias my-sandbox:
253
+
254
+ $ sf env:delete:sandbox --target-org my-sandbox
255
+
256
+ Specify a username instead of an alias:
146
257
 
147
- $ sfdx force:org:create edition=Developer -a MyScratchOrg -s -v devHub
258
+ $ sf env:delete:sandbox --target-org myusername@example.com.qa
148
259
 
149
- $ sfdx force:org:create -f config/enterprise-scratch-def.json -a ScratchOrgWithOverrides username=testuser1@mycompany.org
260
+ Delete the sandbox without prompting to confirm :
150
261
 
151
- $ sfdx force:org:create -t sandbox -f config/dev-sandbox-def.json -a MyDevSandbox -u prodOrg
262
+ $ sf env:delete:sandbox --target-org my-sandbox --no-prompt
152
263
  ```
153
264
 
154
- ## `sfdx force:org:clone [name=value...] -t sandbox [-f <filepath>] [-s] [-a <string>] [-w <minutes>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
265
+ ## `sf env:delete:scratch`
155
266
 
156
- clone a sandbox org
267
+ Delete a scratch org.
157
268
 
158
269
  ```
159
270
  USAGE
160
- $ sfdx force:org:clone [name=value...] -t sandbox [-f <filepath>] [-s] [-a <string>] [-w <minutes>] [-u <string>]
161
- [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
271
+ $ sf env:delete:scratch -o <value> [--json] [-p]
162
272
 
163
273
  FLAGS
164
- -a, --setalias=<value> alias for the cloned org
165
- -f, --definitionfile=<value> path to the sandbox definition file
166
- -s, --setdefaultusername set the cloned org as your default
167
- -t, --type=(sandbox) (required) type of org to create
168
- -u, --targetusername=<value> username or alias for the target
169
- org; overrides default target org
170
- -w, --wait=<value> [default: 6 minutes] number of
171
- minutes to wait while polling for
172
- status
173
- --apiversion=<value> override the api version used for
174
- api requests made by this command
175
- --json format output as json
176
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
177
- this command invocation
274
+ -o, --target-org=<value> (required) Scratch org alias or login user.
275
+ -p, --no-prompt Don't prompt the user to confirm the deletion.
276
+
277
+ GLOBAL FLAGS
278
+ --json Format output as json.
178
279
 
179
280
  DESCRIPTION
180
- clone a sandbox org
281
+ Delete a scratch org.
181
282
 
182
- There are two ways to clone a sandbox: either specify a sandbox definition file or provide key=value pairs at the
183
- command line. Key-value pairs at the command-line override their equivalent sandbox definition file values. In either
184
- case, you must specify both the "SandboxName" and "SourceSandboxName" options to set the names of the new sandbox and
185
- the one being cloned, respectively.
283
+ Salesforce CLI marks the org for deletion in the Dev Hub org and then deletes all local references to the org from
284
+ your computer.
285
+ Specify a scratch org with either the username or the alias you gave the scratch org when you created it. Run "sf org
286
+ list" to view all your orgs, including scratch orgs, and their aliases.
186
287
 
187
- Set the --targetusername (-u) parameter to a production org with sandbox licenses. The --type (-t) parameter is
188
- required and must be set to "sandbox".
288
+ ALIASES
289
+ $ sf env:delete:scratch
189
290
 
190
291
  EXAMPLES
191
- $ sfdx force:org:clone -t sandbox -f config/dev-sandbox-def.json -u prodOrg -a MyDevSandbox
292
+ Delete a scratch org with alias my-scratch-org:
293
+
294
+ $ sf env:delete:scratch --target-org my-scratch-org
295
+
296
+ Specify a username instead of an alias:
297
+
298
+ $ sf env:delete:scratch --target-org test-123456-abcdefg@example.com
299
+
300
+ Delete the scratch org without prompting to confirm :
301
+
302
+ $ sf env:delete:scratch --target-org my-scratch-org --no-prompt
303
+ ```
304
+
305
+ ## `sf env:resume:sandbox`
306
+
307
+ Check the status of a sandbox creation, and log in to it if it's ready.
192
308
 
193
- $ sfdx force:org:clone -t sandbox SandboxName=NewClonedSandbox SourceSandboxName=ExistingSandbox -u prodOrg -a MyDevSandbox
194
309
  ```
310
+ USAGE
311
+ $ sf env:resume:sandbox [--json] [-w <value>] [-n <value> | -i <value>] [-l] [-o <value>]
312
+
313
+ FLAGS
314
+ -i, --job-id=<value> Job ID of the incomplete sandbox creation that you want to check the status of.
315
+ -l, --use-most-recent Use the most recent sandbox create request.
316
+ -n, --name=<value> Name of the sandbox org.
317
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
318
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
319
+
320
+ GLOBAL FLAGS
321
+ --json Format output as json.
322
+
323
+ DESCRIPTION
324
+ Check the status of a sandbox creation, and log in to it if it's ready.
325
+
326
+ Sandbox creation can take a long time. If the original "sf org create sandbox" command either times out, or you
327
+ specified the --async flag, the command displays a job ID. Use this job ID to check whether the sandbox creation is
328
+ complete, and if it is, the command then logs into it.
329
+
330
+ 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
331
+ recent sandbox creation.
332
+
333
+ ALIASES
334
+ $ sf env:resume:sandbox
335
+
336
+ EXAMPLES
337
+ Check the status of a sandbox creation using its name and specify a production org with alias "prodOrg":
338
+
339
+ $ sf env:resume:sandbox --name mysandbox --target-org prodOrg
340
+
341
+ Check the status using the job ID:
342
+
343
+ $ sf env:resume:sandbox --job-id 0GRxxxxxxxx
344
+
345
+ Check the status of the most recent sandbox create request:
346
+
347
+ $ sf env:resume:sandbox --use-most-recent
348
+
349
+ FLAG DESCRIPTIONS
350
+ -i, --job-id=<value> Job ID of the incomplete sandbox creation that you want to check the status of.
351
+
352
+ The job ID is valid for 24 hours after you start the sandbox creation.
353
+
354
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
195
355
 
196
- _See code: [src/commands/force/org/clone.ts](https://github.com/salesforcecli/plugin-org/blob/v2.1.7/src/commands/force/org/clone.ts)_
356
+ When it creates the sandbox org, Salesforce copies the metadata, and optionally data, from your production org to
357
+ the new sandbox org.
197
358
 
198
- ## `sfdx force:org:create [name=value...] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-s] [-a <string>] [-w <minutes>] [-d <integer>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
359
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
199
360
 
200
- create a scratch or sandbox org
361
+ If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
362
+ returns the job ID. To resume checking the sandbox creation, rerun this command.
363
+ ```
364
+
365
+ ## `sf env:resume:scratch`
366
+
367
+ Resume the creation of an incomplete scratch org.
201
368
 
202
369
  ```
203
370
  USAGE
204
- $ sfdx force:org:create [name=value...] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-s] [-a
205
- <string>] [-w <minutes>] [-d <integer>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
206
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
371
+ $ sf env:resume:scratch [--json] [-i <value>] [-r]
207
372
 
208
373
  FLAGS
209
- -a, --setalias=<value> alias for the created org
210
- -c, --noancestors do not include second-generation
211
- package ancestors in the scratch org
212
- -d, --durationdays=<value> [default: 7] duration of the scratch
213
- org (in days) (default:7, min:1,
214
- max:30)
215
- -f, --definitionfile=<value> path to an org definition file
216
- -i, --clientid=<value> connected app consumer key; not
217
- supported for sandbox org creation
218
- -n, --nonamespace create the scratch org with no
219
- namespace
220
- -s, --setdefaultusername set the created org as the default
221
- username
222
- -t, --type=(scratch|sandbox) [default: scratch] type of org to
223
- create
224
- -u, --targetusername=<value> username or alias for the target
225
- org; overrides default target org
226
- -v, --targetdevhubusername=<value> username or alias for the dev hub
227
- org; overrides default dev hub org
228
- -w, --wait=<value> [default: 6 minutes] the streaming
229
- client socket timeout (in minutes)
230
- --apiversion=<value> override the api version used for
231
- api requests made by this command
232
- --json format output as json
233
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
234
- this command invocation
374
+ -i, --job-id=<value> Job ID of the incomplete scratch org create that you want to resume.
375
+ -r, --use-most-recent Use the job ID of the most recent incomplete scratch org.
376
+
377
+ GLOBAL FLAGS
378
+ --json Format output as json.
235
379
 
236
380
  DESCRIPTION
237
- create a scratch or sandbox org
381
+ Resume the creation of an incomplete scratch org.
382
+
383
+ When the original "sf org create scratch" command either times out or is run with the --async flag, it displays a job
384
+ ID.
238
385
 
239
- Creates a scratch org or a sandbox org using the values specified in a configuration file or key=value pairs that you
240
- specify on the command line. Values specified on the command line override values in the configuration file. Specify a
241
- configuration file or provide key=value pairs while creating a scratch org or a sandbox. When creating scratch orgs,
242
- —targetdevhubusername (-v) must be a Dev Hub org. When creating sandboxes, the --targetusername (-u) must be a
243
- production org with sandbox licenses. The —type (-t) is required if creating a sandbox.
386
+ Run this command by either passing it a job ID or using the --use-most-recent flag to specify the most recent
387
+ incomplete scratch org.
244
388
 
245
389
  ALIASES
246
- $ sfdx force:org:beta:create
390
+ $ sf env:resume:scratch
247
391
 
248
392
  EXAMPLES
249
- $ sfdx force:org:create -f config/enterprise-scratch-def.json -a MyScratchOrg
393
+ Resume a scratch org create with a job ID:
394
+
395
+ $ sf env:resume:scratch --job-id 2SR3u0000008fBDGAY
396
+
397
+ Resume your most recent incomplete scratch org:
398
+
399
+ $ sf env:resume:scratch --use-most-recent
400
+
401
+ FLAG DESCRIPTIONS
402
+ -i, --job-id=<value> Job ID of the incomplete scratch org create that you want to resume.
403
+
404
+ The job ID is the same as the record ID of the incomplete scratch org in the ScratchOrgInfo object of the Dev Hub.
405
+
406
+ The job ID is valid for 24 hours after you start the scratch org creation.
407
+ ```
250
408
 
251
- $ sfdx force:org:create edition=Developer -a MyScratchOrg -s -v devHub
409
+ ## `sf force:mdapi:describemetadata`
252
410
 
253
- $ sfdx force:org:create -f config/enterprise-scratch-def.json -a ScratchOrgWithOverrides username=testuser1@mycompany.org
411
+ Display details about the metadata types that are enabled for your org.
254
412
 
255
- $ sfdx force:org:create -t sandbox -f config/dev-sandbox-def.json -a MyDevSandbox -u prodOrg
256
413
  ```
414
+ USAGE
415
+ $ sf force:mdapi:describemetadata -o <value> [--json] [--api-version <value>] [-f <value>]
416
+
417
+ FLAGS
418
+ -f, --output-file=<value> Pathname of the file in which to write the results.
419
+ -o, --target-org=<value> (required) Username or alias of the target org.
420
+ --api-version=<value> API version to use; default is the most recent API version.
421
+
422
+ GLOBAL FLAGS
423
+ --json Format output as json.
257
424
 
258
- _See code: [src/commands/force/org/create.ts](https://github.com/salesforcecli/plugin-org/blob/v2.1.7/src/commands/force/org/create.ts)_
425
+ DESCRIPTION
426
+ Display details about the metadata types that are enabled for your org.
259
427
 
260
- ## `sfdx force:org:delete [-p] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
428
+ The information includes Apex classes and triggers, custom objects, custom fields on standard objects, tab sets that
429
+ define an app, and many other metadata types. Use this information to identify the syntax needed for a <name> element
430
+ in a manifest file (package.xml).
431
+
432
+ The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API
433
+ Functions permission.
434
+
435
+ ALIASES
436
+ $ sf force:mdapi:describemetadata
437
+
438
+ EXAMPLES
439
+ Display information about all known and enabled metadata types in the org with alias "my-dev-org" using API version
440
+ 57.0:
261
441
 
262
- mark a scratch or sandbox org for deletion
442
+ $ sf force:mdapi:describemetadata --api-version 57.0 --target-org my-dev-org
443
+
444
+ Display only the metadata types that aren't yet supported by Salesforce CLI in your default org and write the
445
+ results to the specified file:
446
+
447
+ $ sf force:mdapi:describemetadata --output-file /path/to/outputfilename.txt --filter-known
448
+
449
+ FLAG DESCRIPTIONS
450
+ -f, --output-file=<value> Pathname of the file in which to write the results.
451
+
452
+ Directing the output to a file makes it easier to extract relevant information for your package.xml manifest file.
453
+ The default output destination is the terminal or command window console.
454
+
455
+ --api-version=<value> API version to use; default is the most recent API version.
456
+
457
+ Override the api version used for api requests made by this command
458
+ ```
459
+
460
+ ## `sf force:mdapi:listmetadata`
461
+
462
+ List the metadata components and properties of a specified type.
263
463
 
264
464
  ```
265
465
  USAGE
266
- $ sfdx force:org:delete [-p] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
267
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
466
+ $ sf force:mdapi:listmetadata -o <value> -m <value> [--json] [--api-version <value>] [-f <value>] [--folder <value>]
268
467
 
269
468
  FLAGS
270
- -p, --noprompt no prompt to confirm deletion
271
- -u, --targetusername=<value> username or alias for the target
272
- org; overrides default target org
273
- -v, --targetdevhubusername=<value> username or alias for the dev hub
274
- org; overrides default dev hub org
275
- --apiversion=<value> override the api version used for
276
- api requests made by this command
277
- --json format output as json
278
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
279
- this command invocation
469
+ -f, --output-file=<value> Pathname of the file in which to write the results.
470
+ -m, --metadata-type=<value> (required) Metadata type to be retrieved, such as CustomObject; metadata type names are
471
+ case-sensitive.
472
+ -o, --target-org=<value> (required) Username or alias of the target org.
473
+ --api-version=<value> API version to use; default is the most recent API version.
474
+ --folder=<value> Folder associated with the component; required for components that use folders; folder
475
+ names are case-sensitive.
476
+
477
+ GLOBAL FLAGS
478
+ --json Format output as json.
280
479
 
281
480
  DESCRIPTION
282
- mark a scratch or sandbox org for deletion
481
+ List the metadata components and properties of a specified type.
482
+
483
+ Use this command to identify individual components in your manifest file or if you want a high-level view of
484
+ particular metadata types in your org. For example, you can use this command to return a list of names of all the
485
+ CustomObject or Layout components in your org, then use this information in a retrieve command that returns a subset
486
+ of these components.
283
487
 
284
- To mark the org for deletion without being prompted to confirm, specify --noprompt.
488
+ The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API
489
+ Functions permission.
490
+
491
+ ALIASES
492
+ $ sf force:mdapi:listmetadata
285
493
 
286
494
  EXAMPLES
287
- $ sfdx force:org:delete -u me@my.org
495
+ List the CustomObject components, and their properties, in the org with alias "my-dev-org":
496
+
497
+ $ sf force:mdapi:listmetadata --metadata-type CustomObject --target-org my-dev-org
498
+
499
+ List the CustomObject components in your default org, write the output to the specified file, and use API version
500
+ 57.0:
501
+
502
+ $ sf force:mdapi:listmetadata --metadata-type CustomObject --api-version 57.0 --output-file \
503
+ /path/to/outputfilename.txt
504
+
505
+ List the Dashboard components in your default org that are contained in the "folderSales" folder, write the output
506
+ to the specified file, and use API version 57.0:
507
+
508
+ $ sf force:mdapi:listmetadata --metadata-type Dashboard --folder folderSales --api-version 57.0 --output-file \
509
+ /path/to/outputfilename.txt
510
+
511
+ FLAG DESCRIPTIONS
512
+ --api-version=<value> API version to use; default is the most recent API version.
513
+
514
+ Override the api version used for api requests made by this command
515
+
516
+ --folder=<value>
517
+
518
+ Folder associated with the component; required for components that use folders; folder names are case-sensitive.
288
519
 
289
- $ sfdx force:org:delete -u MyOrgAlias -p
520
+ Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
290
521
  ```
291
522
 
292
- _See code: [src/commands/force/org/delete.ts](https://github.com/salesforcecli/plugin-org/blob/v2.1.7/src/commands/force/org/delete.ts)_
523
+ ## `sf force:org:display`
293
524
 
294
- ## `sfdx force:org:display [-u <string>] [--apiversion <string>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
525
+ Display information about an org.
295
526
 
296
- get the description for the current or target org
527
+ ```
528
+ USAGE
529
+ $ sf force:org:display -o <value> [--json] [--api-version <value>] [--verbose]
530
+
531
+ FLAGS
532
+ -o, --target-org=<value> (required) Username or alias of the target org.
533
+ --api-version=<value> Override the api version used for api requests made by this command
534
+ --verbose Display the sfdxAuthUrl property.
535
+
536
+ GLOBAL FLAGS
537
+ --json Format output as json.
538
+
539
+ DESCRIPTION
540
+ Display information about an org.
541
+
542
+ Output includes your access token, client Id, connected status, org ID, instance URL, username, and alias, if
543
+ applicable.
544
+
545
+ Use --verbose to include the SFDX auth URL. WARNING: The SFDX auth URL contains sensitive information, such as a
546
+ refresh token that can be used to access an org. Don't share or distribute this URL or token.
547
+
548
+ Including --verbose displays the sfdxAuthUrl property only if you authenticated to the org using "org login web" (not
549
+ "org login jwt").
550
+
551
+ ALIASES
552
+ $ sf force:org:display
553
+
554
+ EXAMPLES
555
+ Display information about your default org:
556
+
557
+ $ sf force:org:display
558
+
559
+ Display information, including the sfdxAuthUrl property, about the org with alias TestOrg1:
560
+
561
+ $ sf force:org:display --target-org TestOrg1 --verbose
562
+ ```
563
+
564
+ ## `sf force:org:open`
565
+
566
+ Open your default scratch org, or another specified org, in a browser.
297
567
 
298
568
  ```
299
569
  USAGE
300
- $ sfdx force:org:display [-u <string>] [--apiversion <string>] [--verbose] [--json] [--loglevel
301
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
570
+ $ sf force:org:open -o <value> [--json] [--api-version <value>] [-b chrome|edge|firefox | -r] [-p <value> | -f
571
+ <value>]
302
572
 
303
573
  FLAGS
304
- -u, --targetusername=<value> username or alias for the target
305
- org; overrides default target org
306
- --apiversion=<value> override the api version used for
307
- api requests made by this command
308
- --json format output as json
309
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
310
- this command invocation
311
- --verbose emit additional command output to
312
- stdout
574
+ -b, --browser=<option> Browser where the org opens.
575
+ <options: chrome|edge|firefox>
576
+ -f, --source-file=<value> Path to an ApexPage or FlexiPage to open in Lightning App Builder.
577
+ -o, --target-org=<value> (required) Username or alias of the target org.
578
+ -p, --path=<value> Navigation URL path to open a specific page.
579
+ -r, --url-only Display navigation URL, but don’t launch browser.
580
+ --api-version=<value> Override the api version used for api requests made by this command
581
+
582
+ GLOBAL FLAGS
583
+ --json Format output as json.
313
584
 
314
585
  DESCRIPTION
315
- get the description for the current or target org
586
+ Open your default scratch org, or another specified org, in a browser.
587
+
588
+ To open a specific page, specify the portion of the URL after "https://MyDomainName.my.salesforce.com/" as the value
589
+ for the --path flag. For example, specify "--path lightning" to open Lightning Experience, or specify "--path
590
+ /apex/YourPage" to open a Visualforce page.
591
+
592
+ Use the --source-file to open a Lightning Page from your local project in Lightning App Builder. Lightning page files
593
+ have the suffix .flexipage-meta.xml, and are stored in the "flexipages" directory.
594
+
595
+ To generate a URL but not launch it in your browser, specify --url-only.
596
+
597
+ To open in a specific browser, use the --browser flag. Supported browsers are "chrome", "edge", and "firefox". If you
598
+ don't specify --browser, the org opens in your default browser.
599
+
600
+ ALIASES
601
+ $ sf force:org:open
602
+ $ sf force:source:open
603
+
604
+ EXAMPLES
605
+ Open your default org in your default browser:
606
+
607
+ $ sf force:org:open
608
+
609
+ Open the org with alias MyTestOrg1 in the Firefox browser:
610
+
611
+ $ sf force:org:open --target-org MyTestOrg1 --browser firefox
612
+
613
+ Display the navigation URL for the Lightning Experience page for your default org, but don't open the page in a
614
+ browser:
615
+
616
+ $ sf force:org:open --url-only --path lightning
617
+
618
+ Open a local Lightning page in your default org's Lightning App Builder:
619
+
620
+ $ sf force:org:open --source-path force-app/main/default/flexipages/Hello.flexipage-meta.xml
621
+ ```
622
+
623
+ ## `sf force:source:open`
624
+
625
+ Open your default scratch org, or another specified org, in a browser.
626
+
627
+ ```
628
+ USAGE
629
+ $ sf force:source:open -o <value> [--json] [--api-version <value>] [-b chrome|edge|firefox | -r] [-p <value> | -f
630
+ <value>]
631
+
632
+ FLAGS
633
+ -b, --browser=<option> Browser where the org opens.
634
+ <options: chrome|edge|firefox>
635
+ -f, --source-file=<value> Path to an ApexPage or FlexiPage to open in Lightning App Builder.
636
+ -o, --target-org=<value> (required) Username or alias of the target org.
637
+ -p, --path=<value> Navigation URL path to open a specific page.
638
+ -r, --url-only Display navigation URL, but don’t launch browser.
639
+ --api-version=<value> Override the api version used for api requests made by this command
640
+
641
+ GLOBAL FLAGS
642
+ --json Format output as json.
643
+
644
+ DESCRIPTION
645
+ Open your default scratch org, or another specified org, in a browser.
646
+
647
+ To open a specific page, specify the portion of the URL after "https://MyDomainName.my.salesforce.com/" as the value
648
+ for the --path flag. For example, specify "--path lightning" to open Lightning Experience, or specify "--path
649
+ /apex/YourPage" to open a Visualforce page.
650
+
651
+ Use the --source-file to open a Lightning Page from your local project in Lightning App Builder. Lightning page files
652
+ have the suffix .flexipage-meta.xml, and are stored in the "flexipages" directory.
653
+
654
+ To generate a URL but not launch it in your browser, specify --url-only.
655
+
656
+ To open in a specific browser, use the --browser flag. Supported browsers are "chrome", "edge", and "firefox". If you
657
+ don't specify --browser, the org opens in your default browser.
658
+
659
+ ALIASES
660
+ $ sf force:org:open
661
+ $ sf force:source:open
662
+
663
+ EXAMPLES
664
+ Open your default org in your default browser:
665
+
666
+ $ sf force:source:open
667
+
668
+ Open the org with alias MyTestOrg1 in the Firefox browser:
669
+
670
+ $ sf force:source:open --target-org MyTestOrg1 --browser firefox
671
+
672
+ Display the navigation URL for the Lightning Experience page for your default org, but don't open the page in a
673
+ browser:
674
+
675
+ $ sf force:source:open --url-only --path lightning
676
+
677
+ Open a local Lightning page in your default org's Lightning App Builder:
678
+
679
+ $ sf force:source:open --source-path force-app/main/default/flexipages/Hello.flexipage-meta.xml
680
+ ```
681
+
682
+ ## `sf org:create:sandbox`
683
+
684
+ Create a sandbox org.
685
+
686
+ ```
687
+ USAGE
688
+ $ sf org:create:sandbox -o <value> [--json] [-f <value> | -n <value> | -l Developer|Developer_Pro|Partial|Full] [-s]
689
+ [-a <value>] [-w <value> | --async] [-i <value> | ] [-c <value> | ] [--no-prompt] [--no-track-source]
690
+
691
+ FLAGS
692
+ -a, --alias=<value> Alias for the sandbox org.
693
+ -c, --clone=<value> Name of the sandbox org to clone.
694
+ -f, --definition-file=<value> Path to a sandbox definition file.
695
+ -i, --poll-interval=<seconds> [default: 30 seconds] Number of seconds to wait between retries.
696
+ -l, --license-type=<option> Type of sandbox license.
697
+ <options: Developer|Developer_Pro|Partial|Full>
698
+ -n, --name=<value> Name of the sandbox org.
699
+ -o, --target-org=<value> (required) Username or alias of the production org that contains the sandbox license.
700
+ -s, --set-default Set the sandbox org as your default org.
701
+ -w, --wait=<minutes> [default: 30 minutes] Number of minutes to wait for the sandbox org to be ready.
702
+ --async Request the sandbox creation, but don't wait for it to complete.
703
+ --no-prompt Don't prompt for confirmation about the sandbox configuration.
704
+ --no-track-source Do not use source tracking for this sandbox.
705
+
706
+ GLOBAL FLAGS
707
+ --json Format output as json.
708
+
709
+ DESCRIPTION
710
+ Create a sandbox org.
711
+
712
+ There are two ways to create a sandbox org: specify a definition file that contains the sandbox options or use the
713
+ --name and --license-type flags to specify the two required options. If you want to set an option other than name or
714
+ license type, such as apexClassId, you must use a definition file.
715
+
716
+ ALIASES
717
+ $ sf env:create:sandbox
718
+
719
+ EXAMPLES
720
+ Create a sandbox org using a definition file and give it the alias "MyDevSandbox". The production org that contains
721
+ the sandbox license has the alias "prodOrg".
722
+
723
+ $ sf org:create:sandbox -f config/dev-sandbox-def.json --alias MyDevSandbox --target-org prodOrg
724
+
725
+ Create a sandbox org by directly specifying its name and type of license (Developer) instead of using a definition
726
+ file. Set the sandbox org as your default.
727
+
728
+ $ sf org:create:sandbox --name mysandbox --license-type Developer --alias MyDevSandbox --target-org prodOrg \
729
+ --set-default
730
+
731
+ FLAG DESCRIPTIONS
732
+ -a, --alias=<value> Alias for the sandbox org.
733
+
734
+ When you create a sandbox, the generated usernames are based on the usernames present in the production org. To
735
+ ensure uniqueness, the new usernames are appended with the name of the sandbox. For example, the username
736
+ "user@example.com" in the production org results in the username "user@example.com.mysandbox" in a sandbox named
737
+ "mysandbox". When you set an alias for a sandbox org, it's assigned to the resulting username of the user running
738
+ this command.
739
+
740
+ -c, --clone=<value> Name of the sandbox org to clone.
741
+
742
+ The value of clone must be an existing sandbox in the same target-org.
743
+
744
+ -f, --definition-file=<value> Path to a sandbox definition file.
745
+
746
+ The sandbox definition file is a blueprint for the sandbox. You can create different definition files for each
747
+ sandbox type that you use in the development process. See
748
+ <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm> for all
749
+ the options you can specify in the defintion file.
750
+
751
+ -n, --name=<value> Name of the sandbox org.
752
+
753
+ The name must be a unique alphanumeric string (10 or fewer characters) to identify the sandbox. You can’t reuse a
754
+ name while a sandbox is in the process of being deleted.
755
+
756
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
757
+
758
+ When it creates the sandbox org, Salesforce copies the metadata, and optionally data, from your production org to
759
+ the new sandbox org.
760
+
761
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
762
+
763
+ If the command continues to run after the wait period, the CLI returns control of the terminal to you and displays
764
+ the "sf org resume sandbox" command you run to check the status of the create. The displayed command includes the
765
+ job ID for the running sandbox creation.
766
+
767
+ --async Request the sandbox creation, but don't wait for it to complete.
768
+
769
+ The command immediately displays the job ID and returns control of the terminal to you. This way, you can continue
770
+ to use the CLI. To check the status of the sandbox creation, run "sf org resume sandbox".
771
+
772
+ --no-track-source Do not use source tracking for this sandbox.
773
+
774
+ We recommend you enable source tracking in Developer and Developer Pro sandbox, which is why it's the default
775
+ behavior. Source tracking allows you to track the changes you make to your metadata, both in your local project and
776
+ in the sandbox, and to detect any conflicts between the two.
777
+
778
+ To disable source tracking in the new sandbox, specify the --no-track-source flag. The main reason to disable source
779
+ tracking is for performance. For example, while you probably want to deploy metadata and run Apex tests in your
780
+ CI/CD jobs, you probably don't want to incur the costs of source tracking (checking for conflicts, polling the
781
+ SourceMember object, various file system operations.) This is a good use case for disabling source tracking in the
782
+ sandbox.
783
+ ```
784
+
785
+ _See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/create/sandbox.ts)_
786
+
787
+ ## `sf org:delete:sandbox`
788
+
789
+ Delete a sandbox.
790
+
791
+ ```
792
+ USAGE
793
+ $ sf org:delete:sandbox -o <value> [--json] [-p]
794
+
795
+ FLAGS
796
+ -o, --target-org=<value> (required) Sandbox alias or login user.
797
+ -p, --no-prompt Don't prompt the user to confirm the deletion.
798
+
799
+ GLOBAL FLAGS
800
+ --json Format output as json.
801
+
802
+ DESCRIPTION
803
+ Delete a sandbox.
804
+
805
+ Salesforce CLI marks the org for deletion in the production org that contains the sandbox licenses and then deletes
806
+ all local references to the org from your computer.
807
+ Specify a sandbox with either the username you used when you logged into it, or the alias you gave the sandbox when
808
+ you created it. Run "sf org list" to view all your orgs, including sandboxes, and their aliases.
809
+
810
+ ALIASES
811
+ $ sf env:delete:sandbox
812
+
813
+ EXAMPLES
814
+ Delete a sandbox with alias my-sandbox:
815
+
816
+ $ sf org:delete:sandbox --target-org my-sandbox
817
+
818
+ Specify a username instead of an alias:
819
+
820
+ $ sf org:delete:sandbox --target-org myusername@example.com.qa
821
+
822
+ Delete the sandbox without prompting to confirm :
823
+
824
+ $ sf org:delete:sandbox --target-org my-sandbox --no-prompt
825
+ ```
826
+
827
+ _See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/delete/sandbox.ts)_
828
+
829
+ ## `sf org:delete:scratch`
830
+
831
+ Delete a scratch org.
832
+
833
+ ```
834
+ USAGE
835
+ $ sf org:delete:scratch -o <value> [--json] [-p]
836
+
837
+ FLAGS
838
+ -o, --target-org=<value> (required) Scratch org alias or login user.
839
+ -p, --no-prompt Don't prompt the user to confirm the deletion.
840
+
841
+ GLOBAL FLAGS
842
+ --json Format output as json.
843
+
844
+ DESCRIPTION
845
+ Delete a scratch org.
846
+
847
+ Salesforce CLI marks the org for deletion in the Dev Hub org and then deletes all local references to the org from
848
+ your computer.
849
+ Specify a scratch org with either the username or the alias you gave the scratch org when you created it. Run "sf org
850
+ list" to view all your orgs, including scratch orgs, and their aliases.
851
+
852
+ ALIASES
853
+ $ sf env:delete:scratch
854
+
855
+ EXAMPLES
856
+ Delete a scratch org with alias my-scratch-org:
857
+
858
+ $ sf org:delete:scratch --target-org my-scratch-org
859
+
860
+ Specify a username instead of an alias:
861
+
862
+ $ sf org:delete:scratch --target-org test-123456-abcdefg@example.com
863
+
864
+ Delete the scratch org without prompting to confirm :
865
+
866
+ $ sf org:delete:scratch --target-org my-scratch-org --no-prompt
867
+ ```
868
+
869
+ _See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/delete/scratch.ts)_
870
+
871
+ ## `sf org:display`
872
+
873
+ Display information about an org.
874
+
875
+ ```
876
+ USAGE
877
+ $ sf org:display -o <value> [--json] [--api-version <value>] [--verbose]
878
+
879
+ FLAGS
880
+ -o, --target-org=<value> (required) Username or alias of the target org.
881
+ --api-version=<value> Override the api version used for api requests made by this command
882
+ --verbose Display the sfdxAuthUrl property.
883
+
884
+ GLOBAL FLAGS
885
+ --json Format output as json.
886
+
887
+ DESCRIPTION
888
+ Display information about an org.
316
889
 
317
890
  Output includes your access token, client Id, connected status, org ID, instance URL, username, and alias, if
318
891
  applicable.
@@ -320,152 +893,308 @@ DESCRIPTION
320
893
  Use --verbose to include the SFDX auth URL. WARNING: The SFDX auth URL contains sensitive information, such as a
321
894
  refresh token that can be used to access an org. Don't share or distribute this URL or token.
322
895
 
323
- Including --verbose displays the sfdxAuthUrl property only if you authenticated to the org using auth:web:login (not
324
- auth:jwt:grant)
896
+ Including --verbose displays the sfdxAuthUrl property only if you authenticated to the org using "org login web" (not
897
+ "org login jwt").
898
+
899
+ ALIASES
900
+ $ sf force:org:display
325
901
 
326
902
  EXAMPLES
327
- $ sfdx force:org:display
903
+ Display information about your default org:
328
904
 
329
- $ sfdx force:org:display -u me@my.org
905
+ $ sf org:display
330
906
 
331
- $ sfdx force:org:display -u TestOrg1 --json
907
+ Display information, including the sfdxAuthUrl property, about the org with alias TestOrg1:
332
908
 
333
- $ sfdx force:org:display -u TestOrg1 --json > tmp/MyOrgDesc.json
909
+ $ sf org:display --target-org TestOrg1 --verbose
334
910
  ```
335
911
 
336
- _See code: [src/commands/force/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/v2.1.7/src/commands/force/org/display.ts)_
912
+ _See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/display.ts)_
337
913
 
338
- ## `sfdx force:org:list [--all] [-p --clean] [--skipconnectionstatus] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
914
+ ## `sf org:list:metadata`
339
915
 
340
- list all orgs you’ve created or authenticated to
916
+ List the metadata components and properties of a specified type.
341
917
 
342
918
  ```
343
919
  USAGE
344
- $ sfdx force:org:list [--all] [-p --clean] [--skipconnectionstatus] [--verbose] [--json] [--loglevel
345
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
920
+ $ sf org:list:metadata -o <value> -m <value> [--json] [--api-version <value>] [-f <value>] [--folder <value>]
346
921
 
347
922
  FLAGS
348
- -p, --noprompt do not prompt for confirmation
349
- --all include expired, deleted, and
350
- unknown-status scratch orgs
351
- --clean remove all local org authorizations
352
- for non-active scratch orgs. Use
353
- auth:logout to remove non-scratch
354
- orgs
355
- --json format output as json
356
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
357
- this command invocation
358
- --skipconnectionstatus skip retrieving the connection
359
- status of non-scratch orgs
360
- --verbose list more information about each org
923
+ -f, --output-file=<value> Pathname of the file in which to write the results.
924
+ -m, --metadata-type=<value> (required) Metadata type to be retrieved, such as CustomObject; metadata type names are
925
+ case-sensitive.
926
+ -o, --target-org=<value> (required) Username or alias of the target org.
927
+ --api-version=<value> API version to use; default is the most recent API version.
928
+ --folder=<value> Folder associated with the component; required for components that use folders; folder
929
+ names are case-sensitive.
930
+
931
+ GLOBAL FLAGS
932
+ --json Format output as json.
361
933
 
362
934
  DESCRIPTION
363
- list all orgs you’ve created or authenticated to
935
+ List the metadata components and properties of a specified type.
936
+
937
+ Use this command to identify individual components in your manifest file or if you want a high-level view of
938
+ particular metadata types in your org. For example, you can use this command to return a list of names of all the
939
+ CustomObject or Layout components in your org, then use this information in a retrieve command that returns a subset
940
+ of these components.
941
+
942
+ The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API
943
+ Functions permission.
944
+
945
+ ALIASES
946
+ $ sf force:mdapi:listmetadata
364
947
 
365
948
  EXAMPLES
366
- $ sfdx force:org:list
949
+ List the CustomObject components, and their properties, in the org with alias "my-dev-org":
950
+
951
+ $ sf org:list:metadata --metadata-type CustomObject --target-org my-dev-org
952
+
953
+ List the CustomObject components in your default org, write the output to the specified file, and use API version
954
+ 57.0:
955
+
956
+ $ sf org:list:metadata --metadata-type CustomObject --api-version 57.0 --output-file /path/to/outputfilename.txt
957
+
958
+ List the Dashboard components in your default org that are contained in the "folderSales" folder, write the output
959
+ to the specified file, and use API version 57.0:
960
+
961
+ $ sf org:list:metadata --metadata-type Dashboard --folder folderSales --api-version 57.0 --output-file \
962
+ /path/to/outputfilename.txt
367
963
 
368
- $ sfdx force:org:list --verbose --json
964
+ FLAG DESCRIPTIONS
965
+ --api-version=<value> API version to use; default is the most recent API version.
369
966
 
370
- $ sfdx force:org:list --verbose --json > tmp/MyOrgList.json
967
+ Override the api version used for api requests made by this command
968
+
969
+ --folder=<value>
970
+
971
+ Folder associated with the component; required for components that use folders; folder names are case-sensitive.
972
+
973
+ Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
371
974
  ```
372
975
 
373
- _See code: [src/commands/force/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/v2.1.7/src/commands/force/org/list.ts)_
976
+ _See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/list/metadata.ts)_
374
977
 
375
- ## `sfdx force:org:open [-b <string> | -r] [-p <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
978
+ ## `sf org:list:metadata-types`
376
979
 
377
- open your default scratch org, or another specified org
980
+ Display details about the metadata types that are enabled for your org.
378
981
 
379
982
  ```
380
983
  USAGE
381
- $ sfdx force:org:open [-b <string> | -r] [-p <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
382
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
984
+ $ sf org:list:metadata-types -o <value> [--json] [--api-version <value>] [-f <value>]
383
985
 
384
986
  FLAGS
385
- -b, --browser=<option> browser where the org opens
386
- <options: chrome|edge|firefox>
387
- -p, --path=<value> navigation URL path
388
- -r, --urlonly display navigation URL, but don’t
389
- launch browser
390
- -u, --targetusername=<value> username or alias for the target
391
- org; overrides default target org
392
- --apiversion=<value> override the api version used for
393
- api requests made by this command
394
- --json format output as json
395
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
396
- this command invocation
987
+ -f, --output-file=<value> Pathname of the file in which to write the results.
988
+ -o, --target-org=<value> (required) Username or alias of the target org.
989
+ --api-version=<value> API version to use; default is the most recent API version.
990
+
991
+ GLOBAL FLAGS
992
+ --json Format output as json.
397
993
 
398
994
  DESCRIPTION
399
- open your default scratch org, or another specified org
995
+ Display details about the metadata types that are enabled for your org.
996
+
997
+ The information includes Apex classes and triggers, custom objects, custom fields on standard objects, tab sets that
998
+ define an app, and many other metadata types. Use this information to identify the syntax needed for a <name> element
999
+ in a manifest file (package.xml).
400
1000
 
401
- To open a specific page, specify the portion of the URL after "https://MyDomainName.my.salesforce.com/" as --path.
1001
+ The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API
1002
+ Functions permission.
402
1003
 
403
- For example, specify "--path lightning" to open Lightning Experience, or specify "--path /apex/YourPage" to open a
404
- Visualforce page.
1004
+ ALIASES
1005
+ $ sf force:mdapi:describemetadata
1006
+
1007
+ EXAMPLES
1008
+ Display information about all known and enabled metadata types in the org with alias "my-dev-org" using API version
1009
+ 57.0:
1010
+
1011
+ $ sf org:list:metadata-types --api-version 57.0 --target-org my-dev-org
1012
+
1013
+ Display only the metadata types that aren't yet supported by Salesforce CLI in your default org and write the
1014
+ results to the specified file:
1015
+
1016
+ $ sf org:list:metadata-types --output-file /path/to/outputfilename.txt --filter-known
1017
+
1018
+ FLAG DESCRIPTIONS
1019
+ -f, --output-file=<value> Pathname of the file in which to write the results.
1020
+
1021
+ Directing the output to a file makes it easier to extract relevant information for your package.xml manifest file.
1022
+ The default output destination is the terminal or command window console.
1023
+
1024
+ --api-version=<value> API version to use; default is the most recent API version.
1025
+
1026
+ Override the api version used for api requests made by this command
1027
+ ```
1028
+
1029
+ _See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/list/metadata-types.ts)_
1030
+
1031
+ ## `sf org:open`
1032
+
1033
+ Open your default scratch org, or another specified org, in a browser.
1034
+
1035
+ ```
1036
+ USAGE
1037
+ $ sf org:open -o <value> [--json] [--api-version <value>] [-b chrome|edge|firefox | -r] [-p <value> | -f
1038
+ <value>]
1039
+
1040
+ FLAGS
1041
+ -b, --browser=<option> Browser where the org opens.
1042
+ <options: chrome|edge|firefox>
1043
+ -f, --source-file=<value> Path to an ApexPage or FlexiPage to open in Lightning App Builder.
1044
+ -o, --target-org=<value> (required) Username or alias of the target org.
1045
+ -p, --path=<value> Navigation URL path to open a specific page.
1046
+ -r, --url-only Display navigation URL, but don’t launch browser.
1047
+ --api-version=<value> Override the api version used for api requests made by this command
1048
+
1049
+ GLOBAL FLAGS
1050
+ --json Format output as json.
1051
+
1052
+ DESCRIPTION
1053
+ Open your default scratch org, or another specified org, in a browser.
405
1054
 
406
- To generate a URL but not launch it in your browser, specify --urlonly.
1055
+ To open a specific page, specify the portion of the URL after "https://MyDomainName.my.salesforce.com/" as the value
1056
+ for the --path flag. For example, specify "--path lightning" to open Lightning Experience, or specify "--path
1057
+ /apex/YourPage" to open a Visualforce page.
407
1058
 
408
- To open in a specific browser, use the --browser parameter. Supported browsers are "chrome", "edge", and "firefox". If
409
- you don't specify --browser, the org opens in your default browser.
1059
+ Use the --source-file to open a Lightning Page from your local project in Lightning App Builder. Lightning page files
1060
+ have the suffix .flexipage-meta.xml, and are stored in the "flexipages" directory.
1061
+
1062
+ To generate a URL but not launch it in your browser, specify --url-only.
1063
+
1064
+ To open in a specific browser, use the --browser flag. Supported browsers are "chrome", "edge", and "firefox". If you
1065
+ don't specify --browser, the org opens in your default browser.
1066
+
1067
+ ALIASES
1068
+ $ sf force:org:open
1069
+ $ sf force:source:open
410
1070
 
411
1071
  EXAMPLES
412
- $ sfdx force:org:open
1072
+ Open your default org in your default browser:
1073
+
1074
+ $ sf org:open
1075
+
1076
+ Open the org with alias MyTestOrg1 in the Firefox browser:
413
1077
 
414
- $ sfdx force:org:open -u me@my.org
1078
+ $ sf org:open --target-org MyTestOrg1 --browser firefox
415
1079
 
416
- $ sfdx force:org:open -u MyTestOrg1
1080
+ Display the navigation URL for the Lightning Experience page for your default org, but don't open the page in a
1081
+ browser:
417
1082
 
418
- $ sfdx force:org:open -r -p lightning
1083
+ $ sf org:open --url-only --path lightning
419
1084
 
420
- $ sfdx force:org:open -u me@my.org -b firefox
1085
+ Open a local Lightning page in your default org's Lightning App Builder:
1086
+
1087
+ $ sf org:open --source-path force-app/main/default/flexipages/Hello.flexipage-meta.xml
421
1088
  ```
422
1089
 
423
- _See code: [src/commands/force/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/v2.1.7/src/commands/force/org/open.ts)_
1090
+ _See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/open.ts)_
424
1091
 
425
- ## `sfdx force:org:status -n <string> [-s] [-a <string>] [-w <minutes>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
1092
+ ## `sf org:resume:sandbox`
426
1093
 
427
- report status of sandbox creation or clone and authenticate to it
1094
+ Check the status of a sandbox creation, and log in to it if it's ready.
428
1095
 
429
1096
  ```
430
1097
  USAGE
431
- $ sfdx force:org:status -n <string> [-s] [-a <string>] [-w <minutes>] [-u <string>] [--apiversion <string>] [--json]
432
- [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
1098
+ $ sf org:resume:sandbox [--json] [-w <value>] [-n <value> | -i <value>] [-l] [-o <value>]
433
1099
 
434
1100
  FLAGS
435
- -a, --setalias=<value> alias for the created or cloned org
436
- -n, --sandboxname=<value> (required) name of the sandbox org
437
- to check status for
438
- -s, --setdefaultusername set the created or cloned org as
439
- your default
440
- -u, --targetusername=<value> username or alias for the target
441
- org; overrides default target org
442
- -w, --wait=<value> [default: 6 minutes] number of
443
- minutes to wait while polling for
444
- status
445
- --apiversion=<value> override the api version used for
446
- api requests made by this command
447
- --json format output as json
448
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
449
- this command invocation
1101
+ -i, --job-id=<value> Job ID of the incomplete sandbox creation that you want to check the status of.
1102
+ -l, --use-most-recent Use the most recent sandbox create request.
1103
+ -n, --name=<value> Name of the sandbox org.
1104
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
1105
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
1106
+
1107
+ GLOBAL FLAGS
1108
+ --json Format output as json.
450
1109
 
451
1110
  DESCRIPTION
452
- report status of sandbox creation or clone and authenticate to it
1111
+ Check the status of a sandbox creation, and log in to it if it's ready.
453
1112
 
454
- Use this command to check the status of your sandbox creation or clone and, if the sandbox is ready, authenticate to
455
- it.
1113
+ Sandbox creation can take a long time. If the original "sf org create sandbox" command either times out, or you
1114
+ specified the --async flag, the command displays a job ID. Use this job ID to check whether the sandbox creation is
1115
+ complete, and if it is, the command then logs into it.
456
1116
 
457
- Use the --wait (-w) parameter to specify the number of minutes that the command waits for the sandbox creation or
458
- clone to complete before returning control of the terminal to you.
1117
+ 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
1118
+ recent sandbox creation.
459
1119
 
460
- Set the --targetusername (-u) parameter to the username or alias of the production org that contains the sandbox
461
- license.
1120
+ ALIASES
1121
+ $ sf env:resume:sandbox
462
1122
 
463
1123
  EXAMPLES
464
- $ sfdx force:org:status --sandboxname DevSbx1 --setalias MySandbox -u prodOrg
1124
+ Check the status of a sandbox creation using its name and specify a production org with alias "prodOrg":
1125
+
1126
+ $ sf org:resume:sandbox --name mysandbox --target-org prodOrg
1127
+
1128
+ Check the status using the job ID:
1129
+
1130
+ $ sf org:resume:sandbox --job-id 0GRxxxxxxxx
1131
+
1132
+ Check the status of the most recent sandbox create request:
1133
+
1134
+ $ sf org:resume:sandbox --use-most-recent
1135
+
1136
+ FLAG DESCRIPTIONS
1137
+ -i, --job-id=<value> Job ID of the incomplete sandbox creation that you want to check the status of.
1138
+
1139
+ The job ID is valid for 24 hours after you start the sandbox creation.
1140
+
1141
+ -o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
1142
+
1143
+ When it creates the sandbox org, Salesforce copies the metadata, and optionally data, from your production org to
1144
+ the new sandbox org.
1145
+
1146
+ -w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
1147
+
1148
+ If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
1149
+ returns the job ID. To resume checking the sandbox creation, rerun this command.
1150
+ ```
1151
+
1152
+ _See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/resume/sandbox.ts)_
1153
+
1154
+ ## `sf org:resume:scratch`
1155
+
1156
+ Resume the creation of an incomplete scratch org.
1157
+
1158
+ ```
1159
+ USAGE
1160
+ $ sf org:resume:scratch [--json] [-i <value>] [-r]
1161
+
1162
+ FLAGS
1163
+ -i, --job-id=<value> Job ID of the incomplete scratch org create that you want to resume.
1164
+ -r, --use-most-recent Use the job ID of the most recent incomplete scratch org.
1165
+
1166
+ GLOBAL FLAGS
1167
+ --json Format output as json.
1168
+
1169
+ DESCRIPTION
1170
+ Resume the creation of an incomplete scratch org.
1171
+
1172
+ When the original "sf org create scratch" command either times out or is run with the --async flag, it displays a job
1173
+ ID.
1174
+
1175
+ Run this command by either passing it a job ID or using the --use-most-recent flag to specify the most recent
1176
+ incomplete scratch org.
1177
+
1178
+ ALIASES
1179
+ $ sf env:resume:scratch
1180
+
1181
+ EXAMPLES
1182
+ Resume a scratch org create with a job ID:
1183
+
1184
+ $ sf org:resume:scratch --job-id 2SR3u0000008fBDGAY
1185
+
1186
+ Resume your most recent incomplete scratch org:
1187
+
1188
+ $ sf org:resume:scratch --use-most-recent
1189
+
1190
+ FLAG DESCRIPTIONS
1191
+ -i, --job-id=<value> Job ID of the incomplete scratch org create that you want to resume.
1192
+
1193
+ The job ID is the same as the record ID of the incomplete scratch org in the ScratchOrgInfo object of the Dev Hub.
465
1194
 
466
- $ sfdx force:org:status --sandboxname DevSbx1 --wait 45 --setdefaultusername -u prodOrg
1195
+ The job ID is valid for 24 hours after you start the scratch org creation.
467
1196
  ```
468
1197
 
469
- _See code: [src/commands/force/org/status.ts](https://github.com/salesforcecli/plugin-org/blob/v2.1.7/src/commands/force/org/status.ts)_
1198
+ _See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/v2.9.28/src/commands/org/resume/scratch.ts)_
470
1199
 
471
1200
  <!-- commandsstop -->