Create a Second-Generation Managed Package
To create a package, change to the project directory in the CLI. The package name you enter becomes the package alias, and is automatically added to the project file. You can choose to designate an active Dev Hub org user to receive email notifications for Apex gacks, and install, upgrade, or uninstall failures associated with your packages. For definitions of each parameter shown here, see sf package create in the Salesforce CLI Reference Guide.
1sf package create --name "Expenser App" --package-type Managed \
2--path "expenser-main" --target-dev-hub my-hub --error-notification-username \
3me@devhub.orgThe package details you supply when you create a package are automatically added to your sfdx-project.json project configuration file.
Metadata Limits in Second-Generation Managed Packages
| Metadata in package | Limit |
|---|---|
| Number of Metadata Files | 10,000 files |
| Total Metadata File Size | 600 MB |
Update Details about a Package
1sf package update --package "Expense App" --name "Expense Manager App" \
2--description "The Winter ’21 release is packed with an exciting set of features." \
3--error-notification-username me2@devhub.orgAfter you promote at least one package version to the released state, you can also use the sf package update CLI command to recommend a specific version of the package to your subscribers. See Recommend a Specific Package Version to Your Subscribers for more information.