Package.xml Generator is a Visual Studio Code extension that queries a Salesforce org for metadata types and components, allows users to select components, and generates a package.xml file for deployment or retrieval. It uses a DataTables.js-powered webview for interactive selection and supports Salesforce authentication via username or an access.json file.
Features
Metadata Querying: Retrieves metadata types (e.g., ApexClass, CustomObject) and components from a Salesforce org using the Tooling API.
Interactive Selection: Displays metadata in a webview with DataTables.js for sorting, searching, and checkbox selection.
Package.xml Generation: Creates a package.xml file based on selected components, saved to a configurable output directory.
Authentication: Supports Salesforce username (via Salesforce CLI) or an access.json file with accessToken and instanceUrl.
Context Menu: Trigger generation from XML, .cls, .trigger, or .object files in the Explorer.
Logging: Detailed logs in the Package.xml Generator Output channel.
Installation
Install from VS Code Marketplace:
Search for Package.xml Generator in the VS Code Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS).