Newer Version Available

This content describes an older version of this product. View Latest

source Commands

Use the source commands to push and pull source to and from your scratch orgs, to deploy and retrieve source to and from non-source-tracked orgs, to see synchronization changes between your project and scratch orgs, and to convert your source to the metadata format for Metadata API deployments.

source:convert

Converts source-formatted files into metadata that you can deploy using Metadata API.

Command Syntax

sfdx force:source:convert
[--json]
[--loglevel LOGLEVEL]
[-r ROOTDIR]
[-d OUTPUTDIR]
[-n PACKAGENAME]
[-x MANIFEST]
[-p SOURCEPATH]
[-m METADATA]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn
-r | --rootdir ROOTDIR
Optional

A directory other than the default package directory that contains the source-formatted files to convert.

Type: directory
-d | --outputdir OUTPUTDIR
Optional

The output directory to store the Metadata API–formatted metadata files in.

Type: directory
-n | --packagename PACKAGENAME
Optional

The name of the package to associate with the metadata-formatted files.

Type: string
-x | --manifest MANIFEST
Optional

The complete path to the manifest (package.xml) file that specifies the metadata types to convert.

If you specify this parameter, don’t specify --metadata or --sourcepath.

Type: string
-p | --sourcepath SOURCEPATH
Optional

A comma-separated list of paths to the local source files to convert. The supplied paths can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all metadata types in the directory and its sub-directories).

If you specify this parameter, don’t specify --manifest or --metadata.

Type: array
-m | --metadata METADATA
Optional

A comma-separated list of metadata component names to convert.

Type: array

Help for source:convert

To convert source-formatted files into the metadata format, so that you can deploy them using Metadata API, run "sfdx force:source:convert". Then deploy the metadata using "sfdx force:mdapi:deploy".

To convert Metadata API–formatted files into the source format, run "sfdx force:mdapi:convert".

To specify a package name that includes spaces, enclose the name in single quotes.

Examples:

1$ sfdx force:source:convert -r path/to/source
1$ sfdx force:source:convert -r path/to/source -d path/to/outputdir -n 'My Package'

source:delete

Deletes source files from your project and from a non-source-tracked org, such as a sandbox.

Command Syntax

sfdx force:source:delete
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-r]
[-w WAIT]
[-p SOURCEPATH]
[-m METADATA]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
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
-r | --noprompt
Optional

Do not prompt for delete confirmation.

Type: boolean
-w | --wait WAIT
Optional

Number of minutes to wait for the command to complete and display results to the terminal window. If the command continues to run after the wait period, the CLI returns control of the terminal window to you. The default is 33 minutes.

Type: minutes
Default value: 33
-p | --sourcepath SOURCEPATH
Optional

A comma-separated list of paths to the local metadata to delete. The supplied paths can be a single file (in which case the operation is applied to only one file) or a folder (in which case the operation is applied to all metadata types in the directory and its sub-directories).

If you specify this parameter, don’t specify --manifest or --metadata.

Type: array
-m | --metadata METADATA
Optional

A comma-separated list of names of metadata components to delete from your project and your org.

Type: array

Help for source:delete

Use this command to delete components from orgs that don’t have source tracking, such as sandboxes.

To remove deleted items from scratch orgs, which have change tracking, use "sfdx force:source:push".

Examples:

1$ sfdx force:source:delete -p path/to/source
1$ sfdx force:source:delete -m <metadata>

source:deploy

Deploys metadata in source format to an org.

Command Syntax

sfdx force:source:deploy
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-c]
[-w WAIT]
[-l TESTLEVEL]
[-r RUNTESTS]
[-o]
[-g]
[-q VALIDATEDDEPLOYREQUESTID]
[--verbose]
[-m METADATA]
[-p SOURCEPATH]
[-x MANIFEST]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
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
-c | --checkonly
Optional

Validates the deployed metadata and runs all Apex tests, but prevents the deployment from being saved to the org.

If you change a field type from Master-Detail to Lookup or vice versa, that change isn’t supported when using the --checkonly parameter to test a deployment (validation). This kind of change isn’t supported for test deployments to avoid the risk of data loss or corruption. If a change that isn’t supported for test deployments is included in a deployment package, the test deployment fails and issues an error.

If your deployment package changes a field type from Master-Detail to Lookup or vice versa, you can still validate the changes prior to deploying to Production by performing a full deployment to another test Sandbox. A full deployment includes a validation of the changes as part of the deployment process.

Note: A Metadata API deployment that includes Master-Detail relationships deletes all detail records in the Recycle Bin in the following cases.

1. For a deployment with a new Master-Detail field, soft delete (send to the Recycle Bin) all detail records before proceeding to deploy the Master-Detail field, or the deployment fails. During the deployment, detail records are permanently deleted from the Recycle Bin and cannot be recovered.

2. For a deployment that converts a Lookup field relationship to a Master-Detail relationship, detail records must reference a master record or be soft-deleted (sent to the Recycle Bin) for the deployment to succeed. However, a successful deployment permanently deletes any detail records in the Recycle Bin.

Type: boolean
-w | --wait WAIT
Optional

Number of minutes to wait for the command to complete and display results to the terminal window. If the command continues to run after the wait period, the CLI returns control of the terminal window to you. The default is 33 minutes.

Type: minutes
Default value: 33
-l | --testlevel TESTLEVEL
Optional

Specifies which level of deployment tests to run. Valid values are:

NoTestRun—No tests are run. This test level applies only to deployments to development environments, such as sandbox, Developer Edition, or trial orgs. This test level is the default for development environments.

RunSpecifiedTests—Runs only the tests that you specify in the --runtests option. Code coverage requirements differ from the default coverage requirements when using this test level. Executed tests must comprise a minimum of 75% code coverage for each class and trigger in the deployment package. This coverage is computed for each class and trigger individually and is different than the overall coverage percentage.

RunLocalTests—All tests in your org are run, except the ones that originate from installed managed packages. This test level is the default for production deployments that include Apex classes or triggers.

RunAllTestsInOrg—All tests in your org are run, including tests of managed packages.

If you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more information, see “Running Tests in a Deployment” in the Metadata API Developer Guide.

Type: string
Permissible values are: NoTestRun, RunSpecifiedTests, RunLocalTests, RunAllTestsInOrg
-r | --runtests RUNTESTS
Optional

Lists the Apex classes containing the deployment tests to run. Use this parameter when you set --testlevel to RunSpecifiedTests.

Type: array
-o | --ignoreerrors
Optional

Ignores the deploy errors, and continues with the deploy operation. The default is false. Keep this parameter set to false when deploying to a production org. If set to true, components without errors are deployed, and components with errors are skipped.

Type: boolean
-g | --ignorewarnings
Optional

If a warning occurs and ignoreWarnings is set to true, the success field in DeployMessage is true. When ignoreWarnings is set to false, success is set to false, and the warning is treated like an error.

This field is available in API version 18.0 and later. Prior to version 18.0, there was no distinction between warnings and errors. All problems were treated as errors and prevented a successful deployment.

Type: boolean
-q | --validateddeployrequestid VALIDATEDDEPLOYREQUESTID
Optional

Specifies the ID of a package with recently validated components to run a Quick Deploy. Deploying a validation helps you shorten your deployment time because tests aren’t rerun. If you have a recent successful validation, you can deploy the validated components without running tests. A validation doesn’t save any components in the org. You use a validation only to check the success or failure messages that you would receive with an actual deployment. To validate your components, add the -c | --checkonly flag when you run "sfdx force:mdapi:deploy". This flag sets the checkOnly="true" parameter for your deployment. Before deploying a recent validation, ensure that the following requirements are met:

1. The components have been validated successfully for the target environment within the last 10 days.

2. As part of the validation, Apex tests in the target org have passed.

3. Code coverage requirements are met.

- If all tests in the org or all local tests are run, overall code coverage is at least 75%, and Apex triggers have some coverage.

- If specific tests are run with the RunSpecifiedTests test level, each class and trigger that was deployed is covered by at least 75% individually.

Type: id
--verbose
Optional

Indicates that you want verbose output from the deploy operation.

Type: boolean
-m | --metadata METADATA
Optional

A comma-separated list of names of metadata components to deploy to the org.

Type: array
-p | --sourcepath SOURCEPATH
Optional

A comma-separated list of paths to the local source files to deploy. The supplied paths can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all metadata types in the directory and its sub-directories).

If you specify this parameter, don’t specify --manifest or --metadata.

Type: array
-x | --manifest MANIFEST
Optional

The complete path for the manifest (package.xml) file that specifies the components to deploy.

If you specify this parameter, don’t specify --metadata or --sourcepath.

Type: filepath

Help for source:deploy

Use this command to deploy source (metadata that’s in source format) to an org.

To take advantage of change tracking with scratch orgs, use "sfdx force:source:push".

To deploy metadata that’s in metadata format, use "sfdx force:mdapi:deploy".

The source you deploy overwrites the corresponding metadata in your org. This command does not attempt to merge your source with the versions in your org.

To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI.

To check the status of the job, use force:source:deploy:report.

If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes.

Examples:

To deploy the source files in a directory:

1$ sfdx force:source:deploy -p path/to/source

To deploy a specific Apex class and the objects whose source is in a directory:

1$ sfdx force:source:deploy -p path/to/apex/classes/MyClass.cls,path/to/source/objects

To deploy source files in a comma-separated list that contains spaces:

1$ sfdx force:source:deploy -p "path/to/objects/MyCustomObject/fields/MyField.field-meta.xml, path/to/apex/classes"

To deploy all Apex classes:

1$ sfdx force:source:deploy -m ApexClass

To deploy a specific Apex class:

1$ sfdx force:source:deploy -m ApexClass:MyApexClass

To deploy all custom objects and Apex classes:

1$ sfdx force:source:deploy -m CustomObject,ApexClass

To deploy all Apex classes and two specific profiles (one of which has a space in its name):

1$ sfdx force:source:deploy -m "ApexClass, Profile:My Profile, Profile: AnotherProfile"

To deploy all components listed in a manifest:

1$ sfdx force:source:deploy -x path/to/package.xml

To run the tests that aren’t in any managed packages as part of a deployment:

1$ sfdx force:source:deploy -m ApexClass -l RunLocalTests

To check whether a deployment would succeed (to prepare for Quick Deploy):

1$ sfdx force:source:deploy -m ApexClass -l RunAllTestsInOrg -c

To deploy an already validated deployment (Quick Deploy):

1$ sfdx force:source:deploy -q 0Af9A00000FTM6pSAH

source:deploy:cancel

Cancels an asynchronous source deployment.

Command Syntax

sfdx force:source:deploy:cancel
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-w WAIT]
[-i JOBID]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
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
-w | --wait WAIT
Optional

Number of minutes to wait for the command to complete and display results to the terminal window. If the command continues to run after the wait period, the CLI returns control of the terminal window to you. The default is 33 minutes.

Type: minutes
Default value: 33
-i | --jobid JOBID
Optional

The job ID (requestId) of the deployment you want to cancel. If not specified, the default value is the ID of the most recent source deployment you ran using Salesforce CLI.

Type: id

Help for source:deploy:cancel

Use this command to cancel a specified asynchronous source deployment. You can also specify a wait time (in minutes) to check for updates to the canceled deploy status.

To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI.

To check the status of the job, use force:source:deploy:report.

Examples:

Deploy a directory of files to the org

1$ sfdx force:source:deploy -d <directory>

Now cancel this deployment and wait two minutes

1$ sfdx force:source:deploy:cancel -w 2

If you have multiple deployments in progress and want to cancel a specific one, specify the job ID

1$ sfdx force:source:deploy:cancel -i <jobid>

Check the status of the cancel job

1$ sfdx force:source:deploy:report

source:deploy:report

Checks the current status of an asynchronous metadata deployment.

Command Syntax

sfdx force:source:deploy:report
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-w WAIT]
[-i JOBID]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
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
-w | --wait WAIT
Optional

Number of minutes to wait for the command to complete and display results to the terminal window. If the command continues to run after the wait period, the CLI returns control of the terminal window to you. The default is 33 minutes.

Type: minutes
Default value: 33
-i | --jobid JOBID
Optional

The job ID (asyncId) of the deployment you want to check. If not specified, the default value is the ID of the most recent metadata deployment you ran using Salesforce CLI. Use with -w to resume waiting.

Type: id

Help for source:deploy:report

Specify the job ID for the deploy you want to check. You can also specify a wait time (minutes) to check for updates to the deploy status.

Examples:

Deploy a directory of files to the org

1$ sfdx force:source:deploy -d <directory>

Now cancel this deployment and wait two minutes

1$ sfdx force:source:deploy:cancel -w 2

If you have multiple deployments in progress and want to cancel a specific one, specify the job ID

1$ sfdx force:source:deploy:cancel -i <jobid>

Check the status of the cancel job

1$ sfdx force:source:deploy:report

source:open

Opens the specified Lightning Page in Lightning App Builder. Lightning Page files have the suffix .flexipage-meta.xml, and are stored in the flexipages directory. If you specify a different type of file, this command opens your org’s home page.

Command Syntax

sfdx force:source:open
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
-f SOURCEFILE
[-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/.sfdx/sfdx.log.

Type: string
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
-f | --sourcefile SOURCEFILE
Required

File to edit.

Type: filepath
-r | --urlonly
Optional

Generate a navigation URL path, but don’t launch a browser-based editor.

Type: boolean

Help for source:open

The file opens in your default browser.

If no browser-based editor is available for the selected file, this command opens your org’s home page.

To generate a URL for the browser-based editor but not open the editor, use --urlonly.

Examples:

1$ sfdx force:source:open -f Property_Record_Page.flexipage-meta.xml
1$ sfdx force:source:open -f Property_Record_Page.flexipage-meta.xml -r

source:pull

Pulls changed source from the scratch org to your project to keep them in sync.

Command Syntax

sfdx force:source:pull
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-w WAIT]
[-f]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
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
-w | --wait WAIT
Optional

The number of minutes to wait for the command to complete and display results to the terminal window. If the command continues to run after the wait period, the CLI returns control of the terminal window to you. The default is 33 minutes.

Type: minutes
Default value: 33
-f | --forceoverwrite
Optional

Runs the pull command even if conflicts exist. Changes in the scratch org overwrite changes in the project.

Type: boolean

Help for source:pull

If the command detects a conflict, it displays the conflicts but does not complete the process. After reviewing the conflict, rerun the command with the --forceoverwrite parameter.

source:push

Pushes changed source from your project to a scratch org to keep them in sync.

Command Syntax

sfdx force:source:push
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-f]
[-g]
[-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/.sfdx/sfdx.log.

Type: string
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
-f | --forceoverwrite
Optional

Runs the push command even if conflicts exist. Changes in the project overwrite changes in the scratch org.

Type: boolean
-g | --ignorewarnings
Optional

Completes the deployment even if warnings are generated.

Type: boolean
-w | --wait WAIT
Optional

Number of minutes to wait for the command to complete and display results to the terminal window. If the command continues to run after the wait period, the CLI returns control of the terminal window to you. The default is 33 minutes.

Type: minutes
Default value: 33

Help for source:push

If the command detects a conflict, it displays the conflicts but does not complete the process. After reviewing the conflict, rerun the command with the --forceoverwrite parameter.

source:retrieve

Retrieves metadata in source format from an org to your local Salesforce DX project.

Command Syntax

sfdx force:source:retrieve
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[-a APIVERSION]
[-w WAIT]
[-x MANIFEST]
[-m METADATA]
[-n PACKAGENAMES]
[-p SOURCEPATH]
[--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/.sfdx/sfdx.log.

Type: string
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
-a | --apiversion APIVERSION
Optional

Use to override the default, which is the latest version supported by your CLI plug-in, with the version in your package.xml file.

Type: string
-w | --wait WAIT
Optional

Number of minutes to wait for the command to complete and display results to the terminal window. If the command continues to run after the wait period, the CLI returns control of the terminal window to you. The default is 33 minutes.

Type: minutes
Default value: 33
-x | --manifest MANIFEST
Optional

The complete path for the manifest (package.xml) file that specifies the components to retrieve.

If you specify this parameter, don’t specify --metadata or --sourcepath.

Type: filepath
-m | --metadata METADATA
Optional

A comma-separated list of names of metadata components to retrieve from the org.

Type: array
-n | --packagenames PACKAGENAMES
Optional

A comma-separated list of package names to retrieve.

Type: array
-p | --sourcepath SOURCEPATH
Optional

A comma-separated list of file paths for source to retrieve from the org. The supplied paths can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all source files in the directory and its sub-directories).

Type: array
--verbose
Optional

Indicates that you want verbose output from the retrieve operation.

Type: boolean

Help for source:retrieve

Use this command to retrieve source (metadata that’s in source format) from an org.

To take advantage of change tracking with scratch orgs, use "sfdx force:source:pull".

To retrieve metadata that’s in metadata format, use "sfdx force:mdapi:retrieve".

The source you retrieve overwrites the corresponding source files in your local project. This command does not attempt to merge the source from your org with your local source files.

If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes.

Examples:

To retrieve the source files in a directory:

1$ sfdx force:source:retrieve -p path/to/source

To retrieve a specific Apex class and the objects whose source is in a directory:

1$ sfdx force:source:retrieve -p path/to/apex/classes/MyClass.cls,path/to/source/objects

To retrieve source files in a comma-separated list that contains spaces:

1$ sfdx force:source:retrieve -p "path/to/objects/MyCustomObject/fields/MyField.field-meta.xml, path/to/apex/classes"

To retrieve all Apex classes:

1$ sfdx force:source:retrieve -m ApexClass

To retrieve a specific Apex class:

1$ sfdx force:source:retrieve -m ApexClass:MyApexClass

To retrieve all custom objects and Apex classes:

1$ sfdx force:source:retrieve -m CustomObject,ApexClass

To retrieve all Apex classes and two specific profiles (one of which has a space in its name):

1$ sfdx force:source:retrieve -m "ApexClass, Profile:My Profile, Profile: AnotherProfile"

To retrieve all metadata components listed in a manifest:

1$ sfdx force:source:retrieve -x path/to/package.xml

To retrieve metadata from a package or multiple packages:

1$ sfdx force:source:retrieve -n MyPackageName
1$ sfdx force:source:retrieve -n "Package1, PackageName With Spaces, Package3"

To retrieve all metadata from a package and specific components that aren’t in the package, specify both -n | --packagenames and one other scoping parameter:

1$ sfdx force:source:retrieve -n MyPackageName -p path/to/apex/classes
1$ sfdx force:source:retrieve -n MyPackageName -m ApexClass:MyApexClass
1$ sfdx force:source:retrieve -n MyPackageName -x path/to/package.xml

source:status

Lists changes that have been made locally, in a scratch org, or both.

Command Syntax

sfdx force:source:status
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-a]
[-l]
[-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/.sfdx/sfdx.log.

Type: string
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
-a | --all
Optional

Lists all the changes that have been made.

Type: boolean
-l | --local
Optional

Lists the changes that have been made locally.

Type: boolean
-r | --remote
Optional

Lists the changes that have been made in the scratch org.

Type: boolean

Help for source:status

Examples:

1$ sfdx force:source:status -l
1$ sfdx force:source:status -r
1$ sfdx force:source:status -a
1$ sfdx force:source:status -a -u me@example.com --json