Registry / devops / sfdmu
library5.6.4jsnpmunverified

SFDMU is an advanced Salesforce CLI plugin for data migration between Salesforce orgs or from CSV files. The current stable version is 5.6.4, released on the new SF CLI plugin architecture, superseding v4.x. It supports org-to-org and CSV-to-org migrations with CRUD operations, handles complex relationships including circular references, and runs entirely locally for security. Key differentiators vs Data Loader or Workbench: single config file, multiple related sObjects per run, field mapping, data anonymization, and composite external ID keys. Published by Salesforce (forcedotcom) on npm, requires Node >=18.

npm install sfdmu
INSTALL
IMPORT
SIG · SFDMU
S
sfdmu
devopsjavascriptv5.6.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

run
sf sfdmu run
sfdx sfdmu:run
v5 uses 'sf' CLI, not 'sfdx'. The plugin is installed as a CLI plugin, not a library import.
SFDX_ORG_USERNAME
export SFDX_ORG_USERNAME="myorg"
export SFDX_ORG_USERNAME=myorg
The environment variable is used for default source/target orgs. Ensure no extra spaces or quotes.
export.json
{"objects": [{"name": "Account", "fields": "all", "operation": "upsert"}]}
{"objects": [{"name": "Account"}]}
The config file is named 'export.json' and must define fields and operation for each object.

Shows full workflow: plugin install, org auth, config file creation, and running migration with sfdmu.

// 1. Install the plugin sf plugins install sfdmu // 2. Authorize source and target orgs (if not already) sf org login web --alias sourceOrg sf org login web --alias targetOrg // 3. Create export.json configuration file: echo '{ "objects": [ { "name": "Account", "fields": "all", "operation": "upsert" }, { "name": "Contact", "fields": "all", "operation": "upsert", "externalId": "Email" } ] }' > export.json // 4. Run migration sf sfdmu run --sourceusername sourceOrg --targetusername targetOrg --file export.json
Debug
Known issues
breakingv5 requires SF CLI (sf) instead of legacy SFDX CLI (sfdx). Commands like 'sfdx sfdmu:run' no longer work.
fix
Use 'sf sfdmu run' and install via 'sf plugins install sfdmu' instead of 'sfdx plugins:install sfdmu'.
affects: >=5.0
deprecatedv4.x is deprecated and no longer receives updates. It still uses the old sfdx CLI.
fix
Upgrade to v5: uninstall the old plugin via 'sfdx plugins:uninstall sfdmu' then install via 'sf plugins install sfdmu'.
affects: >=4.0 <5.0
gotchaThe export.json file must contain 'fields' property for each object; omitting it may cause unexpected behavior.
fix
Always specify 'fields': 'all' or pass a list of field API names for each object in the config.
affects: *
gotchaEnvironment variable 'SFDX_ORG_USERNAME' sets the default source org; if both source and target are set, it's ignored.
fix
Use '--sourceusername' and '--targetusername' flags explicitly to avoid confusion.
affects: *
Errors
Common errors & fixes
ERROR: No such command 'sfdmu:run'.
Using old SFDX command syntax with new v5 plugin.
fix
Use 'sf sfdmu run' instead of 'sfdx sfdmu:run'.
Error: Plugin not found: sfdmu
Plugin not installed or installed using wrong CLI.
fix
Install with 'sf plugins install sfdmu' (not 'sfdx plugins:install sfdmu').
Invalid config file: Missing required property 'objects'.
export.json is malformed or missing the 'objects' array.
fix
Ensure export.json contains a top-level 'objects' array with at least one object definition (name, fields, operation).
ERROR: Node.js minimum version required is 18
Using an older Node.js version.
fix
Update Node.js to version 18 or higher.
Upgrade
Version history
5.6.4latest on npm
Audit
Dependencies
@salesforce/corerequiredCore Salesforce CLI library for auth, connection, and logging
@salesforce/sf-plugins-corerequiredBase classes and utilities for SF CLI plugins
Agent activity
8 hits · last 30 days
node
6
Amazon
1
Resources
packagesfdmu
sfdmu — npm install sfdmu · libregistry