Skip to main content

Synchronization via Terminal

Use the command-line interface (CLI) of Sync-in to configure and trigger synchronizations between your local files and remote servers. This interface also allows you to manage multiple servers, define custom sync paths, and automate your transfer workflows.

It is ideal for advanced users, scripting, and environments without a graphical interface.

Sync CLI

Use Cases​

  • Work in headless environments, such as remote servers or containers.
  • Schedule automatic synchronizations using CRON tasks or a system scheduler.
  • Automate your business workflows by integrating the CLI into processing or backup scripts.
  • Test syncs in simulation mode, using the --report and --debug options to identify changes without applying them or to troubleshoot.
  • Manage multiple servers, centralizing your connections in one tool.
  • Deploy predefined configurations, for automated installations across multiple machines or environments.

Access Requirements​

To use the CLI, the following conditions must be met:

  • You must have the desktop access permission enabled.
  • You must have the sync permission enabled.
  • You must download the CLI binary from your Account or the Downloads page.
Node.js requirement

The CLI requires Node.js 22.12.0 or later. Check the installed version before running the CLI:

node --version

Quickstart​

1. Add a server​

./sync-in-cli servers add \
--name <MY_SERVER> \
--url https://<YOUR_DOMAIN> \
--login <YOUR_LOGIN> \
--password <YOUR_PASSWORD>
info

If two-factor authentication is enabled, you can provide the TOTP code or a recovery code using the --code option.

tip

You can use an application password to complete the registration, for example when only OpenID Connect authentication is allowed.

2. Add a sync path​

./sync-in-cli paths add \
--server <MY_SERVER> \
--local-path </local/path/to/files> \
--remote-path <personal|spaces|shares/...> \
--name <PATH_NAME> \
--mode <both|upload|download> \
--diff-mode <fast|secure> \
--conflict-mode <recent|local|remote>

3. Launch synchronization​

./sync-in-cli run \
--server <MY_SERVER> \
--path <PATH_NAME>

Updating the CLI​

Check the installed version:

./sync-in-cli --version

Update to the latest stable version:

./sync-in-cli --update

The CLI downloads the latest stable release from GitHub and replaces itself at the same location, preserving its permissions. If the installed version is already up to date or newer, no replacement is made.

Run --update on its own, without another command or a version number. Your user must have write access to the directory containing the CLI.


Management​

Once the CLI is configured and registered with the server, it has access to your account.
Connection details can be viewed in the Clients menu of your account.

You can revoke CLI access at any time, regardless of the workstation used for configuration.

From the same menu, you can also update the sync configuration of CLI-managed paths.
The changes will be applied the next time a synchronization is started.


Security​

After a certain period, you may be asked to re-authenticate to securely renew access to your account.

To perform this operation, see the re-authentication command.


Notes​

note

Unlike the desktop application, files deleted locally (on the workstation) are not moved to the trash.


Commands​

sync-in-cli
β”œβ”€β”€ run
β”œβ”€β”€ servers
β”‚ β”œβ”€β”€ list (ls)
β”‚ β”œβ”€β”€ add (mk)
β”‚ β”œβ”€β”€ auth (touch)
β”‚ └── remove (rm)
└── paths
β”œβ”€β”€ list (ls)
β”œβ”€β”€ add (mk)
β”œβ”€β”€ remove (rm)
β”œβ”€β”€ set (vi)
β”œβ”€β”€ update (up)
└── flush (reset)
Version-specific help

The built-in help always matches your installed CLI version. Run ./sync-in-cli --help for the command list or ./sync-in-cli <command> --help for contextual help, for example ./sync-in-cli paths add --help.

Global options​

./sync-in-cli [options]
OptionDescription
-h, --helpDisplays general help
-v, --versionShows the CLI version
--updateUpdates the CLI to the latest stable version

run command​

Manually launches a synchronization. You can synchronize all configured paths or target a server and one or more of its paths.

./sync-in-cli run [--report] [--debug] [--async] [--server <server>] [--path <paths...>]

Without --server, all configured servers are considered. Without --path, all enabled paths on the targeted servers are synchronized. When using --path without --server, the CLI searches for the specified paths on every configured server. Pass multiple path IDs or names after a single --path option, or repeat the option.

OptionDescriptionRequired
-r, --reportRead-only mode (dry-run), shows differences without applying them❌
-d, --debugEnables detailed logs for debugging❌
-a, --asyncRuns synchronizations in parallel❌
-s, --server <server>ID or name of the server to synchronize❌
-p, --path <paths...>One or more path IDs or names❌

--report, --debug, and --async are flags and do not take a value.

servers commands​

Sub-commandAliasDescription
listlsList all registered servers
addmkAdd a new server
authtouchRe-authenticate (refresh access token)
removermRemove a registered server

List the registered servers with ./sync-in-cli servers list (or ./sync-in-cli servers ls).

servers add (alias: servers mk)​

Adds and registers a remote server for use with the CLI.

./sync-in-cli servers add --name <name> --url <url> --login <login> --password <password> [--code <code>] [--allow-invalid-certificate]
OptionDescriptionRequired
-n, --name <name>Custom name for identifying the serverβœ…
-w, --url <url>Server URL (e.g., https://my.sync-in.com)βœ…
-u, --login <login>User login or emailβœ…
-p, --password <password>User passwordβœ…
-c, --code <code>Two-Factor Authentication (2FA) code or recovery code❌
--allow-invalid-certificateAllows an unrecognized TLS certificate❌

--allow-invalid-certificate is a flag and does not take a value. Only use it when you trust the server and its certificate.

servers auth (alias: servers touch)​

Refreshes the access token for a registered server.

./sync-in-cli servers auth --server <server> --login <login> --password <password> [--code <code>]
OptionDescriptionRequired
-s, --server <server>ID or name of the serverβœ…
-u, --login <login>User login or emailβœ…
-p, --password <password>User passwordβœ…
-c, --code <code>Two-Factor Authentication (2FA) code or recovery code❌

servers remove (alias: servers rm)​

Removes a registered server.

./sync-in-cli servers remove --server <server>
OptionDescriptionRequired
-s, --server <server>ID or name of the serverβœ…

paths commands​

Sub-commandAliasDescription
listlsList all configured sync paths
addmkAdd a new local/remote sync path
removermRemove an existing sync path
setviEdit sync options for an existing path
updateupRefresh paths from the server
flushresetClear previous snapshots of a sync path

List all configured paths with ./sync-in-cli paths list (or ./sync-in-cli paths ls).

paths add (alias: paths mk)​

Adds a new sync path (local/remote).

./sync-in-cli paths add \
--server <server> \
--local-path <path> \
--remote-path <path> \
--mode <mode> \
[--name <name>] \
[--ignore-delete] \
[--diff-mode <mode>] \
[--conflict-mode <mode>]
OptionDescriptionRequiredValuesDefault
-s, --server <server>Server ID or nameβœ…β€”β€”
-l, --local-path <path>Path to a local file or folderβœ…β€”β€”
-r, --remote-path <path>Remote path (spaces, personal, or shares)βœ…β€”β€”
-n, --name <name>Custom sync nameβŒβ€”β€”
-m, --mode <mode>Sync modeβœ…download, upload, bothβ€”
--ignore-deleteDo not synchronize deletions❌Flag (no value)false
-d, --diff-mode <mode>Difference detection mode❌fast, securefast
-c, --conflict-mode <mode>Conflict resolution strategy (if mode is both)❌recent, local, remoterecent

The remote path must start with personal, spaces, or shares. --ignore-delete is a flag and does not take a value.

paths remove (alias: paths rm)​

Deletes an existing sync path.

./sync-in-cli paths remove --server <server> --path <path>
OptionDescriptionRequired
-s, --server <server>Server ID or nameβœ…
-p, --path <path>Path ID or nameβœ…

paths set (alias: paths vi)​

Modifies sync options for an existing path.

./sync-in-cli paths set \
--server <server> \
--path <path> \
[--name <name>] \
[--mode <mode>] \
[--ignore-delete <boolean>] \
[--diff-mode <mode>] \
[--conflict-mode <mode>]
OptionDescriptionRequiredValues
-s, --server <server>Server ID or nameβœ…β€”
-p, --path <path>Path ID or nameβœ…β€”
-n, --name <name>New sync nameβŒβ€”
-m, --mode <mode>Sync mode❌download, upload, both
--ignore-delete <boolean>Enables or disables deletion synchronization❌true, false
-d, --diff-mode <mode>Difference detection mode❌fast, secure
-c, --conflict-mode <mode>Conflict resolution strategy (if mode is both)❌recent, local, remote

For paths set, pass the lowercase value true or false explicitly after --ignore-delete. See Ignoring deletions for its behavior in each synchronization direction.

paths update (alias: paths up)​

Refreshes all configured paths on a server.

./sync-in-cli paths update --server <server>
OptionDescriptionRequired
-s, --server <server>Server ID or nameβœ…

paths flush (alias: paths reset)​

Clears the snapshots (previous states) of a path.

./sync-in-cli paths flush --server <server> --path <path>
OptionDescriptionRequired
-s, --server <server>Server ID or nameβœ…
-p, --path <path>Path ID or nameβœ