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
| Key | Does |
|---|---|
| Space | Check or uncheck every file |
| c | Check or uncheck the file |
| p, g, s | Put, get or skip the file |
| d | Show how the two copies differ |
| a | Check every file, or uncheck them all when all are checked |
| q | Quit, sending nothing |
| Enter | Send 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
- Getting started
The same steps in full, with what each question means.
- Examples
Commands for common jobs, ready to adapt.
- Cheatsheets
Every everyday command and key on one page.
- Troubleshooting
What to do when a connection or a sign-in fails.