https://github.com/mcarvin8/sf-package-list
Convert a Salesforce manifest (package.xml) into a list
https://github.com/mcarvin8/sf-package-list
converter deployment manifest salesforce
Last synced: 5 months ago
JSON representation
Convert a Salesforce manifest (package.xml) into a list
- Host: GitHub
- URL: https://github.com/mcarvin8/sf-package-list
- Owner: mcarvin8
- License: mit
- Created: 2025-03-16T00:13:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-01T12:01:06.000Z (about 1 year ago)
- Last Synced: 2025-04-01T12:44:50.883Z (about 1 year ago)
- Topics: converter, deployment, manifest, salesforce
- Language: TypeScript
- Homepage:
- Size: 998 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# sf-package-list
[](https://www.npmjs.com/package/sf-package-list)
[](https://npmjs.org/package/sf-package-list)
[](https://raw.githubusercontent.com/mcarvin8/sf-package-list/main/LICENSE.md)
[](https://qlty.sh/gh/mcarvin8/projects/sf-package-list)
[](https://qlty.sh/gh/mcarvin8/projects/sf-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.
---
## Install
```bash
sf plugins install sf-package-list
```
---
## What It Does
This plugin lets you:
- Convert a Salesforce `package.xml` to a cleaner, flat **package list**
- Convert a **package list** back into a valid `package.xml`
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.
---
## Examples
package.xml (click to expand)
```xml
Always_Be_Closing
Attention_Interest_Decision_Action
Leads_Are_Gold
CustomLabel
ABC
Glengarry
Mitch_And_Murray
CustomObject
Glengarry.Weak_Leadz__c
Coffee.is_Closer__c
CustomField
unfiled$public/Second_Prize_Set_of_Steak_Knives
EmailTemplate
Glengarry_Leads
Cadillac_Eldorado
StandardValueSet
59.0
```
### Package List
> 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
```
---
## Commands
| 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
```
---
## Troubleshooting
- **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.
---
## Use Case
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`.
---
## Issues
Found a bug or have an idea? [Open an issue](https://github.com/mcarvin8/sf-package-list/issues).
---
## License
[MIT](https://raw.githubusercontent.com/mcarvin8/sf-package-list/main/LICENSE.md)