Newer Version Available

This content describes an older version of this product. View Latest

Create a Package

A package is a top-level container that holds important details about the app or package: the package name, description, and associated namespace.

You supply the package details in the package descriptor section of your sfdx-project.json project configuration file. You can associate multiple second-generation packages with a single Dev Hub org. Unlike first-generation managed packages, a second-generation package has no packaging org.

Each package can have many versions. Because you can create multiple second-generation packages with a single org, you can use the Salesforce CLI to see a list of all packages associated with your Dev Hub org.

It’s helpful to review the list before you create a package so you can see previous versions and confirm package details like the status or ID.

Authorize your Dev Hub org, and run the force:package:list command.

1sfdx force:package:list
1NAMESPACE PREFIX NAME         ID   DESCRIPTION         PACKAGE TYPE PACKAGE ALIAS 							       						        
2──────────────── ──────────   ──── ─────────────────   ──────────── ─────────────                    
3acme             exp-mgr      0Ho  Exp Manager         Unlocked     exp-mgr 
4                 exp-mgr-util 0Ho  Exp Manager Utils   Unlocked     exp-mgr-util