an experimental, infinite-canvas terminal multiplexer using gpui

Files
readme.md

tarp #

tarp is a infinite-canvas, cross-machine terminal multiplexer built using GPUI, libghostty-vt and iroh.

tarp daemon works on darwin and gnu/linux. tarp GUI has only been tested on darwin, the application definitely runs on wayland, but is not tested throughly.

in more detail:

  • tarpd is a daemon service that runs PTYs
  • tarp GUI is a desktop application that can connect to one or more daemons using iroh for transport
  • tarp GUI can arrange terminals on an infinite canvas
  • tarp GUI can detach from a daemon and reconnect, without losing any sessions or window positions
  • tarp CLI can send lua statements to control a daemon

install #

the flake provides nixos systemd modules, launchd module (for darwin) and a home-manager module:

# works on both darwin and linux
services.tarpd {
    enable = true;
    user = "yourself";
    client.ui.enable = true; # enables the GUI
};

usage #

the main way to use tarp is to run a daemon, and run the GUI client to connect to the daemon, daemons can run on macos and gnu/linux as far as i know:

# the open policy lets in any client that knows the daemon's id,
# in practice, you want to be stricter with --policy paired
$ nix run git+https://tangled.org/oppi.li/tarp#tarp -- daemon --policy open

if you want to connect to this daemon from the same machine:

$ nix run git+https://tangled.org/oppi.li/tarp#tarp-ui

to connect from elsewhere:

# daemon prints its id, grab that
INFO tarpd: listening id=988...967 policy=open identity=ephemeral

# clients can connect with the `host` flag:
$ tarp --host 988...967

you can also speak to daemons via the CLI:

$ tarp -- terminal.spawn command='["yes"]'
{ "id": "some-uuid" }

$ tarp -- terminal.capture terminal="some-uuid"
y
y
y
y
...

$ tarp -- terminal.kill terminal="some-uuid"

GUI usage #

mod is cmd on macos and ctrl on gnu/linux.

  • mod-n: new terminal
  • two finger scroll: pan
  • mod-scroll: pan
  • click and drag canvas: pan
  • pinch: zoom
  • mod-left/right/up/down: move focus to next terminal
  • mod-shift-left/right/up/down: bring adjacent terminal into view
  • mod-o: zoom to fit all terminals
  • mod-f: zoom to fit focused terminal
  • mod-escape: remove the focus from the terminal
  • mod-s: draw a new terminal
  • mod-q: quit
  • click a terminal: focus
  • mod-drag a terminal: move the terminal
  • mod-right-drag a terminal: change the size of the terminal from the corner
  • right-click the canvas: open the host menu