*Magic-Wormhole* file transfer

Warp is a Rust software package that makes sending content between computers super easy using entryption and simple one-time word-based or QR-code authentication keys. Because of the underlying protocol, transfers will occur over local LAN or internet depending on where the machines involved are located. The software allows users to send and recieve files between Linux, OSX, Windows and smart phones.

I was interested in using Warp on the command line for simple low-setup file transfers in and out of my office, but it turns out that the underlying protocol that Warp leverages is also an open-source project and it already includes a CLI (magic-wormhole).

Installation #

Magic-Wormhole can be installed with the usual package managers on Linux. For example on Ubuntu (17.04 and higher), it can be installed as follows:

1
sudo apt install magic-wormhole

Or via Python’s pip package manager:

1
pip install --user magic-wormhole

Given that Warp is available as a flatpak, and magic-wormhole is also in Ubuntu’s snap package repository, there is probably not problem installing into a Docker or Singularity/Apptainer container or image.

Commands #

To send and recieve data, the wormhole send and wormhole receive commands can be called. Tab-completion is even supported for commands and sub-commands (as well as for the wormhole authentication codes on the receiving end.)

Example (from the docs) #

Sender:

1
2
3
4
5
6
7
8
9
wormhole send README.md
# Sending 7924 byte file named 'README.md'
# On the other computer, please run: wormhole receive
# Wormhole code is: 7-crossover-clockwork

# Sending (<-10.0.1.43:58988)..
# 100%|=========================| 7.92K/7.92K [00:00<00:00, 6.02MB/s]
# File sent.. waiting for confirmation
# Confirmation received. Transfer complete.

Receiver:

1
2
3
4
5
6
7
wormhole receive
Enter receive wormhole code: 7-crossover-clockwork
# Receiving file (7924 bytes) into: README.md
ok? (y/n): y
# Receiving (->tcp:10.0.1.43:58986)..
# 100%|===========================| 7.92K/7.92K [00:00<00:00, 120KB/s]
# Received file written to README.md