Sa
lesforce CLI :-
Contents:
- What is CLI?
- Difference between CLI and SFDX?
- Different CLI Commands
CLI (Command Line Interface):- This is a powerful tool which simplifies development and build automation when working with salesforce Org.
- create and manage Orgs
- you can create and delete scratch orgs, manage and authorize developer, production and sandbox orgs.
- Synchronize source to and from scratch org.
- create and test Apex classes, triggers, VF pages , Lightning web components etc..
- Import and export Data.
- create and Install Packages
- helps to build automation
- Point and click -- No// with help of CLI command you can perform the point and click task faster with out going to the user interface.
- for ex: If you want to create a "user" for your org, you can directly create a user from CLI.
- Perform task faster - CLI executes fast.
- Better consistency - has per the command options you can enter the values.
- Less chances of error - due to command options there will be less error, with perfect values.
- Build Automation with scripts - you can group more than 1 commands in a script to execute automatically.
To Install CLI :-
Please follow this link Salesforce CLI.
after installation open cmd and enter sfdx --version, If installation successful no error and shows the version like sfdx-cli/7.61.0. If you want to update, enter sfdx update
How to use few CLI commands:-
- To display, list of all commands enter "sfdx commands"
If you want to deep drive on each command than type help on each command.
- for namespace command -"sfdx force -h"
- for topic -"sfdx force:apex -h"
- for subtopic-"sfdx force:apex:class-h"
- for commands -"sfdx force:apex:class:create -h"
Note:- To see signatures for all commands in the force namespace, run sfdx force:doc:commands:list --usage.
here
Let's go with an example :-
sfdx force:user:list -h
This helps you to display the documentation of that command.
like Usage, Options and Description.
It also show's some example with description.
`
x
No comments:
Post a Comment