SFDX commands for LWC

Below are the few SFDX commands we use frequently while developing Lightning Web Components 

Login to Dev HUb org
sfdx force:auth:web:login -d -a LWC-Hub

Creating a scratch org with 30 days duration.
sfdx force:org:create -f config/project-scratch-def.json --durationdays 30 -a sc1

Open the scratch Org
sfdx force:org:open -u sc1

Pushing the changes from repository to scratch org 
sfdx force:source:push -u sc1

To check the difference between local repository & Scratch org 
Sfdx  force:source:status -u sc1

In LWC development, rarely we will use "pull" command because we can't develop LWC inside org. This command will pull all the metadata from Scratch org to Local repository.
sfdx force:source:pull

To check API limits 
sfdx force:limits:api:display -u LWC-Hub

Comments