Durable terminal sessions

Your shells keep running on your own computers.

KalaReach holds a terminal session open on the machine that owns it. To connect to that session you can either open up a terminal window and use kr attach to connect, or you can use the companion application, on that same machine or on a phone or a computer with no host of its own that is paired with it. Close the window or lose the connection and the session and the agent inside it keep running on that host; attach again from any terminal, over SSH if you are elsewhere.

A session outliving its window
# On the host: start a session and work in it normally.
$ kr new --attach --shell-mode managed
$ codex
# Close the window. The attachment goes; the agent does not.
# Later, on that host or over SSH to it:
$ kr list
   1  live     managed          80x24   0 attachments  codex           /home/sam/.local/share/kalareach/host/versions/0.1.0+7c68ef8cf3c0/shells/zsh/3f9a1c7e5b2d4086/bin/zsh
$ kr attach 1

What it is

A session belongs to a computer, not to a window.

Sessions are processes running on your host. Each owns the pseudo-terminal, the canonical screen state and the record of what was approved. What you attach to the sessions can be a terminal window, a tab, a desktop app or even another terminal on a remote computer, ssh-ed into your host.

Attach from an ordinary terminal

Against a qualified terminal at the session’s own size, kr attach runs in direct mode and forwards the approved bytes: native mouse reporting, keyboard handling and hyperlinks. Otherwise it falls back to projected mode, which renders the canonical screen and does not reproduce your emulator’s own scrollback. kr status names the mode and the reason for it.

Agents keep running when you disconnect

Detaching removes your view. It does not stop the work. An agent mid-task keeps its process, its file handles and its pending questions, for as long as its host keeps running it. A reboot ends a session. Logging out of the desktop ends a desktop-bound one; a headless profile survives it only where the platform and the configuration say so. A sleeping machine resumes its work on waking rather than carrying on through the night.

Pair without an account

Type a ten-character code shaped XXXX-XXX-XXX, or paste a direct invitation. The invitation lasts five minutes and you approve the new device on the machine that issued it.

Open-source clients and host

The kr command, the local host and the desktop and mobile apps are BSD 3-Clause licensed. Direct connections and local sessions never need a KalaReach account.

The companion application

The companion application is for viewing your attention inbox, your sessions, a conversation view for agents, and a terminal view for everything else. It will connect to and work with the host on the computer it is running on. If there is no host on that computer, it works with the first host it pairs with. You can view the list of hosts that the companion has paired with under “Pair with a host”. A phone has no host of its own, so it will pair with hosts and show them on its “Hosts” screen. You can select which host you want to use. On a computer or a phone that is an owner device of a paired host, the host will ask the companion to confirm sensitive actions. On a Mac, it will ask you to confirm with Touch ID or your password. On Windows, it will ask you to confirm with Windows Hello. On Linux, the application says where to confirm instead. On an iPhone, it will ask you to confirm with Face ID, Touch ID, or your passcode. On Android, it will ask you to confirm with your fingerprint, your face, or (from Android 11) your screen lock. The companion application is built for Linux, macOS, Windows, iOS and Android.

Optional managed services

If you need to relay more than the amount available in the free service, that bandwidth is available for purchase as part of a hosted service. The self-hosting page lists the rest of what the service sells and what a host can use of it. Nothing you do on your own machine will require you to pay them a thing.

Authority

The host decides. Clients ask.

A client shows you what a session looks like and submits what you want to do. The host checks that request against the session’s current state and the grant the device actually holds. Traffic passing through a relay and text produced by a model create no permission at all.

  • Separate keys are used for each paired device for each purpose: transport, signatures, stored envelopes, and notification previews.
  • Enlarging a grant, trusting a new repository root or issuing a persistent invitation needs a fresh confirmation on the owner’s machine, bound to that exact action.
  • Revoking a device stops future access. Personal owner grants stay valid until you revoke them, so a cloud outage cannot lock you out of your own computer.

Read the security model