Status: early beta (v0.1.0). APIs and commands may change without notice.
Salesforce's native tooling doesn't treat metadata like a modern package graph. Dependencies between packages, deploy ordering, and lifecycle quirks (profiles, permission sets, picklists, flows, managed-package settings) are usually handled with ad hoc scripts.
SFPM brings a package-manager workflow to Salesforce metadata: unlocked packages and metadata source files are built into versioned artifacts, deployed across orgs in dependency order, and run through lifecycle hooks for the metadata types that don't behave well by default. Think npm, but the artifacts are Salesforce packages instead of JavaScript modules.
- Dependency-aware build and deploy orchestration
- Async validation for long-running unlocked-package builds
- Metadata source deployments as distributed packages
- Lifecycle hooks for metadata Salesforce handles poorly out of the box
- Org pool management for faster feedback loops
- Supporting both sandboxes and scratch orgs
- Data seeding via SFDMU
- GitHub Actions for the same flows used locally
This is a pnpm + Turborepo monorepo.
| Package | Purpose |
|---|---|
@b64hub/sfpm-cli |
The sfpm CLI (built on oclif). |
@b64hub/sfpm-core |
Build/install orchestrators, artifact registry, lifecycle engine, project model. |
@b64hub/sfpm-actions |
GitHub Actions wrapping the core flows for CI. |
@b64hub/sfpm-hooks |
Pre/post-deploy hooks for tricky metadata. |
@b64hub/sfpm-orgs |
Scratch org and pool management. |
@b64hub/sfpm-sfdmu |
SFDMU data builder/installer integration. |
- Node.js >= 18
- pnpm >= 8 (required for workspace development; end users installing the CLI can use any package manager)
- Salesforce CLI (
sf), authenticated to your DevHub and target orgs - Git
pnpm add -g @b64hub/sfpm-clinpm and yarn work too:
npm install -g @b64hub/sfpm-cli
yarn global add @b64hub/sfpm-cliVerify the install:
sfpm --versionRun sfpm --help for the current command reference — this changes frequently during the beta, so the CLI itself is the source of truth rather than this README.
git clone https://github.com/b64hub/sfpm.git
cd sfpm
pnpm install
pnpm build
pnpm testUseful scripts: pnpm watch (rebuild on change), pnpm typecheck, pnpm lint, pnpm format.
Issues and pull requests are welcome at https://github.com/b64hub/sfpm/issues.
- Open an issue before starting non-trivial changes, so the approach can be discussed first.
- Commits follow Conventional Commits (enforced by commitlint + Husky).
- Run
pnpm lint && pnpm typecheck && pnpm testbefore pushing.
This project is early and actively evolving — feedback on rough edges, missing features, and unclear behavior is exactly what a beta is for.