TIL: `magic-wormhole` to send files

There are so many way to get a file from one computer to another: put it on a server, AirDrop, email, Slack, Google Drive, Dropbox, to name a few. Magic Wormhole is one more handy addition to that magic-wormhole is one more addition to that list.

What I like about magic-wormhole is that it’s a CLI and is completely ad hoc. There’s nothing to clean up when you’re done and no leftover artifacts in your email/Drive/Dropbox/etc. If you want to send a bunch of files, you don’t have to create a zip; that happens automatically. You run wormhole send on one machine, wormhole receive [code] on the other, and you’re done. The codes are short and easy to say aloud. Here’s what an exchange looks like:

Computer A

$ wormhole send projects
Building zipfile..
Sending directory (86.9 MB compressed) named 'projects'
Wormhole code is: 44-hemisphere-lemon
█▀▀▀▀▀▀▀█▀▀██▀▀█▀██▀▀▀█▀▀▀▀▀▀▀█
█ █▀▀▀█ █▄▀  █▄█▀▄▄ ▀▄█ █▀▀▀█ █
█ █   █ █▄▄▀▄██ ▀▀▄█ ██ █   █ █
█ ▀▀▀▀▀ █▀█ ▄ ▄▀█▀█ ▄ █ ▀▀▀▀▀ █
█▀█▀▀█▀▀▀▄ ▀▀▀▀█▀   ███▀██▀█▀▀█
█▄█▀ █ ▀▀▄█▄   ▄█  ▄▄▀  ▄▄   ▄█
█ █▀▄▀▀▀▄█▄ ▀██▀██▀▄▄ █████▀▀██
█▄▄█ ▄▀▀▄  ▀██▀▄▄▄ ▄ ▄▄ █▀▀█  █
█▀▀▀█▀ ▀▀▄██ ██ ▄██▀█▄▀▄█ ▄█▀ █
█▀█ ▄▀ ▀██▄█ ▄▀  ▀█ ████▄▀▀ ███
██▀█▀█ ▀▄ █▄▄█  ▀  ▀▄ ▀ ▀▀    █
█▀▀▀▀▀▀▀█ ▀█ ▄█▀█▀ ▄  █▀█ ▄ ▀▄█
█ █▀▀▀█ █▄▄█  ▄▄▀█▀█▄ ▀▀▀ █▀█▄█
█ █   █ █ ▀▄▀▀▄█▄ ▄▀▀█▄█▀▄▄▄█ █
█ ▀▀▀▀▀ █▀ ▀▄▀ ▄█▀█▀  ▀█▄ ██ ██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
On the other computer, please run:

wormhole receive 44-hemisphere-lemon

Computer B

$ wormhole receive 44-hemisphere-lemon
Receiving directory (86.9 MB) into: 'projects'/
1093 files, 86.7 MB (uncompressed)
ok? (Y/n): Y
Receiving (->tcp:192.168.1.186:54503)..
100%|██████████████████████████████████| 86.9M/86.9M
Unpacking zipfile..
Received files written to: /Users/ryan/Downloads/projects

The code (44-hemisphere-lemon in this example) is short-lived and can only be used once. The docs have more details on how the exchange works. The package is magic-wormhole, with wormhole as an alias for the magic-wormhole command.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论