Skip to content

Architecture

Katu is one binary with two roles:

  • Server — a background daemon that owns the PTYs, keeps sessions alive across disconnects, and exits when the last session ends. It starts automatically on first use. Each session runs as an actor task holding a vt100 grid per pane, so reattaching repaints the exact screen and panes compose into one view.
  • Client — a stateless process that connects over a Unix socket (mode 600) and bridges your terminal to a session.

Everything Katu writes (~/.katu, context files, the socket) is restricted to your user (directories 0700, files 0600).

  • crates/katu-core — config, IPC protocol, shared types (no HTTP or UI deps).
  • crates/katu — the CLI, client, and server.

The client renders and forwards input; the server owns session/PTY state; katu-core owns config/protocol/keys. Requests and session commands flow over the Unix socket as length-prefixed frames.