Convert Salesforce manifest files (package.xml) into list format.
npm install sf-package-listsf-package-list




A Salesforce CLI plugin that helps you convert package.xml files to a simple, human-readable list format—and back again.
This makes working with metadata easier for admins and developers, especially in version control systems, automation pipelines, or anywhere you want to quickly review or edit what's being deployed.
---
``bash`
sf plugins install sf-package-list
---
This plugin lets you:
- Convert a Salesforce package.xml to a cleaner, flat package listpackage.xml
- Convert a package list back into a valid
Both directions are supported. The list format uses TypeName: member1, member2 per line—easy to read, edit, and diff. No XML knowledge required. Works well with version control and CI/CD pipelines.
---
package.xml (click to expand)
`xml`
> Separate multiple metadata members using a comma.
``
CustomLabel: Always_Be_Closing, Attention_Interest_Decision_Action, Leads_Are_Gold
CustomObject: ABC, Glengarry, Mitch_And_Murray
CustomField: Glengarry.Weak_Leadz__c, Coffee.is_Closer__c
EmailTemplate: unfiled$public/Second_Prize_Set_of_Steak_Knives
StandardValueSet: Glengarry_Leads, Cadillac_Eldorado
Version: 59.0
---
| Command | Description |
| -------------------------------------------------- | -------------------------- |
| sf sfpl list -x package.xml [-l output.txt] [-n] | Convert package.xml → list |sf sfpl xml -l list.txt [-x package.xml] [-n]
| | Convert list → package.xml |
Flags: -x / --package-xml — path to package.xml. -l / --package-list — path to list file. -n / --no-api-version — exclude API version from output.
Quick start:
`bash`
sf sfpl list -x package.xml -l package.txt
sf sfpl xml -l package.txt -x package.xml
---
- Invalid package.xml — When converting package.xml to list format, any errors from @salesforce/source-deploy-retrieve (e.g. unknown metadata types, parse errors) are included in the warning message. You'll get a warning and empty output; confirm the file is valid or check the warning for SDR details.
- Invalid list lines — Each invalid line is skipped with a warning showing the line content. Output continues for valid lines.
The plugin does not fail on invalid or missing inputs; it produces empty output instead.
Note: A missing metadata type definition can also occur if the type is newer than the @salesforce/source-deploy-retrieve version bundled with this plugin. Upgrading the plugin may resolve the issue for newly released metadata types.
---
Works well with sfdx-git-delta and CI/CD. Instead of copying package.xml, developers can paste metadata in list format—e.g., in merge request descriptions or CI variables. Also useful for destructive deployments: paste a list into a form field and convert to destructiveChanges.xml`.
---
Found a bug or have an idea? Open an issue.
---