Sync Commands
Quick summary
| Command | Use when |
|---|---|
sync init | You need to create a local Git sync repository from a DEV CPI package. |
sync pull | CPI is the source of truth and you want Git to reflect the tenant state. |
sync push | Git is the source of truth and you want to update the mapped CPI tenant. |
sync compare | You want to review differences before a promotion. |
sync deliver | You want to promote changes between environment branches and tenants. |
sync deploy status | You want to inspect local transport/deployment records. |
Shared concepts
Branch to tenant resolution
devmaps to DEV.qasmaps to QAS in a 3-tenant model.prdmaps to PRD.- Work branches map to DEV.
Ignore rules
The CLI uses .iflowkit/ignore and built-in ignore defaults when converting Git differences into artifact sets.
PRD confirmation
PRD operations require --to prd.
iflowkit sync init
Usage
bash
iflowkit sync init --id {packageId} [--dir {parentPath}]Parameters
| Parameter | Required | Description |
|---|---|---|
--id {packageId} | yes | CPI IntegrationPackage ID. |
--dir {parentPath} | no | Parent folder where {packageId}/ will be created. Defaults to the current directory. |
What it does
- Uses the DEV tenant.
- Creates a sync repository.
- Exports IntegrationPackage content into
IntegrationPackage/. - Initializes
.iflowkit/package.jsonmetadata. - Creates or updates
.gitignore. - Pushes the initial state to the
devbranch when remote setup is available.
Example
bash
iflowkit sync init --id com.iflowkit.cpi.emailiflowkit sync pull
Usage
bash
iflowkit sync pull [--to dev|qas|prd] [--message {commitMessage}]Behavior
- Must be executed inside a sync repository.
- Reads CPI package content from the mapped tenant.
- Rewrites the local
IntegrationPackage/folder from tenant state. - Commits and pushes the CPI state to the current branch.
- Writes a transport record with
transportType=pull.
Examples
bash
# dev branch
iflowkit sync pull
# prd branch, explicit confirmation required
iflowkit sync pull --to prdiflowkit sync push
Usage
bash
iflowkit sync push [--to dev|qas|prd] [--message {commitMessage}]Behavior
- Detects changes under
IntegrationPackage/. - Applies ignore rules.
- Commits and pushes local changes to Git.
- Updates the mapped CPI tenant.
- Writes a transport record with retry state.
- Creates and pushes a Git tag on success.
Examples
bash
# dev branch
iflowkit sync push
# custom commit message suffix
iflowkit sync push --message "Update email flow"
# prd branch, explicit confirmation required
iflowkit sync push --to prdiflowkit sync compare
Usage
bash
iflowkit sync compare --to qas|prdBehavior
- Compares current branch with
origin/{to}. - Uses Git diff under
IntegrationPackage/. - Applies
.iflowkit/ignoreplus built-in defaults. - Prints a summary list of changed package objects.
Examples
bash
iflowkit sync compare --to qas
iflowkit sync compare --to prdiflowkit sync deliver
Usage
bash
iflowkit sync deliver --to qas|prd [--message {commitMessage}]Promotion paths
| Tenant model | Target | Source → Target |
|---|---|---|
| 3 tenants | qas | dev → qas |
| 3 tenants | prd | qas → prd |
| 2 tenants | prd | dev → prd |
Behavior
- Requires a clean working tree.
- Validates target branch and tenant state.
- Bootstraps missing target branches from the tenant when needed.
- Merges source branch into target branch.
- Updates the target CPI tenant.
- Writes a
delivertransport record. - Creates and pushes a Git tag on success.
Examples
bash
# DEV -> QAS in a 3-tenant model
iflowkit sync deliver --to qas
# Production promotion
iflowkit sync deliver --to prdiflowkit sync deploy status
Usage
bash
iflowkit sync deploy status [--env dev|qas|prd] [--transport {transportId}]Behavior
Reads local records under .iflowkit/transports/. By default, it shows the most recent record for the environment.
Examples
bash
iflowkit sync deploy status --env dev
iflowkit sync deploy status --env prd --transport 20260106T101530123Z