sfpm

Configuration

How sfpm reads project config and which environment variables it respects.

Config file

SFPM reads project configuration from sfpm.config.{ts,js,mjs} at the project root (TypeScript preferred). The file is loaded with jiti, so no build step is required.

sfpm.config.ts
import { defineConfig } from "@b64/sfpm-core";

export default defineConfig({
  namespace: "myns",
  sourceApiVersion: "62.0",
  hooks: [
    // lifecycle hook plugins
  ],
  artifacts: {
    trackHistory: true,
  },
  ignoreFiles: [
    // glob patterns excluded from package builds
  ],
});

If no config file is present, SFPM falls back to sensible defaults driven by sfdx-project.json.

Environment variables

VariablePurpose
SF_DEV_HUBDefault --target-dev-hub for sfpm build.
SF_TARGET_ORGDefault --target-org for sfpm deploy / install.
SFPM_FORCE_BUILDEquivalent to sfpm build --force.
SFPM_PROJECT_DIROverride the project directory (debugging).

On this page