Quickstart

sync-servers keeps a folder on your computer and a folder on a web server the same, and shows you every change before anything moves.

1. Install

Install Node.js 22.14 or later, then sync-servers. To run it from a clone instead, see Install.

npm install --global @isocialpractice/cmd-sync-servers

2. Add your site

Give it a name, its folder on your computer, and the server's protocol, host and user; it asks for the password, connects, and lets you pick the site's folder on the server.

sync-servers site add --name "My Site" --local-root ~/sites/my-site \
  --protocol ftps --host ftp.example.com --user demo-user

On Windows, in cmd.exe:

sync-servers site add --name "My Site" --local-root "C:\Users\<user>\Sites\my-site" ^
  --protocol ftps --host ftp.example.com --user demo-user

3. Preview and send your changes

In the site's folder, ask for the files that are newer on your computer; a preview lists them before anything moves.

cd ~/sites/my-site
sync-servers sync --put
The preview's menu
KeyDoes
SpaceCheck or uncheck every file
cCheck or uncheck the file
p, g, sPut, get or skip the file
dShow how the two copies differ
aCheck every file, or uncheck them all when all are checked
qQuit, sending nothing
EnterSend the checked files

Nothing moves until you press Enter and confirm.

4. Get what changed on the server

The same preview, for files that are newer on the server.

sync-servers sync --get

5. Keep files off every server

Cloaked files are never listed, sent or deleted, in any of your sites.

sync-servers cloak --global .git/ node_modules/

Next