ShWiM: peer-to-peer terminal sharing
August 01, 2025
Built on top of Fowl, shwim
uses tty-share with localhost
-only network addresses over Magic Wormhole (via Fowl) so you get durable, end-to-end-encrypted, on-demand terminal sharing.
Install from PyPI or peruse the source code to get started.
The host types shwim
which prints out a magic code, and the guest side types shwim <magic-code>
. Now both sides are typing on (and seeing output from) the “host” machine.

Why?
The tty-share
project hosts a public service – however, while traffic to the server is encrypted, it can see all content. Also, if you sleep your laptop or disconnect briefly, the connection is gone.
Using the “magic” of a Dilated Magic Wormhole we can easily layer “durability” and “end-to-end encryption” on top of the existing tty-share
program (with zero changes to tty-share
itself).
Durability
We say a connection is “durabile” when it can survive interruptions and inconsistency while remaining invisible to the application protocol (i.e. tty-share
in this case). Magic Wormhole will re-connect on changed IP addresses or other network conditions, correctly resuming the flow of bytes for tty-share
right where it left of – it can’t tell if you simply didn’t type or 10 minutes, or re-located to the coffee-shop.
End-to-End Encryption
Only two computers have a shared secret after the Magic Wormhole system produces, and then consumes a “secret code”. This is what happens with shwim
. So, no other program (including the Magic Wormhole mailbox server) can decrypt any of the content of any messages.
These secret codes are also one-time use only, meaning there’s a much smaller window when observing / intercepting a code is useful (i.e. before your intended party consumes it). Even if such interception is successful, you will notice: your partner will not be connected.
Why Not X…?
There are many different ways to share terminals and screens. If you have a different system that works for you: great!