Options

Everything that changes how sync-servers runs, in one place: options on the command line, environment variables, and the ways a preview can be shown. The settings kept in sites.json are on Configuration.

Global options

Every command takes these, before or after its own options.

Global options
OptionDoes
--site <name>The site to work on, by name or id
--server <name>The server to work on, by name or id
--config-dir <folder>Use this settings folder
--state-dir <folder>Use this state folder
--jsonWrite one JSON document to stdout
--plainUse numbered line prompts, never a full-screen interface
--asciiUse ASCII symbols only
--no-colorTurn colour off (NO_COLOR does too)
--debugAlso log details to stderr, with secrets removed
--cd-file <file>Write the chosen site folder here, for shell integration
--versionPrint the version and exit
-h, --helpPrint help and exit

Command options from A to Z

Each option once, with what it does and the commands that take it. sync-servers <command> --help lists the options of one command.

Command options
OptionDoesCommands
--allow-insecureAllow plain FTP, which sends the password in clear textsite add, server add, server edit
--allow-mass-deleteRun deletes past the mass-delete limit without askingsync
--allow-root-deletesAllow deletes when the remote root is "/" or a drive rootsite add, server add, server edit
--auth <method>password, key or agent (key and agent are SFTP only)site add, server add, server edit
--bothGet and put newer filessync
--ca-file <file>FTPS: a PEM file of extra certificate authoritiessite add, server add, server edit
--cacheCache local scans between runs (--no-cache to turn off)site edit
--case-sensitiveTreat file names as case-sensitive (--no-case-sensitive to turn off)site edit
--clearLeave the site without a Testing serverserver set-testing
--deleteDelete files missing on the other side (never-synchronized ones stay unchecked)sync
--dir-mode <mode>Permissions for created folders, such as 755site add, server add, server edit
--disableTurn cloaking off for the site, keeping its patternscloak
--dry-runShow the preview and transfer nothingsync
--editorEdit the whole server as JSON in your editorserver edit
--editorEdit the whole site as JSON in your editorsite edit
--enableTurn cloaking on for the sitecloak
--file-mode <mode>Permissions for uploaded files, such as 644site add, server add, server edit
--forget-certificateRemove the trusted TLS certificate; the next connection verifies it againserver edit
--forget-host-keyRemove the pinned SSH host key, after checking the new one with the hostserver edit
--getGet newer files from the serversync
--globalWork on the global patterns, which every site uses before its owncloak, uncloak
--host <host>The host name or IP address; host:port and sftp://, ftps:// and ftpes:// addresses work toosite add, server add, server edit
--host-key <fingerprint>Accept this SSH host key (SHA256:...) when it is not pinned yetsync, put, get, status, diff, mark-synced
--host-key <fingerprint>Accept this SSH host key (SHA256:...) when it is not pinned yet, for scriptsserver test
--ignore-globalStop using the global patterns in the sitecloak
--ip-family <4|6>Connect over IPv4 or IPv6 onlysite add, server add, server edit
--key-path <file>The private key file for --auth keysite add, server add, server edit
--kind <kind>password (default) or passphrase, for a private keypassword set
--kind <kind>password or passphrase; both when not givenpassword forget
--legacy-algorithmsSFTP: allow older algorithms for an old serversite add, server add, server edit
--listShow the cloaking settingscloak
--local-root <folder>Move the local site foldersite edit
--local-root <folder>The local site folder, which must existsite add
--name <name>Rename the sitesite edit
--name <name>The server name, unique within the site (default: the host)server add, server edit
--name <name>The site name, unique ignoring casesite add
--pathTreat every argument as a path inside the local rootcloak, uncloak
--patternTreat every argument as a patterncloak, uncloak
--plan-in <file>Run a saved plan, if the site and server have not changed sincesync
--plan-out <file>Save the plan as JSONsync
--port <port>The port, when not the protocol defaultsite add, server add, server edit
--preview <mode>Show the preview in the terminal UI (tui), your editor, plain prompts, or print it (none)sync, put, get
--protocol <protocol>sftp (default), ftps, ftps-implicit, ftp or localsite add, server add, server edit
--putPut newer files to the serversync
--remoteMake it the site's Remote server, used to synchronizeserver add
--remote-root <path>The site root on the server; for local, a foldersite add, server add, server edit
--save-passwordKeep the password in the OS credential store (--no-save-password to stop)site add, server add, server edit
--server-name <name>The name of the first server (default: its host)site add
--stdinRead it from standard input instead of askingpassword set
--symlinks <policy>Symbolic links in the local folder: skip them (skip), follow those inside the site (follow-inside-root), or follow all (follow)site edit
--testingMake it the site's Testing serverserver add
--timeout <seconds>Seconds to wait for the server (default 30)site add, server add, server edit
--tls-min-version <version>FTPS: TLSv1.2 (default) or TLSv1.3site add, server add, server edit
--tls-servername <host>FTPS: the name to verify the certificate againstsite add, server add, server edit
--trust-certificate <sha256>Accept this TLS certificate (SHA-256 fingerprint) when it does not verifysync, put, get, status, diff, mark-synced
--trust-certificate <sha256>Accept this TLS certificate (SHA-256 fingerprint) when it does not verify, for scriptsserver test
--upload-on-saveUpload files when they are saved in the VS Code extensionsite add, server add, server edit
--use-globalUse the global patterns in the site, as sites do unless told otherwisecloak
--user <name>The user namesite add, server add, server edit
--web-url <url>The local web address, such as http://localhost:8080/site edit
--web-url <url>The web address of the site on this serversite add, server add, server edit
-y, --yesDo not ask for confirmationsite remove, server remove
-y, --yesRun without asking for confirmationsync, put, get, state reset

Environment variables

Variables sync-servers reads
VariableDoes
SYNC_SERVERS_HOMEMoves the settings folder there, and the state folder to its state folder.
SYNC_SERVERS_SITEThe site to use when a command names none, by name or id.
SYNC_SERVERS_PASSWORDThe password of the server in use, for unattended runs. A saved password comes first.
SYNC_SERVERS_KEY_PASSPHRASEThe passphrase of the private key of the server in use.
SYNC_SERVERS_KEYRINGoff, 0, false or no turns the operating system's credential store off.
SYNC_SERVERS_UIHow previews are shown when --preview is not given: tui, editor, plain or none.
SYNC_SERVERS_EDITORThe editor for editor mode, --editor and config edit, with its arguments, such as code --wait.
VISUAL, EDITORThe editor when SYNC_SERVERS_EDITOR is not set, in that order. Without any, Notepad on Windows, then nano or vi.
SSH_AUTH_SOCKThe SSH agent for the agent sign-in method. On Windows the OpenSSH agent is used when it is not set.
NO_COLORAny value but an empty one turns colour off, as --no-color does. Nothing depends on colour.
TERM=dumbASCII symbols and plain prompts, with no full-screen drawing.

Setting one for a single command:

SYNC_SERVERS_UI=plain sync-servers sync --put

In cmd.exe, for the rest of the session:

set "SYNC_SERVERS_UI=plain"
sync-servers sync --put

Preview modes

sync, and put or get when a decision is needed, show a preview before anything moves. --preview chooses how:

Values of --preview
ModeShows the preview
tuiFull screen, row by row. The default in a terminal.
editorAs a text file in your editor; see Editor mode.
plainAs numbered rows and typed commands; see Plain mode.
nonePrinted, then one yes or no question in a terminal. The default without a terminal.

Without --preview, the mode is none when nobody can answer: with --yes, --dry-run, --json, or no terminal. Otherwise it comes from SYNC_SERVERS_UI, else tui, which becomes plain with --plain, with TERM=dumb, or in a terminal that cannot take single key presses.