Skip to content

CLI Reference

Xferity is operated primarily through the xferity CLI. This page documents all commands, subcommands, and global flags.

These flags are available on every command:

FlagDefaultDescription
--config path./config/config.yamlPath to the configuration file
--env-file pathLoad a .env-format file into the process environment before starting
--verbose, -vfalseEnable verbose output to stderr
--dry-runfalseExecute flow logic without transferring, encrypting, or deleting any files
--expect-existing-statefalseFail startup if the licensing state file is absent (use on hardened production nodes after initial deployment)

The --env-file flag loads a file containing KEY=VALUE pairs into the process environment before configuration is read. This is useful for injecting secrets into an env: reference environment without modifying the process environment externally.

Terminal window
xferity run payroll-upload --env-file /run/secrets/xferity.env

File format:

SFTP_PASSWORD=secret123
DB_PASSWORD=dbsecret456
# Comments are allowed
export SOME_VAR=value # export prefix is stripped

Dry-run executes the full flow logic — file discovery, idempotency checks, PGP key resolution — but does not perform any actual file transfers, encryptions, deletions, or uploads. Use it to verify flow configuration before enabling it in production.

Terminal window
xferity run payroll-upload --dry-run
xferity run-all --dry-run

Run a specific named flow once.

Terminal window
xferity run <flow-name> [flags]

Example:

Terminal window
xferity run payroll-sftp-upload
xferity run payroll-sftp-upload --dry-run
xferity run payroll-sftp-upload --config /etc/xferity/config.yaml

The flow is loaded from the flows_path directory configured in config. The flow runs once and exits. Use xferity run-service for scheduled/daemon execution.


Run all enabled flows in sequence.

Terminal window
xferity run-all [flags]

Executes every flow that has enabled: true (or equivalent). Reports per-flow success or failure. Does not stop on the first failure — all flows are attempted.

Example:

Terminal window
xferity run-all
xferity run-all --dry-run

Run Xferity as a background worker service.

Terminal window
xferity run-service [flags]

In service mode, Xferity:

  • Polls the job queue at the configured worker.poll_interval (default: 1s)
  • Executes scheduled flows according to their schedule_cron configuration
  • Processes queued jobs including retries
  • Runs until the process is terminated

This is the standard production invocation. Use it with Docker or a process supervisor (systemd, supervisor).

Example:

Terminal window
xferity run-service --config /etc/xferity/config.yaml
xferity run-service --expect-existing-state # hardened production

Docker Compose example:

command: run-service --config /config/config.yaml --expect-existing-state

Resume a previously interrupted or failed flow from its last committed state.

Terminal window
xferity resume [flow-name] [flags]

When called without a flow name, resumes all flows that have incomplete state. When called with a flow name, resumes only that flow.

Resume is idempotent: files already successfully transferred are tracked by their SHA-256 content hash and are not re-transferred.

Example:

Terminal window
xferity resume # resume all incomplete flows
xferity resume payroll-sftp-upload # resume specific flow
xferity resume payroll-sftp-upload --dry-run

When to use resume:

  • After a network failure mid-transfer
  • After an unexpected process termination
  • After a scheduled flow did not complete its run window
  • After manually interrupting a long-running flow for maintenance

Validate the configuration file and all flow YAML files.

Terminal window
xferity validate [flags]

Performs all startup validation checks without starting any services:

  • Config YAML syntax and required field validation
  • Flow YAML syntax validation
  • Hardened mode enforcement (if security.hardened_mode: true)
  • Secret reference format validation
  • Partner configuration validation

Exits with code 0 on success, non-zero on any error.

Example:

Terminal window
xferity validate
xferity validate --config /etc/xferity/config.yaml

Use before deployment to catch configuration errors early:

Terminal window
xferity validate && docker compose up -d

Run diagnostics and print a system status report.

Terminal window
xferity diag [flags]

Outputs:

  • Configuration summary (without secrets)
  • State backend connectivity
  • Flow inventory (names, enabled status, schedule)
  • Partner inventory
  • Licensing status

Example:

Terminal window
xferity diag
xferity diag --config /etc/xferity/config.yaml

View or tail transfer logs.

Terminal window
xferity logs [flow-name] [flags]

Without a flow name, shows logs from all flows. With a flow name, filters to that flow.

Example:

Terminal window
xferity logs
xferity logs payroll-sftp-upload

Subcommand group for flow status and history.

Terminal window
xferity flow status [flow-name]

Show the current status of a flow (running, completed, failed, idle). Without a flow name, shows status for all flows.

Terminal window
xferity flow history [flow-name]

Show execution history for a flow. Without a flow name, shows history for all flows.


Trace specific transfer events from the audit log.

Terminal window
xferity trace [flags]

Queries the audit log index for specific events. Useful for investigating a specific file’s transfer history.

Example:

Terminal window
xferity trace --flow payroll-sftp-upload
xferity trace --file invoice-2026-03.xml

Start the Xferity web UI server.

Terminal window
xferity ui [flags]

Starts the HTTP server for the web management interface. The UI is also started automatically when ui.enabled: true is set in the config and xferity run-service is used.

Example:

Terminal window
xferity ui --config /etc/xferity/config.yaml

The UI listens on the address and port configured in ui.host and ui.port.


Subcommand group for the local encrypted secrets vault.

Initialize or update the local vault with secrets.

Terminal window
xferity vault seed [flags]

Seeds the local encrypted vault (local-vault: secret provider). The vault stores secrets encrypted with AES-256. The master key is provided via MFT_MASTER_KEY environment variable (or secrets.local_vault.master_key_ref in config).

Example:

Terminal window
MFT_MASTER_KEY=your-base64-key xferity vault seed

License management commands.

Terminal window
xferity license [subcommand]

Subcommands include status, reload, and validation. Used to manage the Xferity license file and check current license state.


Operator administration commands.

Terminal window
xferity operator [subcommand]

Administrative commands for operations teams. Includes health check and maintenance utilities.


Print the version of the Xferity binary.

Terminal window
xferity version

CodeMeaning
0Success
1Error (configuration, runtime failure, or flow failure)

All configuration values can be overridden with environment variables using the FTO_ prefix. For example, FTO_FLOWS_PATH=/data/flows overrides flows_path in config.

The env prefix is FTO (legacy name before rebranding). Secret references using env:VAR_NAME read from the process environment without any prefix.