Browse docs
Docs / CLI Reference / swarmfile-runner

swarmfile-runner

swarmfile-runner runs the engine in runner mode: it sets SWARMFILE_RUNNER_MODE=true (when the variable isn't already set), then re-execs the sibling swarmfile-engine binary with the same arguments and standard I/O. It has no subcommands or flags of its own - every engine flag passes straight through - and it runs the real engine boot path (config, single-instance lock, lifecycle) exactly as SWARMFILE_RUNNER_MODE=true swarmfile-engine would.

It exists so the headless CI role reads as its own tool rather than "the engine with an env var". For what a runner does and how to wire it into a CI system, see Runner (Headless CI).

Because it re-execs the engine, swarmfile-runner --help is the engine's help. The pass-through flags:

FlagWhat it does
--build-infoPrint the enabled cargo features and target architecture, then exit.
--statusEngine, hub, peers, and pending work at a glance (works while another engine holds the lock).
--capabilitiesThe compiled feature set of this binary.
--print-env-varsThe resolved SWARMFILE_* values this build consumed, secrets redacted.
--pause / --resumePause or resume sync on a running engine without unmounting.
--quitAsk the running engine to drain and stop.
--pin / --unpin / --list-pins / --verify-pinsOffline cache pins: add, release, list, and verify.
--prepare-offline [SECS] / --return-from-offlineThe engine-level Pack & Go pair - see Working Offline.

See Engine Config File → Engine command-line flags for the full descriptions.

Environment#

VariableDescription
SWARMFILE_RUNNER_MODEForced to true when unset. An explicit value is preserved, so SWARMFILE_RUNNER_MODE=false swarmfile-runner still runs in normal mode
SWARMFILE_API_KEYProject API key the runner authenticates as
SWARMFILE_PROJECT_IDProject the runner serves
SWARMFILE_BRANCHBranch the runner tracks (defaults to the project's main)

Runner mode deliberately serves no control socket. A driverless CI host needs no FUSE - materialize and runner mode never call the mount path.

Acquiring it#

  • Linux - the .deb installs it at /usr/bin/swarmfile-runner, next to swarmfile-engine (the Docker output carries it too; ask us about an .rpm).
  • macOS - it ships inside Swarmfile.app/Contents/MacOS/swarmfile-runner, next to the bundled engine, with a /usr/local/bin/swarmfile-runner symlink on a prod install.
  • Windows - the MSI installs it next to swarmfile-engine.exe in the install folder, and the app-only zip carries it.
  • Anywhere else - build it from source: cargo build --release -p swarmfile-engine --bin swarmfile-runner. It must sit in the same directory as swarmfile-engine, because it re-execs the sibling resolved next to its own executable.
  • Equivalent without the alias - on any engine binary, SWARMFILE_RUNNER_MODE=true swarmfile-engine behaves identically.

Example#

SWARMFILE_API_KEY=sf_key_... SWARMFILE_PROJECT_ID=proj_xyz789 swarmfile-runner

Because it re-execs the engine, the process's exit code and output are the engine's. If the sibling swarmfile-engine is missing, the alias prints an error and exits 127.