Generate apex code to describe commonly used constants like recordtypes and picklist values
npm install sfdx-constants to install from npm registry
npm link.
sfdx-constants as a cli command.
-p --picklists |Must set this flag or the recordtypes flag, or both. Generates picklist constants for one or more SObjects|
-r --recordtypes|Must set this flag or the picklists flag, or both. Generates Recordtypes for all non-packaged recordtypes present in orgs|
-d --dir |List the path of the output directory, defaults to _force-app/main/default/classes/_|
-wp --with-packages|Includes package recordtypes when generating recordtypes|
-n --name |The output file and class name. Defaults to _Constants_|
-h --help|Help menu|
-ws --with-standard|Includes standard fields in the output. This is disabled by default, set this flag to enable it|
.sfdx-constants-ignore with a line delimited, dot-notation string of an sobject and field to indicate any picklist values you wish to ignore.
Account.PersonMailingStateCode
Account.Custom_Field__c