SlideShare a Scribd company logo
1 of 20
Download to read offline
Salesforce CLI
The developer multi-tool
About Me
☑ CTO of BrightGen
☑ Salesforce MVP
☑ Certified Technical Architect
☑ Prime Minicomputer - PrimeOS
☑ VAX Minicomputer - VMS
☑ HP 9000 - HP UX (Unix)
☑ IBM RS/6000 - AIX (Unix)
Salesforce CLI
☑ sfdx executable
☑ Local installation
☑ Part of SalesforceDX
☑ One tool to rule them all
Authorisation
☑ Login once
☑ CLI manages all tokens
☑ Authorise through browser :
sfdx force:auth:web:login
☑ Specify existing with -u
sfdx force:org:open -u keir.bowden@sfdx.deploy
Deployment
Structured src and package.xml
Deployment
☑ Wait for complete
sfdx force:mdapi:deploy -d src -w 2
☑ Poll
sfdx force:mdapi:deploy -d src
sfdx force:mdapi:deploy:report -i <job>
Running Tests
☑ All in your namespace
sfdx force:apex:test:run -l RunLocalTests
☑ Specific Tests
sfdx force:apex:test:run -l
RunSpecifiedTests -t ConfigAccessorTest
Retrieving Metadata
Requires package.xml
Retrieving
Metadata
☑ Wait for complete
sfdx force:mdapi:retrieve
-k retrieve/package.xml -r .
☑ Poll
sfdx force:mdapi:retrieve
-k retrieve/package.xml -r . -w 0
sfdx force:mdapi:retrieve:report
-i <jobId> -r .
Destructive Changes
Empty package.xml
destructiveChanges.xml
sfdx force:mdapi:deploy -d destroy
Retrieving
Data
☑ sfdx force:data:soql:query -q <query>
Updating Data ☑ sfdx force:data:record:update -s <type> -i
<id> -v "<field>=<value> <field>=<value>"
Creating
Metadata
☑ Apex Class:
sfdx force:apex:class:create -n <name>
-d <directory>
☑ Lightning Component
sfdx force:lightning:component:create
-n <name> -d <directory>
☑ Visualforce Page
sfdx force:visualforce:page:create
-n <name> -d <directory>
☑ No -u option
Created on local file system only
Scripting
Chain
Commands
1. Deploy Codebase
2. Run Tests
Processing
Output
☑ Reformat
☑ Report Results
☑ Take action
Orchestration
1. Clone git repository
2. Deploy
3. Store commit id
More
Information
☑ Home page : sforce.co/2vyFuuY
☑ Setup guide: sforce.co/2FIDlpS
☑ Command reference : sforce.co/2pdPEAe
☑ Release notes : sforce.co/2DWaWH7
☑ Blog series : bobbuzz.me.uk/2GvVaIb
Questions?

More Related Content

What's hot

HiveServer2 for Apache Hive
HiveServer2 for Apache HiveHiveServer2 for Apache Hive
HiveServer2 for Apache Hive
Carl Steinbach
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express ppt
Abhinaw Kumar
 

What's hot (20)

HiveServer2 for Apache Hive
HiveServer2 for Apache HiveHiveServer2 for Apache Hive
HiveServer2 for Apache Hive
 
Data Management and Migration in Salesforce
Data Management and Migration in SalesforceData Management and Migration in Salesforce
Data Management and Migration in Salesforce
 
An Introduction to Lightning Web Components
An Introduction to Lightning Web ComponentsAn Introduction to Lightning Web Components
An Introduction to Lightning Web Components
 
Two-Way Integration with Writable External Objects
Two-Way Integration with Writable External ObjectsTwo-Way Integration with Writable External Objects
Two-Way Integration with Writable External Objects
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
Force.com (Salesforce.com)
Force.com (Salesforce.com)Force.com (Salesforce.com)
Force.com (Salesforce.com)
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetup
 
Office 365 Mail migration strategies
Office 365 Mail migration strategiesOffice 365 Mail migration strategies
Office 365 Mail migration strategies
 
How to choose between SharePoint lists, SQL Azure, Microsoft Dataverse with D...
How to choose between SharePoint lists, SQL Azure, Microsoft Dataverse with D...How to choose between SharePoint lists, SQL Azure, Microsoft Dataverse with D...
How to choose between SharePoint lists, SQL Azure, Microsoft Dataverse with D...
 
Salesforce Basic Development
Salesforce Basic DevelopmentSalesforce Basic Development
Salesforce Basic Development
 
Power bi premium
Power bi premiumPower bi premium
Power bi premium
 
Adelaide Global Azure Bootcamp 2018 - Azure 101
Adelaide Global Azure Bootcamp 2018 - Azure 101Adelaide Global Azure Bootcamp 2018 - Azure 101
Adelaide Global Azure Bootcamp 2018 - Azure 101
 
Azure SQL Data Warehouse
Azure SQL Data Warehouse Azure SQL Data Warehouse
Azure SQL Data Warehouse
 
Episode 10 - External Services in Salesforce
Episode 10 - External Services in SalesforceEpisode 10 - External Services in Salesforce
Episode 10 - External Services in Salesforce
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express ppt
 
Soap vs rest
Soap vs restSoap vs rest
Soap vs rest
 
ADF Mapping Data Flows Training Slides V1
ADF Mapping Data Flows Training Slides V1ADF Mapping Data Flows Training Slides V1
ADF Mapping Data Flows Training Slides V1
 
SharePoint Permissions 101
SharePoint Permissions 101SharePoint Permissions 101
SharePoint Permissions 101
 

Similar to Salesforce CLI

Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
NicolasVuillamy1
 

Similar to Salesforce CLI (20)

SFDX Presentation
SFDX PresentationSFDX Presentation
SFDX Presentation
 
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in CloudContinuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 Update
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
Deploying Microservices - Makefiles, K8S Config Templates, Git Submodules, He...
Deploying Microservices - Makefiles, K8S Config Templates, Git Submodules, He...Deploying Microservices - Makefiles, K8S Config Templates, Git Submodules, He...
Deploying Microservices - Makefiles, K8S Config Templates, Git Submodules, He...
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班
 
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
 
Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) server
 
Docker as development environment
Docker as development environmentDocker as development environment
Docker as development environment
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
Salesforce DX (Meetup du 11/10/2017)
Salesforce DX (Meetup du 11/10/2017)Salesforce DX (Meetup du 11/10/2017)
Salesforce DX (Meetup du 11/10/2017)
 
Sfdx introduction
Sfdx introductionSfdx introduction
Sfdx introduction
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
betterCode Workshop: Effizientes DevOps-Tooling mit Go
betterCode Workshop:  Effizientes DevOps-Tooling mit GobetterCode Workshop:  Effizientes DevOps-Tooling mit Go
betterCode Workshop: Effizientes DevOps-Tooling mit Go
 

More from Keir Bowden

More from Keir Bowden (20)

LC 2022 - Second Generation Packaging
LC 2022 - Second Generation PackagingLC 2022 - Second Generation Packaging
LC 2022 - Second Generation Packaging
 
Mutation Testing.pdf
Mutation Testing.pdfMutation Testing.pdf
Mutation Testing.pdf
 
London Non-Profit Spring 22 Salesforce Release
London Non-Profit Spring 22 Salesforce ReleaseLondon Non-Profit Spring 22 Salesforce Release
London Non-Profit Spring 22 Salesforce Release
 
London Salesforce Developer January 2022
London Salesforce Developer January 2022London Salesforce Developer January 2022
London Salesforce Developer January 2022
 
Winter 22 for Developers
Winter 22 for DevelopersWinter 22 for Developers
Winter 22 for Developers
 
Londons Calling 2021
Londons Calling 2021Londons Calling 2021
Londons Calling 2021
 
London Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringLondon Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global Gathering
 
Helsinki developer group march 2020
Helsinki developer group march 2020Helsinki developer group march 2020
Helsinki developer group march 2020
 
London's calling 2020 Documentor Plug-In
London's calling 2020 Documentor Plug-InLondon's calling 2020 Documentor Plug-In
London's calling 2020 Documentor Plug-In
 
Lightning User Interface Testing with Selenium and Node JS
Lightning User Interface Testing with Selenium and Node JSLightning User Interface Testing with Selenium and Node JS
Lightning User Interface Testing with Selenium and Node JS
 
Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet
 
Salesforce Spring 19 release top 10 Features
Salesforce Spring 19 release top 10 FeaturesSalesforce Spring 19 release top 10 Features
Salesforce Spring 19 release top 10 Features
 
UI Testing with Selenium and Node - London's Calling 2019
UI Testing with Selenium and Node - London's Calling 2019UI Testing with Selenium and Node - London's Calling 2019
UI Testing with Selenium and Node - London's Calling 2019
 
Salesforce Winter 19 release top 10 features
Salesforce Winter 19 release top 10 featuresSalesforce Winter 19 release top 10 features
Salesforce Winter 19 release top 10 features
 
Quickstart Templates with the Salesforce CLI
Quickstart Templates with the Salesforce CLIQuickstart Templates with the Salesforce CLI
Quickstart Templates with the Salesforce CLI
 
TrailheaDX Global Gathering London 2018
TrailheaDX Global Gathering London 2018TrailheaDX Global Gathering London 2018
TrailheaDX Global Gathering London 2018
 
Getting started with public speaking
Getting started with public speakingGetting started with public speaking
Getting started with public speaking
 
London's Calling 2018 - No Connection, No Problem
London's Calling 2018 - No Connection, No ProblemLondon's Calling 2018 - No Connection, No Problem
London's Calling 2018 - No Connection, No Problem
 
No Connection? No Problem!
No Connection? No Problem!No Connection? No Problem!
No Connection? No Problem!
 
Unit Testing Lightning Components with Jasmine
Unit Testing Lightning Components with JasmineUnit Testing Lightning Components with Jasmine
Unit Testing Lightning Components with Jasmine
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Salesforce CLI