Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Salesforce MDAPI DiffNew to Visual Studio Code? Get it now.
Salesforce MDAPI Diff

Salesforce MDAPI Diff

Ali AKil

|
58 installs
| (0) | Free
Compare local Salesforce metadata against your org with side-by-side diffs. Single-file and folder diff with interactive tree view, XML normalization, export reports, and one-click apply. 160+ metadata types supported. No telemetry — org content stays in memory.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MDAPI Diff

Professional Salesforce metadata comparison tool for VS Code. Compare individual files or entire folders against your Salesforce org with side-by-side diffs, a tree view for folder results, and one-click apply.

Features

  • Single File Diff: Right-click any metadata file to compare with the org version
  • Folder Diff: Compare an entire folder against the org — results displayed in an interactive tree view
  • Tree View Panel: Browse folder diff results grouped by status (Added/Modified/Removed/Unchanged) or metadata type, with filter and search
  • Apply Org Changes: One-click to pull the org version down to your local file, with automatic backup
  • Export Reports: Export folder diff results as JSON, CSV, or a text summary
  • XML Normalization: Sorts XML elements, strips volatile attributes (timestamps, user refs), and normalizes whitespace to reduce false-positive diffs — especially useful for Profiles and Permission Sets
  • Smart Org Detection: Automatically finds the Salesforce CLI even when VS Code doesn't inherit your shell PATH
  • Private Files: Org content stays in memory via virtual documents — never written to disk
  • Cancellation Support: Cancel any long-running operation with ESC; temp files, CLI processes, and virtual documents are cleaned up automatically
  • Smart Caching: Caches the connected org list to reduce CLI calls

Supported Metadata Types

160+ Salesforce metadata types including:

  • Apex Classes, Triggers, Pages, Components
  • Custom Objects, Fields, Validation Rules
  • Flows, Workflows, Approval Processes
  • Profiles, Permission Sets, Permission Set Groups
  • Layouts, Flexipages, Lightning Web Components, Aura
  • Reports, Dashboards, Email Templates
  • Named Credentials, Connected Apps, Auth Providers
  • And many more — plus source-format -meta.xml files

Getting Started

  1. Install the extension from the VS Code Marketplace
  2. Open a Salesforce project in VS Code
  3. Authenticate with your org: sf org login web
  4. Single file: Right-click any metadata file → MDAPI Diff
  5. Folder: Right-click any folder → MDAPI Diff: Compare Folder with Org

Requirements

  • Salesforce CLI (sf) installed
  • Authenticated connection to at least one Salesforce org

Commands

Command Description
MDAPI Diff Compare a local file with its org version
MDAPI Diff: Compare Folder with Org Compare all metadata in a folder against the org
Select Salesforce Org Choose which org to compare against
Refresh Connected Orgs Re-fetch the list of authenticated orgs
Toggle Tree Grouping Switch folder diff tree between status and type grouping
Toggle Changed Only Show only modified/added/removed components in the tree
Export Diff Report Export folder diff results (JSON / CSV / Summary)
Apply All Org Changes to Local Batch-apply all org versions to local files

Extension Settings

Setting Default Description
mdapiDiff.enabled true Enable/disable the extension
mdapiDiff.apiVersion 62.0 Salesforce API version
mdapiDiff.ignoreWhitespace true Ignore whitespace in diffs
mdapiDiff.normalizeXml true Normalize XML for cleaner diffs
mdapiDiff.removeVolatileElements true Strip timestamps/user refs from comparisons
mdapiDiff.sortXmlElements true Sort XML elements for stable comparison
mdapiDiff.createBackups true Create backups before applying org changes
mdapiDiff.enableCancellation true Enable cancellation for long operations
mdapiDiff.autoSelectSingleOrg true Auto-select when only one org is connected
mdapiDiff.orgCacheDuration 300000 Org list cache duration (ms)
mdapiDiff.folderDiff.maxConcurrency 3 Max concurrent chunk retrievals
mdapiDiff.folderDiff.chunkSize 10 Components per retrieval chunk
mdapiDiff.folderDiff.inclusiveMode false Include org-only components (slower)
mdapiDiff.logLevel INFO Log level (DEBUG, INFO, WARN, ERROR)

Release Notes

1.1.1

  • Fix org selection failing for users whose VS Code doesn't inherit shell PATH
  • Fix parsing of new SF CLI format (sf org list returning flat array)
  • Filter out orgs with expired/revoked tokens instead of showing them
  • Improved error messages with actual CLI output instead of generic text
  • Fixed Report Issue URL

1.1.0

  • Folder diff with interactive tree view (group by status or type)
  • XML normalization: sort elements, remove volatile attributes, normalize whitespace
  • Export diff reports (JSON, CSV, Summary)
  • Batch apply org changes
  • Component classification (Added / Modified / Removed / Unchanged)
  • Chunked retrieval with configurable concurrency

1.0.5

  • Initial release with single-file diff, org selection, cancellation support

Enjoy comparing your Salesforce metadata!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft