---
schema_version: "1"
id: efca2cf484aecc8de1afb8a7946479bc65fec70e494311ffdc6bb30b04eb521f
title: Package Development Model
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/codebuilder/guides/files/development-models/codebuilder-package-dev-model.md
canonical_url: https://developer.salesforce.com/docs/platform/code-builder/guide/codebuilder-package-dev-model.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d4fb8e8d7ca60c73219ab5ae84cee85f3e6edaa9a2024c4e01c5d5cde9661563
products:
  - Agentforce Vibes IDE
  - salesforcedx
---
# Package Development Model

Use the Package Development model to develop against orgs with source tracking, such as scratch orgs. This model tracks the changes you make on your local workstation and in your default development org.

In the Org Development model, your Salesforce org’s monolith of unpackaged metadata contains all the metadata that belongs to a custom app or extension. Because that metadata isn’t isolated or organized, it can be difficult to understand, upgrade, and maintain as the complexity of your org grows.

In the Package Development model, you can organize your unpackaged metadata in your production org into well-defined packages in a DX project by creating multiple package directories. Your end goal is to create packages using those directories that are versionable, easy to maintain, update, install, and upgrade.

For more information, see the [Package Development Model](https://trailhead.salesforce.com/content/learn/modules/sfdx_dev_model) Trailhead module.

To develop with this model:

1. From the Command Palette, run **SFDX: Create Project**.
   Alternatively, to work on an existing project, choose **File** > **Open** and navigate to the project directory. Before you open an existing project in VS Code, make sure that your project has a `sfdx-project.json` file and that metadata is in source format.
   - For information on the project structure, see [Project Setup](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_workspace_setup.htm) in the _Salesforce DX Developer Guide_.
   - You can work with source-tracked orgs only if your metadata is in source format.
2. In the status bar, click Org Picker to open the Command Palette.
3. If you don’t have a Dev Hub, see [Enable Dev Hub in Your Org](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_enable_devhub.htm) in the _Salesforce DX Setup Guide_.
4. Run **SFDX: Authorize an Org**.
5. Click Org Picker and run **SFDX: Create a Default Scratch Org** to create and set a scratch org as your default org for development. For more information, see [Scratch Orgs](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.htm) in the _Salesforce DX Developer Guide_.
6. Select the scratch org shape, enter an alias, and enter the duration when the scratch org expires. The Org Picker now shows the alias provided for the scratch org. Click the browser icon in the status bar to open the default org you are working against.
   To change the default org you’re developing against, click the Org Picker and select a different org. Or, open the Command Palette and run **SFDX: Authorize an Org** or **SFDX: Create a Default Scratch Org**.

When you use the package development model, it’s simple to keep your local project and default development org in sync. Because you deploy your changes to other orgs using packaged sets of metadata, there’s no need to manually track your changes.
VS Code is context aware that you are working in a scratch org and provides only push and pull commands, not commands to retrieve and deploy source.

## Push Source

To push your source to the default scratch org, run **SFDX: Push Source to Default Scratch Org**.

If you want the changes in the project to overwrite changes in the scratch org, run **SFDX: Push Source to Default Scratch Org and Override Conflicts**.

## Pull Source

After you make changes in your scratch org, run **SFDX: Pull Source from Default Scratch Org** to update your project.

If you want the changes in the scratch org to overwrite changes in the project, run **SFDX: Pull Source from Default Scratch Org and Override Conflicts**.

## View Changes

Before you push local changes to the scratch org or pull remote changes to the local project, you can see the changes in the Output panel. To do so, run **SFDX: View Changes in Default Scratch Org** from the Command Palette.


## See Also

- [Source Format](https://developer.salesforce.com/docs/platform/code-builder/deploy-retrieve/codebuilder-source-format.md)
- _Salesforce Developers Blog_: [Choose the Right Salesforce Org for the Right Job](https://developer.salesforce.com/blogs/2024/05/choose-the-right-salesforce-org-for-the-right-job)
