2GP (Second-Generation Packaging)
Salesforce's modern packaging model that builds packages from code in version control instead of clicking through an org.
Definition
2GP (second-generation packaging) is Salesforce's source-driven packaging model: metadata lives in version control and package versions are built from that source using Salesforce CLI and a Dev Hub, rather than being defined by clicking through a packaging org (1GP). It produces both managed and unlocked package types from the same underlying model.
Every build runs in an isolated scratch org, enforces dependency declarations between packages, and produces an immutable version with tracked ancestry back to its predecessor, giving real semantic versioning that 1GP never had.
It's the model Salesforce recommends for all new managed package development and most ISV work, since it enables CI/CD and automated per-version testing. The tradeoff is setup complexity: teams need a Dev Hub, scratch org access, and a CI pipeline before 2GP pays off.
How it works in Serpent
Serpent runs 2GP pipelines natively on every plan, including scratch org provisioning, dependency-aware version bumps, and promotion between package versions, without requiring a separate CI system or hand-written CLI scripts. Builds trigger automatically as tasks complete, version ancestry is tracked so upgrades stay clean, and subscriber org tracking shows exactly which package version each customer runs. Since 2GP setup is usually the biggest barrier to adoption, Serpent's goal is to make the source-driven model usable by teams without a dedicated release engineer. See 2GP CI/CD in Serpent for the full pipeline.

2GP (Second-Generation Packaging), answered
Start free. No credit card, no install, no commitment.
Set up in under 15 minutes. No DevOps hire needed.
