A powerful Salesforce CLI plugin and Node.js library to effortlessly generate, clean up, and manage package.xml and destructiveChanges.xml manifests directly from your Salesforce orgs or from Git changes in your SF projects. Unlock faster, safer, and smar
npm install @jayree/sfdx-plugin-manifestA powerful Salesforce CLI plugin and Node.js library to effortlessly generate, clean up, and manage package.xml and destructiveChanges.xml manifests directly from your Salesforce orgs or from Git changes in your SF projects. Unlock faster, safer, and smarter Salesforce deployments.




@jayree/sfdx-plugin-manifest is a Salesforce CLI plugin and Node.js library designed to streamline metadata management and deployment processes. By leveraging Salesforce's native @salesforce/source-deploy-retrieve toolkit and @salesforce/source-tracking, it ensures compatibility with Salesforce standards. The plugin is particularly effective for incremental deployments and Git-based change tracking, making it a valuable tool for modern Salesforce development workflows.
- Dual Integration: Use it as a Salesforce CLI plugin or integrate it into Node.js applications for programmatic workflows.
- Native Compatibility: Built on @salesforce/source-deploy-retrieve and @salesforce/source-tracking, ensuring alignment with Salesforce's Metadata API standards. Unlike tools with custom metadata handling, this plugin leverages native frameworks for reliability.
- Git-Enhanced Deployments: Simplifies deployment processes by analyzing Git changes and generating precise manifests.
- Automated Manifest Creation: Automatically generate package.xml files for streamlined deployments.
- Intelligent File Tracking: Detects and excludes renamed or moved files for accurate metadata tracking.
Managing Salesforce metadata across teams and environments can be challenging. This plugin simplifies workflows by automating manifest creation and focusing on incremental deployments based on Git changes. It is ideal for:
- Collaborative Development: Streamlines workflows for teams sharing metadata repositories.
- CI/CD Pipelines: Ensures accurate and efficient deployments in automated pipelines.
- Error Reduction: Automates tasks prone to manual errors, like manifest creation.
Both @jayree/sfdx-plugin-manifest and sfdx-git-delta are tools designed to simplify Salesforce metadata deployments. However, their technological basis differs:
- @jayree/sfdx-plugin-manifest is built on Salesforce's native @salesforce/source-deploy-retrieve, ensuring full compatibility with Salesforce Metadata API standards.
- sfdx-git-delta uses custom metadata handling mechanisms, which are not directly tied to Salesforce's native APIs and frameworks, potentially introducing additional complexity.
By prioritizing native compatibility and programmatic flexibility, @jayree/sfdx-plugin-manifest offers a reliable solution for modern Salesforce development. While both tools are specialized for CI/CD workflows, sfdx-git-delta provides additional support for a small number of specific edge use cases.
> Note:
>
> The jayree manifest git diff command and the SDR-extra library use the isomorphic-git module, which does not support system-wide or global Git configurations. If you are a Windows user with autocrlf enabled, you must set this configuration locally within your repository to ensure optimal performance.
>
> To configure it, run the following command in your repository:
>
> ``powershell`
> git config --local core.autocrlf true
>
Install the plugin using the Salesforce CLI:
`bash`
sf plugins install @jayree/sfdx-plugin-manifest
Add the library to your Node.js project:
`bash`
npm install @jayree/sfdx-plugin-manifest
Initialize a Component Set from Git Commits:
`typescript
import { ComponentSetExtra } from '@jayree/sfdx-plugin-manifest/lib/SDR-extra/index.js';
(async () => {
const fromSingleCommit = await ComponentSetExtra.fromGitDiff(['HEAD~1']);
const fromMultipleCommits = await ComponentSetExtra.fromGitDiff([
'commit1',
'HEAD'
]);
})();
`
* sf jayree manifest cleanup
* sf jayree manifest generate
* [sf jayree manifest git diff REF1 [REF2]](#sf-jayree-manifest-git-diff-ref1-ref2)
Removes those tags from a manifest file that are present in a second manifest file.
`
USAGE
$ sf jayree manifest cleanup -f
FLAGS
-f, --file=
-x, --manifest=
GLOBAL FLAGS
--flags-dir=
--json Format output as json.
DESCRIPTION
Removes those tags from a manifest file that are present in a second manifest file.
Use this command to remove components or metadata types from a manifes file.
If the 'cleanup' manifest file (--file) doesn't exist, a template file is created, which can then be modified.
EXAMPLES
$ sf jayree manifest cleanup --manifest=package.xml --file=packageignore.xml
`
_See code: src/commands/jayree/manifest/cleanup.ts_
Generate a complete manifest file form the specified org.
`
USAGE
$ sf jayree manifest generate -o
[--include-flow-versions] [-f
FLAGS
-a, --exclude-all Exclude all packages from output.
-c, --match-case Enable 'match case' for the quickfilter.
-f, --file=
-o, --target-org=
configuration variable is already set.
-q, --quick-filter=
-w, --match-whole-word Enable 'match whole word' for the quickfilter.
-x, --exclude-managed Exclude managed packages from output.
--api-version=
--include-flow-versions Include flow versions as with api version 43.0.
GLOBAL FLAGS
--flags-dir=
--json Format output as json.
DESCRIPTION
Generate a complete manifest file form the specified org.
Use this command to generate a manifest file based on an existing org.
EXAMPLES
$ sf jayree manifest generate --targetusername myOrg@example.com
`
_See code: src/commands/jayree/manifest/generate.ts_
Create a project manifest and destructiveChanges manifest that lists the metadata components you want to deploy or delete based on changes in your git history.
`
USAGE
$ sf jayree manifest git diff REF1 [REF2] [--json] [--flags-dir
ARGUMENTS
REF1 Base commit or branch.
[REF2] Commit or branch to compare to the base commit.
FLAGS
-d, --source-dir=
-r, --output-dir=
--api-version=
--destructive-changes-only Create a destructiveChanges manifest only.
GLOBAL FLAGS
--flags-dir=
--json Format output as json.
DESCRIPTION
Create a project manifest and destructiveChanges manifest that lists the metadata components you want to deploy or
delete based on changes in your git history.
Use this command to create a manifest and destructiveChanges manifest file based on the difference (git diff) of two
git refs.
You can use all ways to spell
EXAMPLES
Uses the changes between two arbitrary
$ sf jayree manifest git diff
$ sf jayree manifest git diff
Uses the changes on the branch containing and up to the second
$ sf jayree manifest git diff
Uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1).
$ sf jayree manifest git diff branchA..branchB
Uses the diff of what is unique in branchB (REF2).
$ sf jayree manifest git diff branchA...branchB
Specify the flags before or after the REF args
$ sf jayree manifest git diff --output-dir package
$ sf jayree manifest git diff
If you specify the 'source-dir' flag before the REF args, use '--' to separate the args from the 'source-dir'
values.
$ sf jayree manifest git diff --source-dir force-app --
FLAG DESCRIPTIONS
-d, --source-dir=
The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder
(in which case the operation is applied to all metadata types in the directory and its subdirectories).
You can specify this flag more than once.
-r, --output-dir=
The location can be an absolute path or relative to the current working directory.
--destructive-changes-only Create a destructiveChanges manifest only.
Use this flag to create a 'destructiveChanges.xml' and a blank 'package.xml'.
`
_See code: src/commands/jayree/manifest/git/diff.ts_
There are some benchmark.js checks to get a baseline for jayree manifest git diff` command performance.
https://jayree.github.io/sfdx-plugin-manifest/perf-Linux/
https://jayree.github.io/sfdx-plugin-manifest/perf-Windows/