Duba makes it easier to manage remote and local workspaces using SSH. It takes care of pulling and pushing changes, running remote commands.
$ npm install -g duba
It'll copy (or sync) the project you specified into your local workspace:
Example:
$ duba pull foobar.js
You can also run it from inside of a project to just sync it by overriding the local changes:
$ cd foobar.js
$ duba pull
Sync local changes into remote directory.
Example:
$ duba pull foobar.js && cd foobar.js
$ cat > new-file
hello world
$ duba push
Execute a command in the remote directory of the current workspace:
$ duba pull foobar.js && cd foobar.js
$ duba run head package.json
{
"name": "foobar.js"
"version": "0.0.0"