Bootstrap your org
Install the sfpm helper packages into a DevHub with sfpm bootstrap, and choose a tier.
sfpm bootstrap installs sfpm's helper packages into a DevHub. For each
package, it decides whether to build, promote, or install it, and it skips
packages that are already current. The target org must be a DevHub. The command
checks this before it does any package work, and stops if it is not.
What it installs
| Tier | Packages | Purpose |
|---|---|---|
core | @b64hub/sfpm-artifact | Artifact tracking custom setting (SfpmArtifact__c). |
pool | @b64hub/sfpm-artifact, @b64hub/sfpm-orgs | Adds scratch org and sandbox pool management. |
full | @b64hub/sfpm-artifact, @b64hub/sfpm-orgs, @b64hub/sfpm-ui | Adds the artifact history object and UI components. |
Tiers are cumulative. pool includes core, and full includes pool.
This page lists the packages in each tier. The metadata inside each package comes from the sfpm-bootstrap repository and is not described here.
Choose a tier
- With
--tier, sfpm uses the tier you name. - Without
--tierin an interactive terminal, sfpm asks you to choose one. - Without
--tierin a non-interactive run, sfpm installsfull. A run is non-interactive when you pass--jsonor--plain, whenCI=trueis set, or when the output is not a terminal.
In CI, a sfpm bootstrap run without --tier installs the full tier. Pass
--tier explicitly in pipelines.
Run it
sfpm bootstrap -o my-devhub --tier core| Flag | Description |
|---|---|
-o, --target-org <org> | Required. The DevHub to bootstrap. The org must be a DevHub. |
-t, --tier <tier> | core, pool, or full. See the tier table above. |
-f, --force | Rebuild, re-promote, and re-install every package, even when it is current. |
--json | Print the result as JSON. |
--plain | Print plain text instead of the interactive display. |
What each run does
For each package in the tier, sfpm compares the DevHub with the target org and picks one action:
- build when the DevHub has no Package2 for the package, when the Package2
has no package versions yet, or when
--forceis set. sfpm creates the Package2 if it is missing, then builds a package version with org validation. An interactive run asks before it creates the Package2. A non-interactive run creates it without asking. - promote when no version has been released yet, but an unreleased version exists. sfpm promotes that version.
- install when the installed version differs from the latest released
version, or when nothing is installed. sfpm installs the released version into
the target org, with the
RunLocalTeststest level. - skip when the installed version matches the latest released version.
The target org is both the DevHub that builds the packages and the org that receives the install.
Re-running the command is safe. It skips packages that are current and retries the ones that failed.
The command clones https://github.com/b64hub/sfpm-bootstrap into a temporary
directory with git, and deletes that directory when it finishes. git must be on
your PATH, and the machine needs network access to GitHub.
Next
For the commands that use a project after bootstrap, see the quick start.