Back
Salesforce DX CLI Cheat Sheet
Get Documentation URLs
sfdx force
Force Commands Help
sfdx force -h
Another sub level example
sfdx force:org -h
Authorize a Sandbox Org set an alias and make it the default Dev Hub
sfdx force:auth:web:login -a DevHub -d
Authorize a Prod/Trailhead Org, set an alias, make it the default Org
sfdx force:auth:web:login -a MyAlias -s -r https://login.salesforce.com
Set default Dev Hub
sfdx force:config:set defaultdevhubusername=some@user.com
Set default Org
sfdx force:config:set defaultusername=some@user.com
List defaults
sfdx force:config:list
Push Source to Scratch Org
sfdx force:source:push
Pull Source from Scratch Org
sfdx force:source:pull
Local & Remote Source Code Changes
sfdx force:source:status
Get a list of connected Orgs
sfdx force:org:list
Open Current Org in Browser
sfdx force:org:open
Delete an Org
sfdx force:org:delete -u MyOrgAlias -p
Create Scratch Org for 7 days and make default Org
sfdx force:org:create -a MyAlias -s -f config/project-scratch-def.json -d 7
Import
sfdx force:data:tree:import --plan data/sample-dataplan.json
Export
sfdx force:data:tree:export -h
Create
sfdx force:package:version create
Install
sfdx force:package:install
promote
sfdx force:package:version:promote
Retrieve a particular file
sfdx force:source:retrieve -p c:/Users/<filepath>
Deploy a particular file
sfdx force:source:deploy -p c:/Users/<filepath>
generate password for new scratch org
sfdx force:user:pasword:generate --scratchorgusername
Update the CLI
sfdx update
Create a new project
sfdx force:project:create -n myProjectName
Org Limits
sfdx force:limits:api:display
Back