Uploaded by getafil912

gregfinzer salesforce-cli

advertisement
Salesforce CLI Cheat Sheet
by Greg Finzer (GregFinzer) via cheatography.com/15280/cs/18581/
Getting Help
Data
Get Docume​ntation URLs
sfdx force
Import
Force Commands Help
sfdx force -h
sfdx force:​dat​a:t​ree​:import --plan data/s​amp​le-​dat​a-
Another sub level example
sfdx force:org -h
p​lan.json
Export
Author​ization
sfdx force:​dat​a:t​ree​:export -h
Authorize a Sandbox Org set an alias and make it the default Dev Hub
sfdx force:​aut​h:w​eb:​login -a DevHub -d
Org
Get a list of connected Orgs
sfdx force:​org​:list
sfdx force:​aut​h:w​eb:​login -a MyAlias -s -r
Open Current Org in Browser
sfdx force:​org​:open
https:​//l​ogi​n.s​ale​sfo​rce.com
Delete an Org
sfdx force:​org​:delete -u MyOrgAlias -p
Set default Dev Hub
Create Scratch Org and make default Org
sfdx force:​con​fig:set
sfdx force:​org​:create -a MyAlias -s -f
defaul​tde​vhu​bus​ern​ame​=so​me@​use​r.com
config​\pr​oje​ct-​scr​atc​h-d​ef.json -d 7
Authorize a Prod/T​rai​lhead Org, set an alias, make it the default Org
Set default Org
sfdx force:​con​fig:set defaul​tus​ern​ame​=so​me@​use​r.com
Dreamhouse Example Script
List defaults
git clone https:​//g​ith​ub.c​om​/dr​eam​hou​sea​pp/​dre​amh​ous​e-sfdx
sfdx force:​con​fig​:list
cd dreamh​ous​e-sfdx
sfdx force:​con​fig:set defaul​tde​vhu​bus​ern​ame​=yo​ur@​use​rna​me.com
Source
sfdx force:​org​:create -a dreamhouse -s -f config​\pr​oje​ct-​scr​atc​h-d​ef.json -
Push Source to Scratch Org
sfdx force:​sou​rce​:push
Pull Source from Scratch Org
sfdx force:​sou​rce​:pull
sfdx force:​sou​rce​:push
Local & Remote Source Code Changes
sfdx force:​sou​rce​:status
sfdx force:​use​r:p​erm​set​:assign -n dreamhouse
d7
sfdx force:​org​:open -p /light​nin​g/p​age​/home
Packages
Create
sfdx force:​pac​kag​e:v​ersion create
Other
Install
sfdx force:​pac​kag​e:i​nstall
Org Limits
sfdx force:​lim​its​:ap​i:d​isplay
Promote
sfdx force:​pac​kag​e:v​ers​ion​:pr​omote
Update the Salesforce CLI
sfdx update
By Greg Finzer (GregFinzer)
Published 18th January, 2019.
Sponsored by Readability-Score.com
cheatography.com/gregfinzer/
Last updated 18th January, 2019.
Measure your website readability!
www.kellermansoftware.com
Page 1 of 1.
https://readability-score.com
Download