SlideShare a Scribd company logo
Build your own DEV tools
with Salesforce CLI Plugin
Generator
Mohith Shrivastava
Salesforce MVP
Technical Architect @Codescience
Twitter @msrivastav13
Thanks to our
Sponsors!
Agenda
• Introduction To Salesforce CLI
• Salesforce CLI Architecture
• Introduction To SalesforceDX Plugin
• Why Build a Custom Plugin ?
• Generating a Custom Plugin
• Accessing Salesforce APIs In Custom Plugin
• Test , Debug and Release Custom Plugins
• Additional Reading
Introduction To Salesforce CLI
• Salesforce CLI is based on Open Source Heroku Oclif Project
• Oclif is a framework for Building Command Line Interface
Using Nodejs framework
• Install SFDX CLI depending on Operating System using npm or
from developer site
• To find the version you are on run below
sfdx --version
Salesforce CLI Architecture
Credits - Salesforce Developer Evangelist Team (https://developer.salesforce.com/blogs/2018/05/create-your-first-
salesforce-cli-plugin.html)
Introduction To SalesforceDX Plugin
• list all plugins using sfdx plugins
• salesforcedx plugin provides commands to create scratch
orgs , authenticate to any orgs , work with salesforce
metadata (retrieve , deploy , convert to dx source format)
and many more
• Docs for every command are part of CLI .You can help of any
command with --help
• Provides command to generate a custom plugin
Why Build a Custom Plugin?
• While salesforce covers common use cases there might be
one of requirements specific to your need for CI pipeline.
• Useful if you want to automate multiple salesforce provided
commands in one single command
• Handy if you want to build a command that involves
operations with multiple orgs
• Build your own developer tools using metadata and tooling
apis (Desktop tools using Electron or Tools for Editors like
VScode)
Generating a Custom Plugin
• sfdx plugins:generate - Provides ability to scaffold a custom
plugin project
• Let’s create one now
• Link using sfdx plugins:link
DEMO
Accessing Salesforce APIs In Custom
Plugin
• One can access Salesforce metadata , tooling , analytics , ui ,
soap and rest using jsforce library provided by the CLI
• The custom plugins can use session from the cli or establish
new connections using
• sfdx-core npm provides utilities for establishing
connection,manage orgs
• sfdx Command npm provides the utilities like table
rendering , spinners
Test, Debug and Release
• Compile code using yarn prepack
• We can debug using vscode node debugger .Run the
command and use followed by <command> --dev-suspend
• Release a plugin using npm publish
DEMO MO-DX-PLUGIN & DX CODE
COMPANIONS
Additional Reading
Plugin development developer guide
Salesforce Plugin Generator Project
Salesforce Command NPM
Salesforce Core NPM
Dreamforce 2018 Talk
Q & A
Thank You

More Related Content

What's hot (19)

PPTX
CI CD Daridabad MuleSoft meetup
Amit Singh
Ā 
PPTX
ASP.NET Core 1.0: Understanding ASP.NET Core 1.0 (ASP.NET 5)
WinWire Technologies Inc
Ā 
PPT
O que Ć© esse tal de OWIN?
Andre Carlucci
Ā 
PPTX
ASP.NET Core MVC + Web API with Overview (Post RC2)
Shahed Chowdhuri
Ā 
PPTX
Custom MuleSoft connector using Java SDK
Amit Singh
Ā 
PPTX
Owin and-katana-overview
sonia merchant
Ā 
PDF
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Arrow Consulting & Design
Ā 
PDF
Mule 4 meetup @Hyderabad
Vijay Reddy
Ā 
PPT
Impact Of A Cms Framework Change - Holland Open Netherlands
Wilco Jansen
Ā 
PPTX
Vue micro frontend implementation patterns
Albert Brand
Ā 
PPTX
Indore mule soft meetup 3
Kirti Gurjar
Ā 
PPTX
What's new in Visual Studio 2013 & TFS 2013
Danijel Malik
Ā 
PDF
Leverage Entity Framework 7 in Business Application Design
WinWire Technologies Inc
Ā 
PPT
TDD with ASP.NET MVC 1.0
Shiju Varghese
Ā 
PDF
JEE Conf 2015: Less JS!
_Dewy_
Ā 
PPTX
Mulesoft KL Meetup 2
NitushreeJena
Ā 
PPTX
Web sphere liberty2
JyothirmaiG4
Ā 
PPSX
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
Nilesh Shah
Ā 
PPTX
ASP.NET 5 Overview
Shahed Chowdhuri
Ā 
CI CD Daridabad MuleSoft meetup
Amit Singh
Ā 
ASP.NET Core 1.0: Understanding ASP.NET Core 1.0 (ASP.NET 5)
WinWire Technologies Inc
Ā 
O que Ć© esse tal de OWIN?
Andre Carlucci
Ā 
ASP.NET Core MVC + Web API with Overview (Post RC2)
Shahed Chowdhuri
Ā 
Custom MuleSoft connector using Java SDK
Amit Singh
Ā 
Owin and-katana-overview
sonia merchant
Ā 
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Arrow Consulting & Design
Ā 
Mule 4 meetup @Hyderabad
Vijay Reddy
Ā 
Impact Of A Cms Framework Change - Holland Open Netherlands
Wilco Jansen
Ā 
Vue micro frontend implementation patterns
Albert Brand
Ā 
Indore mule soft meetup 3
Kirti Gurjar
Ā 
What's new in Visual Studio 2013 & TFS 2013
Danijel Malik
Ā 
Leverage Entity Framework 7 in Business Application Design
WinWire Technologies Inc
Ā 
TDD with ASP.NET MVC 1.0
Shiju Varghese
Ā 
JEE Conf 2015: Less JS!
_Dewy_
Ā 
Mulesoft KL Meetup 2
NitushreeJena
Ā 
Web sphere liberty2
JyothirmaiG4
Ā 
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
Nilesh Shah
Ā 
ASP.NET 5 Overview
Shahed Chowdhuri
Ā 

Similar to Build your own dev tools with salesforce cli plugin generator (20)

PDF
Build Apps with Modern AI Powered Developer Tools..pdf
Dele Amefo
Ā 
PPTX
Build sfdx plugin in 15 minutes
Jitendra Zaa
Ā 
PPTX
Salesforce DX: A closer look - Part II
Federico Giust
Ā 
PPTX
Sfdx introduction
Abdelhakim Mouttaqui ☁
Ā 
PPTX
Salesforce DX (Meetup du 11/10/2017)
Casablanca Salesforce Developer Group
Ā 
PDF
London's calling 2020 Documentor Plug-In
Keir Bowden
Ā 
PDF
Helsinki developer group march 2020
Keir Bowden
Ā 
PPT
Salesforce Developer eXperience (SFDX)
Bohdan Dovhań
Ā 
PPT
SFDX - Spring 2019 Update
Bohdan Dovhań
Ā 
PPT
SFDX Presentation
Bohdan Dovhań
Ā 
PPTX
Getting started with Salesforce DX & CLI
Michael Gill
Ā 
PDF
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
NicolasVuillamy1
Ā 
PDF
Salesforce DX & Deep Dive demo on force:data commands
Steven Hugo
Ā 
PPTX
Deployments with VS Code and Salesforce CLI
ishratbhatti1
Ā 
PDF
Accenture Salesforce Developer Meetup vol 1 2019
Accenture Hungary
Ā 
PDF
Cleveland Developers: CLI in the C-L-E slide deck
Lynda Kane
Ā 
PPTX
Get started with Salesforce DX
Anurag Bhardwaj
Ā 
PPTX
Salesforce DX for Admin v2
Thierry TROUIN ☁
Ā 
PPTX
Salesforce DX for admin
Thierry TROUIN ☁
Ā 
PDF
Salesforce DX 201 - Advanced Implementation for ISVs
Vivek Chawla
Ā 
Build Apps with Modern AI Powered Developer Tools..pdf
Dele Amefo
Ā 
Build sfdx plugin in 15 minutes
Jitendra Zaa
Ā 
Salesforce DX: A closer look - Part II
Federico Giust
Ā 
Sfdx introduction
Abdelhakim Mouttaqui ☁
Ā 
Salesforce DX (Meetup du 11/10/2017)
Casablanca Salesforce Developer Group
Ā 
London's calling 2020 Documentor Plug-In
Keir Bowden
Ā 
Helsinki developer group march 2020
Keir Bowden
Ā 
Salesforce Developer eXperience (SFDX)
Bohdan Dovhań
Ā 
SFDX - Spring 2019 Update
Bohdan Dovhań
Ā 
SFDX Presentation
Bohdan Dovhań
Ā 
Getting started with Salesforce DX & CLI
Michael Gill
Ā 
Easy Salesforce CI/CD with Open Source Only - Dreamforce 23
NicolasVuillamy1
Ā 
Salesforce DX & Deep Dive demo on force:data commands
Steven Hugo
Ā 
Deployments with VS Code and Salesforce CLI
ishratbhatti1
Ā 
Accenture Salesforce Developer Meetup vol 1 2019
Accenture Hungary
Ā 
Cleveland Developers: CLI in the C-L-E slide deck
Lynda Kane
Ā 
Get started with Salesforce DX
Anurag Bhardwaj
Ā 
Salesforce DX for Admin v2
Thierry TROUIN ☁
Ā 
Salesforce DX for admin
Thierry TROUIN ☁
Ā 
Salesforce DX 201 - Advanced Implementation for ISVs
Vivek Chawla
Ā 
Ad

More from Mohith Shrivastava (20)

PDF
Best Practices with Apex in 2022.pdf
Mohith Shrivastava
Ā 
PPTX
Successfully retrieving metadata from salesforce org using packages
Mohith Shrivastava
Ā 
PPTX
Deep dive into salesforce connected app part 4
Mohith Shrivastava
Ā 
PPTX
Successfully creating unlocked package
Mohith Shrivastava
Ā 
PPTX
Implementing Einstein OCR
Mohith Shrivastava
Ā 
PPTX
Deep dive into salesforce connected app - part 2
Mohith Shrivastava
Ā 
PPTX
Deep dive into salesforce connected app part 1
Mohith Shrivastava
Ā 
PPTX
Org dependent salesforce packages
Mohith Shrivastava
Ā 
PPTX
Enhance salesforce application performance using lightning platform cache
Mohith Shrivastava
Ā 
PPTX
Become a rockstar admin
Mohith Shrivastava
Ā 
PPTX
Modular application development using unlocked packages
Mohith Shrivastava
Ā 
PPTX
Building Apps On Lightning
Mohith Shrivastava
Ā 
PPTX
Spring18 Lightning Component Updates
Mohith Shrivastava
Ā 
PPTX
Introduction To Service Cloud Snapins SDK
Mohith Shrivastava
Ā 
PPTX
Introduction to einstein analytics sdk for lightning
Mohith Shrivastava
Ā 
PPTX
Machine learning with salesforce data using prediction io
Mohith Shrivastava
Ā 
PPTX
Debugging lightning components-SEDreamin17
Mohith Shrivastava
Ā 
PPTX
Introduction to Analytics Cloud
Mohith Shrivastava
Ā 
PPTX
Debugging lightning components
Mohith Shrivastava
Ā 
PPTX
Introduction to lightning out df16
Mohith Shrivastava
Ā 
Best Practices with Apex in 2022.pdf
Mohith Shrivastava
Ā 
Successfully retrieving metadata from salesforce org using packages
Mohith Shrivastava
Ā 
Deep dive into salesforce connected app part 4
Mohith Shrivastava
Ā 
Successfully creating unlocked package
Mohith Shrivastava
Ā 
Implementing Einstein OCR
Mohith Shrivastava
Ā 
Deep dive into salesforce connected app - part 2
Mohith Shrivastava
Ā 
Deep dive into salesforce connected app part 1
Mohith Shrivastava
Ā 
Org dependent salesforce packages
Mohith Shrivastava
Ā 
Enhance salesforce application performance using lightning platform cache
Mohith Shrivastava
Ā 
Become a rockstar admin
Mohith Shrivastava
Ā 
Modular application development using unlocked packages
Mohith Shrivastava
Ā 
Building Apps On Lightning
Mohith Shrivastava
Ā 
Spring18 Lightning Component Updates
Mohith Shrivastava
Ā 
Introduction To Service Cloud Snapins SDK
Mohith Shrivastava
Ā 
Introduction to einstein analytics sdk for lightning
Mohith Shrivastava
Ā 
Machine learning with salesforce data using prediction io
Mohith Shrivastava
Ā 
Debugging lightning components-SEDreamin17
Mohith Shrivastava
Ā 
Introduction to Analytics Cloud
Mohith Shrivastava
Ā 
Debugging lightning components
Mohith Shrivastava
Ā 
Introduction to lightning out df16
Mohith Shrivastava
Ā 
Ad

Recently uploaded (20)

PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
Ā 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
Ā 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
Ā 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
Ā 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
Ā 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
Ā 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
Ā 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
Ā 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
Ā 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
Ā 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
Ā 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
Ā 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
Ā 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
Ā 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
Ā 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
Ā 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
Ā 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
Ā 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
Ā 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
Ā 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
Ā 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
Ā 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
Ā 
Import Data Form Excel to Tally Services
Tally xperts
Ā 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
Ā 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
Ā 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
Ā 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
Ā 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
Ā 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
Ā 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
Ā 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
Ā 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
Ā 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
Ā 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
Ā 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
Ā 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
Ā 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
Ā 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
Ā 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
Ā 

Build your own dev tools with salesforce cli plugin generator

  • 1. Build your own DEV tools with Salesforce CLI Plugin Generator Mohith Shrivastava Salesforce MVP Technical Architect @Codescience Twitter @msrivastav13
  • 3. Agenda • Introduction To Salesforce CLI • Salesforce CLI Architecture • Introduction To SalesforceDX Plugin • Why Build a Custom Plugin ? • Generating a Custom Plugin • Accessing Salesforce APIs In Custom Plugin • Test , Debug and Release Custom Plugins • Additional Reading
  • 4. Introduction To Salesforce CLI • Salesforce CLI is based on Open Source Heroku Oclif Project • Oclif is a framework for Building Command Line Interface Using Nodejs framework • Install SFDX CLI depending on Operating System using npm or from developer site • To find the version you are on run below sfdx --version
  • 5. Salesforce CLI Architecture Credits - Salesforce Developer Evangelist Team (https://developer.salesforce.com/blogs/2018/05/create-your-first- salesforce-cli-plugin.html)
  • 6. Introduction To SalesforceDX Plugin • list all plugins using sfdx plugins • salesforcedx plugin provides commands to create scratch orgs , authenticate to any orgs , work with salesforce metadata (retrieve , deploy , convert to dx source format) and many more • Docs for every command are part of CLI .You can help of any command with --help • Provides command to generate a custom plugin
  • 7. Why Build a Custom Plugin? • While salesforce covers common use cases there might be one of requirements specific to your need for CI pipeline. • Useful if you want to automate multiple salesforce provided commands in one single command • Handy if you want to build a command that involves operations with multiple orgs • Build your own developer tools using metadata and tooling apis (Desktop tools using Electron or Tools for Editors like VScode)
  • 8. Generating a Custom Plugin • sfdx plugins:generate - Provides ability to scaffold a custom plugin project • Let’s create one now • Link using sfdx plugins:link
  • 10. Accessing Salesforce APIs In Custom Plugin • One can access Salesforce metadata , tooling , analytics , ui , soap and rest using jsforce library provided by the CLI • The custom plugins can use session from the cli or establish new connections using • sfdx-core npm provides utilities for establishing connection,manage orgs • sfdx Command npm provides the utilities like table rendering , spinners
  • 11. Test, Debug and Release • Compile code using yarn prepack • We can debug using vscode node debugger .Run the command and use followed by <command> --dev-suspend • Release a plugin using npm publish
  • 12. DEMO MO-DX-PLUGIN & DX CODE COMPANIONS
  • 13. Additional Reading Plugin development developer guide Salesforce Plugin Generator Project Salesforce Command NPM Salesforce Core NPM Dreamforce 2018 Talk
  • 14. Q & A