Browse docs
Docs / CLI Reference / swarmfile-seed

swarmfile-seed

swarmfile-seed seeds a single local file into the Swarmfile hub: it reads the file, chunks it, uploads the resulting blocks, and registers a file entry (creating any missing parent directories along the way) at a virtual path you specify. It's a standalone binary with no subcommands - one invocation seeds one file.

swarmfile-seed is a one-shot ingestion tool, not a persistent process. It uploads the file you point it at and exits. For running a machine as an ongoing, persistent participant in the peer-to-peer swarm, see swarmfile seed enable on the full client, covered in Self-Hosted Seed Nodes.

Flags#

FlagDescription
--filePath to the local file to upload
--pathVirtual path in the filesystem (e.g. /Projects/plan.dwg)
--hub-urlHub URL. Defaults to the hosted hub (https://hub.swarmfile.com); override for a self-hosted / Enterprise hub
--cdcUse content-defined chunking (FastCDC) instead of fixed-size
--auto-profileAuto-select chunking strategy based on file extension (AEC profiles). Conflicts with --cdc

--file and --path are both required. --path must not be empty or contain empty segments (no leading/trailing/double slashes past trimming) - it's validated before any I/O happens.

Chunking#

By default, swarmfile-seed chunks the file with a fixed chunk size. --cdc switches to content-defined chunking (FastCDC), which tends to deduplicate better across files with small internal shifts. --auto-profile instead picks a chunking strategy per the file's extension using the same AEC (architecture/engineering/construction) profiles the rest of the ingest pipeline uses, and is mutually exclusive with --cdc. If neither flag is passed, fixed-size chunking is used.

What it does not do#

Unlike swarmfile-migrate, swarmfile-seed uploads exactly one file per invocation - there's no directory-walk or file-list mode. It also does not erasure-code the upload; that's a deliberate scope limit for what the source describes as "a single-file admin/seeding tool."

There is no --project-id or --org-id flag. The hub call to create the entry passes no project ID, and any encryption-key lookup keyed to a project is instead driven entirely by environment variables (SWARMFILE_ENCRYPTION_KEY, SWARMFILE_ENCRYPTION_PROJECT_ID plus OIDC credentials) rather than a CLI flag - encryption is on by default, and if no key source is configured for the invocation the tool warns and seeds the file as plaintext rather than refusing to run, unless encryption was explicitly requested, in which case it fails instead.

Example#

swarmfile-seed --file ./plan.dwg --path "/Projects/Site A/plan.dwg" \
  --hub-url https://hub.swarmfile.com --auto-profile