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.
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
--reportand--debugoptions 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.
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>
If two-factor authentication is enabled, you can provide the TOTP code or a recovery code using the --code option.
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β
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)
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]
| Option | Description |
|---|---|
-h, --help | Displays general help |
-v, --version | Shows the CLI version |
--update | Updates 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.
| Option | Description | Required |
|---|---|---|
-r, --report | Read-only mode (dry-run), shows differences without applying them | β |
-d, --debug | Enables detailed logs for debugging | β |
-a, --async | Runs 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-command | Alias | Description |
|---|---|---|
list | ls | List all registered servers |
add | mk | Add a new server |
auth | touch | Re-authenticate (refresh access token) |
remove | rm | Remove 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]
| Option | Description | Required |
|---|---|---|
-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-certificate | Allows 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>]
| Option | Description | Required |
|---|---|---|
-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>
| Option | Description | Required |
|---|---|---|
-s, --server <server> | ID or name of the server | β |
paths commandsβ
| Sub-command | Alias | Description |
|---|---|---|
list | ls | List all configured sync paths |
add | mk | Add a new local/remote sync path |
remove | rm | Remove an existing sync path |
set | vi | Edit sync options for an existing path |
update | up | Refresh paths from the server |
flush | reset | Clear 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>]
| Option | Description | Required | Values | Default |
|---|---|---|---|---|
-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-delete | Do not synchronize deletions | β | Flag (no value) | false |
-d, --diff-mode <mode> | Difference detection mode | β | fast, secure | fast |
-c, --conflict-mode <mode> | Conflict resolution strategy (if mode is both) | β | recent, local, remote | recent |
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>
| Option | Description | Required |
|---|---|---|
-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>]
| Option | Description | Required | Values |
|---|---|---|---|
-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>
| Option | Description | Required |
|---|---|---|
-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>
| Option | Description | Required |
|---|---|---|
-s, --server <server> | Server ID or name | β |
-p, --path <path> | Path ID or name | β |