Show Menu
Cheatography

Sf commands Cheat Sheet (DRAFT) by

A cheat sheet to most commonly used SF commands

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Alias/Org Commands

sf alias list
List of all aliases
sf alias unset my-alias
Delete an alias
sf org list
List of all authen­ticated orgs
sf org logout
Logout from current default org

Scratch orgs commands

sf org create scratch --alias MyPack­age­Nam­e-ScrXX --defi­nit­ion­-file config­/pr­oje­ct-­scr­atc­h-d­ef.json --set-­default --dura­tio­n-days 30
Command to create a scratch org related to an unlocked package.
 

Source tracking commands

sf project reset tracking
Reset source tracking
sf project retrieve preview
Preview of what will be retrieved from org
sf project retrieve start
Retrieve the source tracking changes from org
 

Packaging Commands

sf package create --name MyPack­ageName --pack­age­-type Unlocked --path path-t­o-M­yPa­cka­geName
Command to create an unlocked package
sf package version create -package MyPack­ageName --inst­all­ati­on-key MyPack­agePass
Command to create a new package version
adding -c to previous
Command to create new package version with code coverage. Needed to promote
sf package version promote --package MyPack­age­Ver­sio­nAlias
Comand to promote a package version