sfdx-hardis
Toolbox for Salesforce DX, by Cloudity, natively compliant with most platforms and tools
It will allow you to:
- Do with simple commands what could be done manually in minutes/hours
- Define a complete CI/CD Pipeline for your Salesforce project
- Backup Metadatas and monitor any Salesforce org
Please see the full list of commands in Online documentation
sfdx-hardis commands are also available with UI in SFDX Hardis Visual Studio Code Extension
See Dreamforce presentation
Installation
With IDE
You can install Visual Studio Code extension VsCode SFDX Hardis
Once installed, click on in VsCode left bar, and follow the additional installation instructions
As SFDX Plugin
Pre-requisites
- Install Node.js (recommended version)
- Install Salesforce DX by running
npm install @salesforce/cli --global
command line
Plugin installation
sfdx plugins:install sfdx-hardis
For advanced use, please also install dependencies
sf plugins install @salesforce/plugin-packaging
sfdx plugins:install sfdmu
sfdx plugins:install sfdx-git-delta
sfdx plugins:install sfdx-essentials
sfdx plugins:install texei-sfdx-plugin
If you are using CI/CD scripts, use echo y | sfdx plugins:install ...
to bypass prompt.
Docker
You can use sfdx-hardis docker images to run in CI
- Docker Hub
- hardisgroupcom/sfdx-hardis:latest (with latest @salesforce/cli version)
- hardisgroupcom/sfdx-hardis:latest-sfdx-recommended (with recommended @salesforce/cli version, in case the latest version of @salesforce/cli is buggy)
- GitHub Packages (ghcr.io)
- ghcr.io/hardisgroupcom/sfdx-hardis:latest (with latest @salesforce/cli version)
- ghcr.io/hardisgroupcom/sfdx-hardis:latest-sfdx-recommended (with recommended @salesforce/cli version, in case the latest version of @salesforce/cli is buggy)
See Dockerfile
Usage
sfdx hardis:<COMMAND> <OPTIONS>
Articles
Here are some articles about sfdx-hardis
- English
- French
Contributing
Anyone is welcome to contribute to this sfdx-hardis
- Install Node.js (recommended version)
- Install typescript by running
npm install typescript --global
- Install yarn by running
npm install yarn --global
- Install Salesforce DX by running
npm install @salesforce/cli --global
command line - Fork this repo and clone it (or just clone if you are an internal contributor)
- At the root of the repository:
- Run
yarn
to install dependencies - Run
sf plugins link
to link the local sfdx-hardis to SFDX CLI - Run
tsc --watch
to transpile typescript into js everytime you update a TS file
- Run
- Debug commands using
NODE_OPTIONS=--inspect-brk sfdx hardis:somecommand -someparameter somevalue
Dependencies
sfdx-hardis partially relies on the following SFDX Open-Source packages
Contributors
Commands
hardis:auth
Command | Title |
---|---|
hardis:auth:login | Login |
hardis:cache
Command | Title |
---|---|
hardis:cache:clear | Clear sfdx-hardis cache |
hardis:config
Command | Title |
---|---|
hardis:config:get | Deploy metadata sources to org |
hardis:doc
Command | Title |
---|---|
hardis:doc:extract:permsetgroups | Generate project documentation |
hardis:doc:plugin:generate | Generate SFDX Plugin Documentation |
hardis:lint
Command | Title |
---|---|
hardis:lint:access | check permission access |
hardis:lint:metadatastatus | check inactive metadatas |
hardis:lint:missingattributes | check missing description on custom fields |
hardis:lint:unusedmetadatas | check unused labels and custom permissions |
hardis:mdapi
Command | Title |
---|---|
hardis:mdapi:deploy | sfdx-hardis wrapper for sfdx force:mdapi:deploy that displays tips to solve deployment errors. |
hardis:misc
Command | Title |
---|---|
hardis:misc:toml2csv | TOML to CSV |
hardis:org
hardis:package
Command | Title |
---|---|
hardiscreate | Create a new package |
hardisinstall | Install packages in an org |
hardismergexml | Merge package.xml files |
hardisversion:create | Create a new version of a package |
hardisversion:list | Create a new version of a package |
hardisversion:promote | Promote new versions of package(s) |
hardis:project
Command | Title |
---|---|
hardis:project:audit:apiversion | Audit Metadatas API Version |
hardis:project:audit:callincallout | Audit CallIns and CallOuts |
hardis:project:audit:duplicatefiles | Find duplicate sfdx files |
hardis:project:audit:remotesites | Audit Remote Sites |
hardis:project:clean:emptyitems | Clean retrieved empty items in dx sources |
hardis:project:clean:flowpositions | Clean Flow Positions |
hardis:project:clean:hiddenitems | Clean retrieved hidden items in dx sources |
hardis:project:clean:listviews | Replace Mine by Everything in ListViews |
hardis:project:clean:manageditems | Clean retrieved managed items in dx sources |
hardis:project:clean:minimizeprofiles | Clean profiles of Permission Set attributes |
hardis:project:clean:orgmissingitems | Clean SFDX items using target org definition |
hardis:project:clean:references | Clean references in dx sources |
hardis:project:clean:retrievefolders | Retrieve dashboards, documents and report folders in DX sources |
hardis:project:clean:standarditems | Clean retrieved standard items in dx sources |
hardis:project:clean:systemdebug | Clean System debug |
hardis:project:clean:xml | Clean retrieved empty items in dx sources |
hardis:project:configure:auth | Configure authentication |
hardis:project:convert:profilestopermsets | Convert Profiles into Permission Sets |
hardis:project:create | Login |
hardis:project:deploy:sources:dx | Deploy sfdx sources to org |
hardis:project:deploy:sources:metadata | Deploy metadata sources to org |
hardis:project:fix:profiletabs | Fix profiles to add tabs that are not retrieved by SF CLI |
hardis:project:fix:v53flexipages | Fix flexipages for v53 |
hardis:project:generate:gitdelta | Generate Git Delta |
hardis:project:lint | Lint |
hardis:project:metadata:findduplicates | XML duplicate values finder |
hardis:scratch
Command | Title |
---|---|
hardis:scratch:create | Create and initialize scratch org |
hardis:scratch:delete | Delete scratch orgs(s) |
hardis:scratch:pool:create | Create and configure scratch org pool |
hardis:scratch:pool:localauth | Authenticate locally to scratch org pool |
hardis:scratch:pool:refresh | Refresh scratch org pool |
hardis:scratch:pool:reset | Reset scratch org pool |
hardis:scratch:pool:view | View scratch org pool info |
hardis:scratch:pull | Scratch PULL |
hardis:scratch:push | Scratch PUSH |
hardis:source
Command | Title |
---|---|
hardis:source:deploy | sfdx-hardis wrapper for sfdx force:source:deploy that displays tips to solve deployment errors. |
hardis:source:push | sfdx-hardis wrapper for sfdx force:source:push that displays tips to solve deployment errors. |
hardis:source:retrieve | sfdx-hardis wrapper for sfdx force:source:retrieve |
hardis:work
Command | Title |
---|---|
hardis:work:new | New work task |
hardis:work:refresh | Refresh work task |
hardis:work:resetselection | Select again |
hardis:work:save | Save work task |
hardis:work:ws | WebSocket operations |