Second-generation managed packaging (2GP) ushers in a new way for AppExchange partners to develop, distribute, and manage their apps and metadata.
You can use 2GP to organize your source, build small modular packages, integrate with your version control system, and better utilize your custom Apex code. With version control being the source of truth, there are no packaging or patch orgs.
You can execute all packaging operations via Salesforce CLI, or automate them using scripts. Submit second-generation managed packages for security review, and list them on AppExchange.
Create Second-Generation Managed Packages
Verify the following before 2GP Packages
Enable Dev Hub in Your Org
Enable Second-Generation Managed Packaging
Install CLI
Create and Register Your Namespace
The maximum number of 2GP package versions that you can create from a Dev Hub per day is the same as your daily scratch org allocation. To request a limit increase, contact Salesforce...