| Crates.io | sync-rs |
| lib.rs | sync-rs |
| version | 1.3.9 |
| created_at | 2025-02-16 18:06:03.268625+00 |
| updated_at | 2025-06-13 04:36:14.961226+00 |
| description | A CLI tool to sync files between directories |
| homepage | |
| repository | https://github.com/dest1n1s/sync-rs |
| max_upload_size | |
| id | 1558024 |
| size | 52,576 |
A simple tool for syncing local directories to remote servers using rsync and SSH.
cargo install sync-rs
Basic usage:
sync-rs user@host remote_dir
-o, --override-path: Additional paths to sync (can specify multiple)-c, --post-command: Post-sync command to execute-s, --shell: Open an interactive shell in the remote directory after syncing-n, --name: Name for this remote configuration (used when managing multiple remotes)-l, --list: List all remote configurations for the current directory-r, --remove: Remove a remote configuration by name-d, --delete-override: Enable delete mode for override paths (default: disabled)-P, --preferred: Set this remote as the preferred one for this directory-i, --ignore: Patterns to ignore (can specify multiple)sync-rs user@host remote_dir
sync-rs user@host remote_dir -o path1 -o path2 -c "npm install"
sync-rs user@host remote_dir -s
sync-rs user@host remote_dir -n my-remote
sync-rs -l
sync-rs -r my-remote
sync-rs -n my-remote -P
sync-rs user@host remote_dir -i "*.tmp" -i "build/"
When you have multiple remote configurations for a directory, you can set one as preferred:
sync-rs -n my-remote -P
sync-rs -l
When running sync without specifying a remote, it will automatically use the preferred remote if one exists. If no preferred remote is set, it will prompt you to select one.
By default, sync-rs uses .gitignore to filter files. You can specify additional patterns to ignore:
sync-rs -i "*.tmp" -i "build/" -i "node_modules/"
These patterns will be used alongside .gitignore when filtering files for syncing. The patterns follow rsync's exclude format.
MIT