Sync
Commands to help sync your orgs
sfp sync org
Syncs changed packages to a target org using branch comparison or org-installed artifacts as baseline
USAGE
$ sfp sync org -o <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
<value>] [-b <value>] [--basebranch <value> | --from-org] [--from <value> --to <value>] [--dryrun]
[--include-not-installed] [-v <value>] [-p <value>...] [--releaseconfig <value>...] [--diff-deploy] [--check-only]
[--diff-package-name <value>] [--skip-data-packages] [--testlevel
RunNoTests|NoTestRun|RunSpecifiedTests|RunLocalTests|RunRelevantTests|RunAllTestsInOrg] [--apextests <value>]
[--sourcepackageoverride] [--waittime <value>] [--reset-tracking] [-g <value>...] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
FLAGS
-b, --branch=<value> [default: HEAD] Target branch to sync (defaults to HEAD for org-based mode)
-e, --email=<value> Email address for authenticated user. Ignored if --application-token is provided.
Can be set via SFP_SERVER_USER env var.
-g, --logsgroupsymbol=<value>... Symbol used by CICD platform to group/collapse logs in the console. Provide an
opening group, and an optional closing group symbol.
-o, --targetorg=<value> (required) Username or alias of the target org.
-p, --packages=<value>... Comma-separated list of package names to sync
-t, --application-token=<value> Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
(CLI flags take precedence over env vars).
-v, --devhubalias=<value> Username or alias of the Dev Hub org.
--apextests=<value> Comma-separated Apex test class names. Required with --testlevel RunSpecifiedTests.
--basebranch=<value> Base branch to compare against for detecting changes (branch-based mode)
--check-only Validate a branch diff deploy without committing metadata. Only supported with
--diff-deploy; changed data packages are skipped.
--diff-deploy Deploy only the changed files directly to the org, skipping the full build pipeline.
Uses RunRelevantTests. Untracked - no artifact records are created.
--diff-package-name=<value> Display name for the synthetic package created in diff-deploy mode (e.g.
sfp-my-branch-pr350). Sanitized to lowercase alphanumerics, hyphens and underscores.
--dryrun Preview changes without building or deploying (org-based mode only)
--from=<value> Baseline release as env:domain/release (e.g. staging:core/RC-15). Resolves to the
codev/<env> mirror commit for that release. Use with --to to deploy the diff between
two releases.
--from-org Use org-installed artifacts as baseline instead of git branch comparison (org-based
mode)
--[no-]include-not-installed Include packages not installed in org (org-based mode only, default: true)
--loglevel=<option> [default: info] logging level for this command invocation
<options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
--releaseconfig=<value>... Domain name or path to a release config file to filter packages by domain (names are
resolved against the configs in 'config/')
--repository=<value> The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
for Azure DevOps
--reset-tracking Reset source tracking after successful sync. Use this when syncing to
source-tracking enabled orgs (scratch orgs, sandboxes) so that project status
reflects the synced state.
--sfp-server-url=<value> URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
config:set server-url
--skip-data-packages Skip changed data packages during diff-deploy and deploy metadata only.
--sourcepackageoverride Override unlocked packages to source packages during build
--testlevel=<option> Apex test level for sync deploys. Defaults to RunNoTests for org/branch sync and
RunRelevantTests for diff-deploy.
<options: RunNoTests|NoTestRun|RunSpecifiedTests|RunLocalTests|RunRelevantTests|RunA
llTestsInOrg>
--to=<value> Target release as env:domain/release (e.g. qa:core/RC-17). Resolves to the
codev/<env> mirror commit for that release. The diff from --from to --to is deployed
as a synthetic package.
--waittime=<value> [default: 120] Wait time for deployment to finish in minutes
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Syncs changed packages to a target org using branch comparison or org-installed artifacts as baseline
EXAMPLES
# Branch-based sync (compare two git branches)
$ sfp sync -o <username> --branch feature/test --basebranch main
$ sfp sync -o <username> --basebranch main --branch feature/test --devhubalias mydevhub
$ sfp sync -o <username> --branch feature/test --basebranch main --diff-deploy --check-only
# Org-based sync (use installed artifacts as baseline)
$ sfp sync -o <username> --from-org --dry-run
$ sfp sync -o <username> --from-org --branch feature/test
$ sfp sync -o <username> --from-org --include-not-installed=false
# Release-diff deploy (deploy the diff between two releases from their codev/<env> mirror commits)
$ sfp sync -o <username> --from staging:core/RC-15 --to qa:core/RC-17
$ sfp sync -o <username> --from staging:core/RC-15 --to qa:core/RC-17 --check-only