Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Salesforce Metadata ComparatorNew to Visual Studio Code? Get it now.
Salesforce Metadata Comparator

Salesforce Metadata Comparator

SiddiquiDevelopers

|
3 installs
| (0) | Free
Compare Salesforce metadata between orgs with deep attribute-level comparison and side-by-side diff viewer
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Salesforce Metadata Comparator

A powerful VS Code extension for comparing Salesforce metadata between orgs with deep attribute-level analysis and an intuitive side-by-side diff viewer.

Features

✨ Deep Metadata Comparison

  • Compare CustomObjects, CustomFields, ApexClasses, Flows, Layouts, Profiles, and more
  • Attribute-level diff detection (field types, lengths, picklist values, method signatures, etc.)
  • Intelligent change detection for arrays (added/removed items in picklists, flow nodes, etc.)

🎨 Advanced Diff Viewer

  • Side-by-side comparison table for modified items
  • Expandable/collapsible panels for each metadata type
  • Color-coded highlighting (green = added, red = removed, yellow = modified)
  • Metadata type icons and change badges

⚡ Performance & Convenience

  • Local caching for faster repeat comparisons
  • Metadata type selection (choose what to compare)
  • Export results to JSON
  • Modern Salesforce CLI (sf) integration

Prerequisites

  • Salesforce CLI (SFDX) must be installed
  • Authenticated Salesforce orgs using sf org login

Installation

  1. Clone this repository
  2. Run npm install
  3. Press F5 to run the extension in development mode

Usage

Authenticate to Salesforce

First, authenticate your orgs using Salesforce CLI:

sf org login web --alias myorg1
sf org login web --alias myorg2

Compare Orgs

  1. Open Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  2. Run Metadata Comparator: Compare Orgs
  3. Select source org
  4. Select target org
  5. View the diff results in the webview panel

Export Results

  1. After comparing orgs, run Metadata Comparator: Export Diff Results
  2. Choose a location to save the JSON file

Clear Cache

Run Metadata Comparator: Clear Cache to remove locally cached metadata.

Project Structure

metadata-comparator/
├── src/
│   ├── extension.ts              # Main extension entry point
│   ├── services/
│   │   ├── sfdxService.ts        # SFDX CLI integration
│   │   ├── compareService.ts     # Metadata comparison logic
│   │   └── storageService.ts     # Local cache management
│   ├── utils/
│   │   └── xmlParser.ts          # XML to JSON conversion
│   └── webview/
│       └── diffViewer.ts         # Webview UI generator
├── out/                          # Compiled JavaScript
├── package.json                  # Extension manifest
├── tsconfig.json                 # TypeScript configuration
└── README.md                     # This file

Supported Metadata Types

  • ✅ Custom Objects
  • ✅ Custom Fields
  • ✅ Apex Classes
  • ✅ Apex Triggers
  • ✅ Flows
  • ✅ Page Layouts
  • ✅ Profiles
  • ✅ Permission Sets
  • ✅ Validation Rules
  • ✅ Workflow Rules
  • ✅ Custom Tabs

Roadmap

  • [ ] Git-based comparison
  • [ ] Metadata API integration (as alternative to CLI)
  • [ ] Export to CSV/Excel
  • [ ] Deployment package generation from diff
  • [ ] Change history tracking

Development

Build

npm run compile

Watch Mode

npm run watch

Run Extension

Press F5 in VS Code to launch the extension development host.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft