Terminal Utilities to automate and expedite frequent sfdx cli actions This repo is about using python with terminals to speed up some frequent tasks using sfdx cli during development of a salesforce 2nd Generation Project. Repo is primarily meant to be used with terminal and not any GUI aids but python is chosen over shells like bash so as to promote code portability among different shells and operating systems.
Setup for project:
-
Install a version of python 3. I usually get around it using conda and set it as default.
-
Install pandas. So far pandas has been used in addition to built-ins. If you are using conda use
conda install pandas
, if not set up pip and usepip install pandas
.You may have to install additional dependencies beforehand in latter case. -
Project assumes contributors can set up sfdx projects for testing. Help guide for the same.
Examples of some cli operations:
-
Retrieval or deployment of metadata during a 2GP development using manifest files. Currently a manifest present in the designated manifest folder which is also last modified one can be identified by the system and used for metadata retrieval and deployment. Support for any manifest of choice will also be added.During the same operation target org can be mentioned or not mentioned( default org for the project is used.)
-
Manifest present in designated manifest folder can be merged i.e. merged manifest will have all the types and members of chosen manifests. Usage of manifest promotes quick retrievals and deployments in succcession when metadata of different types are involved which is even more helpful in deploying metadata to multiple orgs.
Near Future (on Priority) Enhancements:
-
Complete bulkInsert operation to deploy flat files using bulk API 2.0
-
Re-write path methods using pathlib to make os portable
-
Add optimum and precise comments to already existing code.
-
Add unit tests for already existing code.