org Commands (Deprecated)
force:org:clone (Deprecated)
Help for force:org:clone
There are two ways to clone a sandbox: either specify a sandbox definition file or provide key=value pairs at the command line. Key-value pairs at the command-line override their equivalent sandbox definition file values. In either case, you must specify both the "SandboxName" and "SourceSandboxName" options to set the names of the new sandbox and the one being cloned, respectively.
Set the --targetusername (-u) parameter to a production org with sandbox licenses. The --type (-t) parameter is required and must be set to "sandbox".
Examples for force:org:clone
Command Syntax
- sfdx force:org:clone
- [--json]
- [--loglevel LOGLEVEL]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- -t TYPE
- [-f DEFINITIONFILE]
- [-s]
- [-a SETALIAS]
- [-w WAIT]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -t | --type TYPE
- Required
-
Type of org to create.
- Type: enum
- Permissible values are: sandbox
- -f | --definitionfile DEFINITIONFILE
- Optional
-
Path to the sandbox definition file.
- Type: filepath
- -s | --setdefaultusername
- Optional
-
Set the cloned org as your default.
- Type: boolean
- -a | --setalias SETALIAS
- Optional
-
Alias for the cloned org.
- Type: string
- -w | --wait WAIT
- Optional
-
Sets the streaming client socket timeout, in minutes. If the streaming client socket has no contact from the server for a number of minutes, the client exits. Specify a longer wait time if timeouts occur frequently.
- Type: minutes
- Default value: 6 minutes
force:org:create (Deprecated)
Help for force:org:create
Creates a scratch org or a sandbox org using the values specified in a configuration file or key=value pairs that you specify on the command line. Values specified on the command line override values in the configuration file. Specify a configuration file or provide key=value pairs while creating a scratch org or a sandbox. When creating scratch orgs, —targetdevhubusername (-v) must be a Dev Hub org. When creating sandboxes, the --targetusername (-u) must be a production org with sandbox licenses. The —type (-t) is required if creating a sandbox.
Examples for force:org:create
Command Syntax
- sfdx force:org:create
- [--json]
- [--loglevel LOGLEVEL]
- [-v TARGETDEVHUBUSERNAME]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- [-t TYPE]
- [-f DEFINITIONFILE]
- [-n]
- [-c]
- [-i CLIENTID]
- [-s]
- [-a SETALIAS]
- [-w WAIT]
- [-d DURATIONDAYS]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -v | --targetdevhubusername TARGETDEVHUBUSERNAME
- Optional
-
A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.
- Type: string
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -t | --type TYPE
- Optional
-
Type of org to create.
- Type: enum
- Permissible values are: scratch, sandbox
- Default value: scratch
- -f | --definitionfile DEFINITIONFILE
- Optional
-
Path to an org definition file.
- Type: filepath
- -n | --nonamespace
- Optional
-
Create the scratch org with no namespace.
- Type: boolean
- -c | --noancestors
- Optional
-
Do not include second-generation package ancestors in the scratch org.
- Type: boolean
- -i | --clientid CLIENTID
- Optional
-
Connected app consumer key; not supported for sandbox org creation.
- Type: string
- -s | --setdefaultusername
- Optional
-
Set the created org as the default username.
- Type: boolean
- -a | --setalias SETALIAS
- Optional
-
Alias for the created org.
- Type: string
- -w | --wait WAIT
- Optional
-
The streaming client socket timeout (in minutes).
- Type: minutes
- Default value: 6 minutes
- -d | --durationdays DURATIONDAYS
- Optional
-
Duration of the scratch org (in days) (default:7, min:1, max:30).
- Type: integer
- Default value: 7
Aliases for force:org:create
force:org:delete (Deprecated)
Help for force:org:delete
To mark the org for deletion without being prompted to confirm, specify --noprompt.
Examples for force:org:delete
Command Syntax
- sfdx force:org:delete
- [--json]
- [--loglevel LOGLEVEL]
- [-v TARGETDEVHUBUSERNAME]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- [-p]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -v | --targetdevhubusername TARGETDEVHUBUSERNAME
- Optional
-
A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.
- Type: string
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -p | --noprompt
- Optional
-
No prompt to confirm deletion.
- Type: boolean
force:org:display (Deprecated)
Help for force:org:display
Output includes your access token, client Id, connected status, org ID, instance URL, username, and alias, if applicable.
Use --verbose to include the SFDX auth URL. WARNING: The SFDX auth URL contains sensitive information, such as a refresh token that can be used to access an org. Don't share or distribute this URL or token.
Including --verbose displays the sfdxAuthUrl property only if you authenticated to the org using auth:web:login (not auth:jwt:grant)
Examples for force:org:display
Command Syntax
- sfdx force:org:display
- [--json]
- [--loglevel LOGLEVEL]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- [--verbose]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- --verbose
- Optional
-
Emit additional command output to stdout.
- Type: boolean
force:org:list (Deprecated)
Examples for force:org:list
Command Syntax
- sfdx force:org:list
- [--json]
- [--loglevel LOGLEVEL]
- [--verbose]
- [--all]
- [--clean]
- [-p]
- [--skipconnectionstatus]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- --verbose
- Optional
-
Emit additional command output to stdout.
- Type: boolean
- --all
- Optional
-
Include expired, deleted, and unknown-status scratch orgs.
- Type: boolean
- --clean
- Optional
-
Remove all local org authorizations for non-active scratch orgs. Use auth:logout to remove non-scratch orgs.
- Type: boolean
- -p | --noprompt
- Optional
-
Do not prompt for confirmation.
- Type: boolean
- --skipconnectionstatus
- Optional
-
Skip retrieving the connection status of non-scratch orgs.
- Type: boolean
force:org:open (Deprecated)
Help for force:org:open
To open a specific page, specify the portion of the URL after "https://MyDomainName.my.salesforce.com/" as --path.
For example, specify "--path lightning" to open Lightning Experience, or specify "--path /apex/YourPage" to open a Visualforce page.
To generate a URL but not launch it in your browser, specify --urlonly.
To open in a specific browser, use the --browser parameter. Supported browsers are "chrome", "edge", and "firefox". If you don't specify --browser, the org opens in your default browser.
Examples for force:org:open
Command Syntax
- sfdx force:org:open
- [--json]
- [--loglevel LOGLEVEL]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- [-b BROWSER]
- [-p PATH]
- [-r]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -b | --browser BROWSER
- Optional
-
Browser where the org opens.
- Type: string
- Permissible values are: chrome, edge, firefox
- -p | --path PATH
- Optional
-
Navigation URL path.
- Type: string
- -r | --urlonly
- Optional
-
Display navigation URL, but don’t launch browser.
- Type: boolean
force:org:shape:create (Deprecated)
Examples for force:org:shape:create
Command Syntax
- sfdx force:org:shape:create
- [--json]
- [--loglevel LOGLEVEL]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
force:org:shape:delete (Deprecated)
Examples for force:org:shape:delete
Command Syntax
- sfdx force:org:shape:delete
- [--json]
- [--loglevel LOGLEVEL]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- [-p]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -p | --noprompt
- Optional
-
Do not prompt for confirmation.
- Type: boolean
force:org:shape:list (Deprecated)
Examples for force:org:shape:list
Command Syntax
- sfdx force:org:shape:list
- [--json]
- [--loglevel LOGLEVEL]
- [--verbose]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- --verbose
- Optional
-
Emit additional command output to stdout.
- Type: boolean
force:org:snapshot:create (Pilot) (Deprecated)
Help for force:org:snapshot:create
A snapshot is a point-in-time copy of a scratch org. The copy is stored in Salesforce and referenced by its unique name in a scratch org definition file.
Use "sfdx force:org:snapshot:get" to get details, including status, about a snapshot creation request.
To create a scratch org from a snapshot, include the "snapshot" entry (instead of "edition") in the scratch org definition file and set it to the name of the snapshot. Then use "sfdx force:org:create" to create the scratch org.
Examples for force:org:snapshot:create
Create a snapshot called "Dependencies" using the source scratch org ID:
Create a snapshot called "NightlyBranch" using the source scratch org username:
Command Syntax
- sfdx force:org:snapshot:create
- [--json]
- [--loglevel LOGLEVEL]
- [-v TARGETDEVHUBUSERNAME]
- [--apiversion APIVERSION]
- -o SOURCEORG
- -n SNAPSHOTNAME
- [-d DESCRIPTION]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -v | --targetdevhubusername TARGETDEVHUBUSERNAME
- Optional
-
A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -o | --sourceorg SOURCEORG
- Required
-
The org ID, or a locally authenticated username or alias, of the scratch org to snapshot.
- Type: string
- -n | --snapshotname SNAPSHOTNAME
- Required
-
The unique name of the snapshot. Use this name to create scratch orgs from the snapshot.
- Type: string
- -d | --description DESCRIPTION
- Optional
-
A description of the snapshot. Use this description to document the contents of the snapshot.
We suggest that you include a reference point, such as a version control system tag or commit ID.'
- Type: string
force:org:snapshot:delete (Pilot) (Deprecated)
Help for force:org:snapshot:delete
Dev Hub admins can delete any snapshot, while users can delete only theirs unless a Dev Hub admin gives the user Modify All permissions.
Examples for force:org:snapshot:delete
Delete a snapshot from the default Dev Hub using the snapshot ID:
Delete a snapshot from the specified Dev Hub using the snapshot name:
Command Syntax
- sfdx force:org:snapshot:delete
- [--json]
- [--loglevel LOGLEVEL]
- [-v TARGETDEVHUBUSERNAME]
- [--apiversion APIVERSION]
- -s SNAPSHOT
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -v | --targetdevhubusername TARGETDEVHUBUSERNAME
- Optional
-
A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -s | --snapshot SNAPSHOT
- Required
-
The name or ID (starts with 0Oo) of the snapshot to delete.
- Type: string
force:org:snapshot:get (Pilot) (Deprecated)
Help for force:org:snapshot:get
Snapshot creation can take a while. Use this command with the snapshot name or ID to check its creation status. Once the status changes to Active, you can use the snapshot to create scratch orgs.
To create a snapshot, use the "sfdx force:org:snapshot:create" command. To retrieve a list of all snapshots, use "sfdx force:org:snapshot:list".
Examples for force:org:snapshot:get
Get snapshot details using its ID:
Get snapshot details using its name:
Command Syntax
- sfdx force:org:snapshot:get
- [--json]
- [--loglevel LOGLEVEL]
- [-v TARGETDEVHUBUSERNAME]
- [--apiversion APIVERSION]
- -s SNAPSHOT
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -v | --targetdevhubusername TARGETDEVHUBUSERNAME
- Optional
-
A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -s | --snapshot SNAPSHOT
- Required
-
The name or ID (starts with 0Oo) of the snapshot to retrieve.
- Type: string
force:org:snapshot:list (Pilot) (Deprecated)
Help for force:org:snapshot:list
You can view all the snapshots in a Dev Hub that you have access to. If you’re an admin, you can see all snapshots associated with the Dev Hub org. If you’re a user, you can see only your snapshots unless a Dev Hub admin gives you View All permissions.
To create a snapshot, use the "sfdx force:org:snapshot:create" command. To get details about a snapshot request, use "sfdx force:org:snapshot:get".
Examples for force:org:snapshot:list
List snapshots in the default Dev Hub:
List snapshots in the Dev Hub with the specified username:
Command Syntax
- sfdx force:org:snapshot:list
- [--json]
- [--loglevel LOGLEVEL]
- [-v TARGETDEVHUBUSERNAME]
- [--apiversion APIVERSION]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -v | --targetdevhubusername TARGETDEVHUBUSERNAME
- Optional
-
A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
force:org:status (Deprecated)
Help for force:org:status
Use this command to check the status of your sandbox creation or clone and, if the sandbox is ready, authenticate to it.
Use the --wait (-w) parameter to specify the number of minutes that the command waits for the sandbox creation or clone to complete before returning control of the terminal to you.
Set the --targetusername (-u) parameter to the username or alias of the production org that contains the sandbox license.
Examples for force:org:status
Command Syntax
- sfdx force:org:status
- [--json]
- [--loglevel LOGLEVEL]
- [-u TARGETUSERNAME]
- [--apiversion APIVERSION]
- -n SANDBOXNAME
- [-s]
- [-a SETALIAS]
- [-w WAIT]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -u | --targetusername TARGETUSERNAME
- Optional
-
A username or alias for the target org. Overrides the default target org.
- Type: string
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- -n | --sandboxname SANDBOXNAME
- Required
-
Name of the sandbox org to check status for.
- Type: string
- -s | --setdefaultusername
- Optional
-
Set the created or cloned org as your default.
- Type: boolean
- -a | --setalias SETALIAS
- Optional
-
Alias for the created or cloned org.
- Type: string
- -w | --wait WAIT
- Optional
-
Number of minutes to wait while polling for status.
- Type: minutes
- Default value: 6 minutes