
Creating a managed package in Salesforce in 2026 means second-generation packaging (2GP). Dev Hub, a registered namespace, the Salesforce CLI, scratch orgs. That's the path Salesforce recommends. It's also the part that pins the work to a Salesforce developer.
Pro Tip
TL;DR: Create a managed package by enabling Dev Hub, registering a namespace, building components, and packaging with 2GP via the Salesforce CLI (Salesforce 2GP Guide). For the AppExchange, add the security review and listing. No-code platforms generate the package without the CLI.
How to create one
The modern way is second-generation packaging (2GP). Salesforce recommends it for all new managed packages.
1/ Enable Dev Hub in your org. This feature lets you create and manage 2GP packages, versions, and scratch orgs (Salesforce) 2/ Register a namespace in a namespace org and link it to your Dev Hub's Namespace Registry 3/ Build your components (objects, fields, Apex, Lightning Web Components, flows) as source 4/ Create the package and a version with the Salesforce CLI, then install and test in a scratch org 5/ Promote the version to released so it can be installed by customers
What you need before you start
Three prerequisites gate the build. An org with Dev Hub enabled. A registered namespace. The Salesforce CLI set up for source-driven development. These are exactly the pieces that make this a developer task, because each step runs through the CLI and Setup rather than a point-and-click flow.
Pro Tip
The namespace and Dev Hub setup is where non-developers get stuck. It's not conceptually hard. It assumes comfort with the Salesforce CLI and scratch orgs that admins and founders usually don't have.
Creating a managed package for the AppExchange
For AppExchange distribution, the package itself is the same. You add two steps. After you have a released managed package version, you submit it for the security review ($999 per submission for paid apps) and create your listing in the Partner Console. The packaging work doesn't change between an internal managed package and an AppExchange one. The review and listing are what make it distributable. See our guide on getting your app on the AppExchange.
The no-code way
If you don't write Apex or use the Salesforce CLI, a no-code platform creates the managed package for you. You describe the app, and the platform generates the components, registers the namespace, and assembles a 2GP managed package, handling Dev Hub and the CLI steps in the background. Appnigma does this and prepares the output for the security review. See building a managed package without a Salesforce developer.
Frequently Asked Questions
What are the steps to create a managed package in Salesforce?
Enable Dev Hub, register a namespace, build your components, create a 2GP package and version with the Salesforce CLI, test in a scratch org, and promote the version to released (Salesforce 2GP Guide).
How do I create a managed package for the AppExchange?
Build the managed package the same way (2GP), then submit it for the security review ($999 per submission for paid apps) and create your listing in the Partner Console. The packaging is identical. The review and listing make it distributable.
Do I need the Salesforce CLI to create a managed package?
For the traditional 2GP path, yes. No-code generation platforms remove that requirement by handling Dev Hub, the namespace, and the CLI steps for you, producing the managed package from a description.
What is the difference between 1GP and 2GP packaging?
1GP ties the namespace to one packaging org and uses Setup. 2GP is source-driven, uses Dev Hub and a namespace registry, and supports multiple packages per namespace. Salesforce recommends 2GP for all new managed packages.
About the author. Sunny Chauhan is the founder and CEO of Appnigma AI, a no-code platform that generates Salesforce AppExchange-ready managed packages. He helps SaaS teams create packages without an engineering build.
Key takeaway
To create a managed package in Salesforce, enable Dev Hub, register a namespace, build your components, and assemble a second-generation (2GP) package with the Salesforce CLI, then test and promote the version. For the AppExchange, add the security review and listing. Appnigma AI generates the managed package no-code, handling Dev Hub, namespace, and CLI steps automatically.
Related Articles
Sources
1/ Salesforce 2GP Developer Guide 2/ Salesforce, Enable Dev Hub and Second-Generation Managed Packaging 3/ Salesforce Trailhead, ISV Security Review (fee)
Which step in the 2GP setup actually broke you?
Ready to transform your Salesforce experience?
Start exploring the Salesforce Exchange today and discover apps that can take your CRM efficiency to the next level.
