---
schema_version: "1"
id: 247a8a9f154fa7b7a24679daeb76b7c6f62acd671832e3a2e9c9f49b2331248d
title: Generate a Manifest and Retrieve Metadata From the Org
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/devops_center_setup_seed_repo_generate_manifest.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.devops_center_setup_seed_repo_generate_manifest.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 140ac838280828797f81103b870f934f4af68fbb145e4823beb7d31c43ff2698
description: In Salesforce Extensions for VS Code, use Salesforce CLI to generate the manifest that contains the metadata types you want to retrieve from the production org.
products:
  - Salesforce Platform
release: "264"
---
# Generate a Manifest and Retrieve Metadata From the Org

In Salesforce Extensions for VS Code, use Salesforce CLI to generate the manifest that contains the metadata types you want to retrieve from the production org.

Before you begin, [authorize the source org in Salesforce Extensions for VS Code](https://help.salesforce.com/s/articleView?id=platform.devops_center_setup_seed_repo_auth_source_org.htm&release=264.0.0&type=5 "In Salesforce Extensions for VS Code, connect the release (production) org or source org that contains the metadata that you want to add to the source control repository.").

1. In VS Code, open the Terminal.
2. Use Salesforce CLI to generate a comprehensive manifest file that lists all the metadata types that the source org contains.
    
    ```
    sf project generate manifest --output-dir ./manifest --from-org <orgname/alias>
    ```
    
    The `--output-dir` flag creates the package.xml file in a new directory called manifest. The manifest directory is where Salesforce Extensions for VS Code expects to find the package.xml file, so it provides a logical list of commands in the context menu.
3. In VS Code Explorer, in the manifest folder, right-click the package.xml file, then select **SFDX: Retrieve Source in Manifest From Org**.
    
    If the retrieve operation fails, you’re trying to retrieve too many files at once and you’ve exceeded the file limits for the retrieval. Split your package.xml into smaller files, and then run this command for each manifest file. For more information on retrieval limits, see [Metadata API Guide: retrieve()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_retrieve.htm).
    
    After the files are retrieved, the project files are now in the DX project folder on your local machine.
4. In VS Code Explorer, expand the force-app folder to see the org metadata in your local DX project.
    
    If you’re using the default VS Code UI configuration, new files appear as green in the Explorer.
    
    ![New files added in VS Code Explorer are green.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-devops_center_setup-264-0-0-production-enus/4741b024-a514-4bcf-8f2f-9d308932d2de/devops_center_setup/images/vscode-new-files-added.png)

Next: [Add and commit the metadata files](https://help.salesforce.com/s/articleView?id=platform.devops_center_setup_seed_repo_add_files_to_repo.htm&release=264.0.0&type=5 "In Salesforce Extensions for VS Code, add the files you retrieved from your org to the DevOps Center project’s GitHub repository. The GitHub repository has the same name as the DevOps Center project name. After you add the files to the source control repository, the process creates the main branch, which you’ll associate with your release environment. Other branches for pipeline stages are created when you build your pipeline in DevOps Center.") to the DevOps Center project’s GitHub repository.

#### See Also

- [_Metadata API Developer Guide_: Sample package.xml Manifest Files](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm)
- [_Metadata API Developer Guide_: Metadata Types](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_types_list.htm)