A command line interface for editing files from your box, on your local machine.
The perfect partner if you're developing ScraperWiki tools, and want to use your normal text editor like TextMate or Sublime Text.
Supports two alternative workflows:
- Copying the remote box files to your local machine, then pushing changes.
- Mounting the remote box as a local filesystem, using SSHFS.
swbox clone fegy5tq
– Makes a local copy of fegy5tq@box.scraperwiki.com
swbox clone g6ut126@free
- Makes a local copy of g6ut126@free.scraperwiki.com
swbox mount fegy5tq
- Mounts fegy5tq@box.scraperwiki.com as a local filesystem
-
Use npm to globally install
swbox
(nvm is really useful and gets yournpm
for free, so if you're new to Node, try that first):npm install -g swbox
(If you'd prefer not to use npm, you can always
git clone
this repo and run./prepublish
yourself to get an executable cli.js script which you can add to your$PATH
) -
Read the documentation by running
swbox help
Mounting boxes as local drives requires Fuse and SSHFS. Both are available on the Fuse for OS X homepage.
The swbox
command line client requires Node.js.
If you are developing swbox
we recommend that you run the following from the directory
containing your git clone:
./prepublish
npm link
This will put the command swbox
in the usual location where npm installs binaries (which
should already be on your PATH), and symlink it so that whenever you change this directory,
those changes are live.
You still need to compile the CoffeeScript to JavaScript before testing a change to swbox, do that with:
./prepublish
If you want to use this local in-development version of swbox with a box, then go to the box's directory and use:
npm link swbox
Now swbox = require 'swbox'
will automatically get your local in-development version of swbox.
- Swbox is now published to npm.
swbox update
is no longer required and has been removed.
swbox test
runs .coffee or .js tests in /tool/test directory, using Mocha.
- Rsync reports of "Permanently added [url] to the list of known hosts" no longer fool swbox into thinking the
push
/clone
operation failed. - Mentions of "beta.scraperwiki.com" changed to "scraperwiki.com"
swbox push --preview
will show a preview of what would be created/updated/deleted, without changing anything on the remote box.
<boxName>
can now include an optional@boxServer
suffix, allowing you to clone and mount boxes on free.scraperwiki.com and ds.scraperwiki.com (eg: viaswbox clone abcd123@free
orswbox mount wxyz789@ds
)
swbox sync
renamed toswbox push
since it doesn't actually sync, it removes any files on the destination that aren't present on the local copy.- fixed a bug that caused
swbox sync/push
to loop forever when invoked outside of a local box clone swbox clone
no longer takes an optional destination directory – it will always create a clone, in new directory named after the box, in the current working directory- removed
/swbox
symbolic link in root directory – it's no longer needed - standardised display of required and optional arguments in help messages
swbox sync
command to synchronise local changes inside a clone, back up to the original box
swbox clone
command to clone an entire box's contents to your local filesystem
- added
-oworkaround=rename
to sshfs options, to allowrsync
andgit
to rename/update files
swbox update
command to download the latest version of swbox
- mounting and unmounting boxes as sshfs drives
- license, help and docs