Skip to content

A Multi Platform Terminal Emulator & Multiplexer Running over WebRTC with Touch First UI

License

Notifications You must be signed in to change notification settings

tuzig/terminal7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal7 - A touchable terminal multiplexer running over WebRTC

Screen Shot 2022-01-06 at 22 31 04

Tests License Platform Languages Closed Issue Open Issues

Terminal7 is a terminal that includes a terminal multiplexer made for modern web clients and real time communications over WebRTC. A reincaranation of screen and tmux, Terminal7 is a hybrid app that designed for smart clients.

The code here is in vanilla TypeSctipt, relying chiefly on the following projects:

  • CapacitorJS for app packaging & plugins
  • Xterm.js for terminal emulation
  • noble-ed25519 for key generation
  • pion.ly for the WebRTC backend
  • Vite for packaging
  • Vitest for testing
  • Docker compose for acceptance tests
  • Playwright for end-to-end tests
  • MailHog for an SMRP test double

For networking on native clients, we support SSH as a fallback. On the web, only WebRTC servers are supported. Our WebRTC server is writtten in go and is based on pion/webrtc. It supports both direct and relayed connections, and can be used with or without a TURN server.

If you're having problems with your first connection, please refer to our troubleshooting guide.

Installation

For web platforms, Terminal7 is packaged as a Progressive Web App (PWA) and can be installed from the browser. Click here for the latest version.

For tablers, you can get Terminal7 for free from the App Store or Google Play.

Installing the server

To connect from the browser you'll need the webexec agent running. webexec is an open source WebRTC server written in go and based on pion. Terminal7 should offer to install it for you, but if it doesn't, open TWR and run install to ensure your agent is up.

If you that doesn't work you can install webexec using go:

go install github.com/tuzig/webexec@latest
webexec start

If you don't have go, you can use our line installer to download the binary for your system and start it:

  bash <(curl -sL https://get.webexec.sh)

webexec will start an HTTP WHIP server on port 7777, waiting for the client to connect. If pperbook user is set, webexec will also connect to peerbook.io so it can accept connections even when behind-the-NAT.

webexec's CLI has a growing set of commands, use webexec to get help on the current set.

Clipboard integration

Terminal7 has a clipboard integration that works over WebRTC. From the CLI you can:

  • webexec copy < FILE to get the file into the client's clipboard
  • webexec paste to print rhe client's clipboard to stdout

If no peer are actives, e.g. you're using a classic terminal, webexec will look for the tools:

  • pbcopy, pbpaste on MacOS
  • xclip, xsel on Linux

neovim integration will let you use use the + and * named buffer to copy to and from the clipboard. Just 12 lines in your init.lua:

    vim.g.clipboard = {
        name = 'webexec',
        copy = {
            ["+"] = {'webexec', 'copy'},
            ["*"] = {'webexec', 'copy'},
        },
        paste = {
            ["+"] = {'webexec', 'paste'},
            ["*"] = {'webexec', 'paste'},
        },
        cache_enabled = true,
    }

When webexec is not install, neovim will try the default clipboard tools like xclip or pbcopy.

Contributing

We are looking for contributors to help us improve Terminal7. Please read our contributing guide before rolling your sleeves.