{"id":13441918,"url":"https://github.com/thisboyiscrazy/vscode-rsync","last_synced_at":"2025-03-20T13:31:18.404Z","repository":{"id":47602262,"uuid":"76989239","full_name":"thisboyiscrazy/vscode-rsync","owner":"thisboyiscrazy","description":"rsync extension for visual studio code","archived":false,"fork":false,"pushed_at":"2023-04-24T20:52:15.000Z","size":231,"stargazers_count":92,"open_issues_count":40,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-28T05:12:07.574Z","etag":null,"topics":["rsync","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thisboyiscrazy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-20T20:27:11.000Z","updated_at":"2024-10-16T16:22:54.000Z","dependencies_parsed_at":"2024-10-28T03:23:34.849Z","dependency_job_id":"4989c94b-a184-48c7-a4bc-19ef6d98aee7","html_url":"https://github.com/thisboyiscrazy/vscode-rsync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisboyiscrazy%2Fvscode-rsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisboyiscrazy%2Fvscode-rsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisboyiscrazy%2Fvscode-rsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisboyiscrazy%2Fvscode-rsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thisboyiscrazy","download_url":"https://codeload.github.com/thisboyiscrazy/vscode-rsync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244619148,"owners_count":20482369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rsync","vscode","vscode-extension"],"created_at":"2024-07-31T03:01:39.593Z","updated_at":"2025-03-20T13:31:18.110Z","avatar_url":"https://github.com/thisboyiscrazy.png","language":"TypeScript","funding_links":[],"categories":["HarmonyOS","TypeScript"],"sub_categories":["Windows Manager"],"readme":"# sync-rsync\n\nBasic sync using Rsync\n\n## Features\n\nThis extension syncs with a remote server using rsync\n\nWith these commands:\n\n* `Sync-Rsync: Sync Local to Remote`\n* `Sync-Rsync: Sync Local to Remote (Single)`\n* `Sync-Rsync: Sync Remote to local`\n* `Sync-Rsync: Sync Remote to local (Single)`\n* `Sync-Rsync: Compare Local to Remote` (dry run)\n* `Sync-Rsync: Compare Remote to local` (dry run)\n* `Sync-Rsync: Kills the current sync`\n\nIf no sync is running clicking the status bar item will show the output\n\nIf a sync is running clicking the status bar item will kill the running sync, see [Windows Notes](#windows-notes)\n\n## Requirements\n\nRsync installed both locally and remotely\n\nIf you are using wsl, wslpath maybe required. (Windows 10 1803 or higher). Or you can install this https://github.com/laurent22/wslpath/blob/master/wslpath which requires php.\n\nIf using cygwin, cygpath maybe required.\n\n## Extension Settings\n\nOverall Settings (all optional):\n\n* `sync-rsync.notification`: Show notifiactions for sync successes (failurers always show notifications)\n* `sync-rsync.autoShowOutput`: Auto show rsync output when rsync is working.\n* `sync-rsync.autoShowOutputOnError`: Auto show rsync output on error.\n* `sync-rsync.autoHideOutput`: Auto hide rsync output when rsync is done.\n* `sync-rsync.onSave`: syncs entire local on save.\n* `sync-rsync.onSaveIndividual`: syncs the changed file on save (onSave takes presedence). (note: rsync error 3 is ignored because it might be excluded).\n* `sync-rsync.onLoadIndividual`: syncs the opened file on load. (note: rsync error 3 is ignored because it might be excluded).\n* `sync-rsync.executableShell`: The executable shell to run rsync in (e.g. /bin/bash).\n* `sync-rsync.executable`: The rsync executeable (e.g. rsync, C:\\cygwin64\\bin\\rsync.exe).\n* `sync-rsync.cygpath`: If using cygwin, this is the path to cygpath (e.g. C:\\cygwin64\\bin\\cygpath.exe) used to translate windows paths to cywgin.\n* `sync-rsync.watchGlobs`: Enables file system watcher on given glob patterns (may cause high CPU usage - use carefuly).\n* `sync-rsync.useWSL`: Use WSL for executing rsync. See [Windows Notes](#windows-notes)\n\nGlobal site options (they will be used as the default for each site):\n\n* `sync-rsync.local`: the local location defaults to workspace.\n* `sync-rsync.remote`: the rsync remote location e.g. user@remote:path.\n* `sync-rsync.delete`: true or false if you want rsync to delete files.\n* `sync-rsync.flags`: rsync flags.\n* `sync-rsync.showProgress`: show progress during rsync, by adding ```--progress```.\n* `sync-rsync.exclude`: rsync exclude patterns e.g. [\".git\",\".vscode\"] (includes happen before excludes) See [Includes / Excludes](#includes--excludes).\n* `sync-rsync.include`: rsync exclude patterns e.g. [\"*/\",\"**/*.php] (includes happen before excludes) See [Includes / Excludes](#includes--excludes).\n* `sync-rsync.shell`: Rsync's -e option e.g. ssh -p 1234.\n* `sync-rsync.chmod`: Rsync's --chmod option.\n* `sync-rsync.options`: Array of extra rsync options, set each element using [rsync.set](https://github.com/mattijs/node-rsync#setoption-value). See [Extra Options](#extra-options).\n* `sync-rsync.args`: Array of extra arguments to append to rsync e.g. ```[\"--exclude=venv/\", \"--include=*/\", \"--include=**/*.py\", \"--exclude=*\"]```.\n\nSites (Completely Optional, If no sites are defined Sync Rsync creates one using defaults):\n\n* `sync-rsync.sites`: Multiple Site Support [Multiple Sites](#multiple-sites).\n\n## Workspaces\n\nFor workspaces you have to define ```localPath``` and ```remotePath``` for each folder you want synced. e.g.\n\n```javascript\n{\n\t\"folders\": [\n\t\t{\n\t\t\t\"path\": \"/home/user/project/s1\"\n\t\t},\n\t\t{\n\t\t\t\"path\": \"/home/user/projects/t2\"\n\t\t}\n\t],\n\t\"settings\": {\n\t\t\"sync-rsync.sites\": [\n\t\t\t{\n\t\t\t\t\"localPath\": \"/home/user/project/s1/\",\n\t\t\t\t\"remotePath\": \"user@server:/var/www/s1/\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"localPath\": \"/home/user/projects/t2/\",\n\t\t\t\t\"remotePath\": \"user@server:/var/www/s2/\"\n\t\t\t}\n\t\t]\n\t}\n}\n```\n\n## Multiple Sites\n\nSites have these options, they are all optional sync-rsync will use the defaults if they are not defined:\n\n* `name`: a Nickname for single site sync.\n* `upOnly`: this site only sync Local to Remote.\n* `downOnly`: this site only sync Remote to Local.\n* `localPath`: the local location defaults to workspace.\n* `remotePath`: the rsync remote location e.g. user@remote:path.\n* `deleteFiles`: true or false if you want rsync to delete files.\n* `flags`: rsync flags.\n* `exclude`: rsync exclude patterns e.g. [\".git\",\".vscode\"] (includes happen before excludes) See [Includes / Excludes](#includes--excludes).\n* `include`: rsync exclude patterns e.g. [\"*/\",\"**/*.php] (includes happen before excludes) See [Includes / Excludes](#includes--excludes).\n* `shell`: Rsync's -e option e.g. ssh -p 1234.\n* `preSyncUp`: a command to run before sync up (e.g. clear cache). First item in array is the command the rest are arguments. e.g.  ['ssh','user@server','~/cr.sh'].\n* `postSyncUp`: a command to run after successful sync up (e.g. clear cache). First item in array is the command the rest are arguments. e.g.  ['ssh','user@server','~/cr.sh'].\n* `preSyncDown`: a command to run before sync down (e.g. clear cache). First item in array is the command the rest are arguments. e.g.  ['ssh','user@server','~/cr.sh'].\n* `postSyncDown`: a command to run after successful sync down (e.g. clear cache). First item in array is the command the rest are arguments. e.g.  ['ssh','user@server','~/cr.sh'].\n* `chmod`: Rsync's --chmod option.\n* `options`: Array of extra rsync options, set each element using [rsync.set](https://github.com/mattijs/node-rsync#setoption-value). See [Extra Options](#extra-options).\n* `args`: Array of extra arguments to append to rsync e.g. ```[\"--exclude=venv/\", \"--include=*/\", \"--include=**/*.tpl\", \"--exclude=*\"]```.\n\nlocalPath and remotePath will replace ${workspaceRoot} with the current Workspace Path\n\nExample :\n\n```javascript\n{\n    \"sync-rsync.delete\": true,\n    \"sync-rsync.sites\": [\n        {\n            \"remotePath\":\"user1@server1:/path1/\",   // Sync sync-rsync.local to user1@server1:/path1/ using port 1234\n            \"shell\":\"ssh -p 1234\"\n        },\n        {\n            \"remotePath\":\"user2@server2:/path2/\",  // Sync sync-rsync.local to user2@server2:/path2/\n        },\n        {\n            \"localPath\":\"project/static/\",\n            \"remotePath\":\"user3server3:/static/\", // Sync project/static/ to user3@server3:/static/\n        }\n    ]\n}\n```\n\n## Extra Options\n\nThe `options` array is an array of arrays [rsync.set](https://github.com/mattijs/node-rsync#setoption-value) is call with each array spread as paramamiters e.g:\n\n```javascript\n\n\"sync-rsync.options\": [\n    ['progress'],\n    ['exclude-from', '/path/to/exclude-file'],\n    ['delete'],\n]\n```\n\n## Includes / Excludes\n\nIncludes happen before Excludes, this is important because rsync handles a file based on first match, so for example to only upload php files:\n\n```javascript\n{\n    \"sync-rsync.exclude\":[\n        \"*\"\n    ],\n    \"sync-rsync.include\": [\n        \"*/\",\n        \"**/*.php\"\n    ],\n}\n```\n\nif you need more control use ```sync-rsync.args```\n\n\n## Windows Notes\n\nIf using cywgin, `sync-rsync.cygpath` is needed for things like `onSaveIndividual` to work because cygwin uses diferent paths as windows.\n\nHere is as example config:\n\n```javascript\n{\n    \"sync-rsync.executable\": \"/bin/rsync\",\n    \"sync-rsync.shell\": \"/bin/ssh -p 2222\",\n    \"sync-rsync.remote\": \"root@server:/root/test/\",\n    \"sync-rsync.local\": \"c:\\\\Users\\\\root\\\\sync_test\\\\\",\n    \"sync-rsync.onSaveIndividual\": true,\n    \"sync-rsync.cygpath\": \"C:\\\\cygwin64\\\\bin\\\\cygpath.exe\",\n    \"sync-rsync.executableShell\": \"C:\\\\cygwin64\\\\bin\\\\bash.exe\"\n}\n```\n\nHere is and example config for WSL:\n\n```javascript\n{\n    \"sync-rsync.remote\": \"root@server:/root/folder/\",\n    \"sync-rsync.local\": \"/mnt/c/Users/root/folder/\",\n    \"sync-rsync.useWSL\": true\n}\n```\n\n## Mac OS Notes\n\nIf you are using the `shell` option to do something like `ssh -p 123` you will most likely have the set `sync-rsync.executableShell` to `/bin/bash`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisboyiscrazy%2Fvscode-rsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthisboyiscrazy%2Fvscode-rsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisboyiscrazy%2Fvscode-rsync/lists"}