# KERSIST — Kerkar Persistent Sessions (full reference) URL: https://kersist.kerkars.com/ APT repo: https://apt.kersist.kerkars.com/ Bootstrap: curl -fsSL https://apt.kersist.kerkars.com/install | sudo bash Version: 1.0.1 License: proprietary Homepage: https://kersist.kerkars.com/ ## What it is KERSIST is a Linux command-line tool for persistent, system-managed tmux sessions. Each managed session lives behind a system-level systemd unit named kersist@NAME.service. A small supervisor tied to that unit records the session's layout and the applications running in it, and recreates that workspace after crashes and reboots. KERSIST never modifies tmux internals; the managed session is a completely ordinary tmux session at runtime. ## Core concepts - **Managed session**: a tmux session KERSIST tracks and will restart if it ends unexpectedly. Its configuration is stored at /var/lib/kersist/NAME.json and the session runs as the owner of that file. - **Accidental exit**: `exit` in the last pane or `tmux kill-session` ends the session and deletes its saved configuration. - **Intentional stop**: `kersist stop NAME` stops the session and records the intent. Deliberately stopped sessions stay stopped across reboots. - **Unexpected failure**: a tmux crash, killed server, or reboot is recovered from the saved configuration and commands. - **Threading with plain tmux**: unmanaged tmux sessions are entirely untouched. `kersist attach NAME` can adopt any existing tmux session. ## Command reference ``` kersist create NAME Create a new persistent session in the current directory and attach. kersist attach NAME Make an existing tmux session persistent; the live session is not modified. kersist ls List KERSIST sessions and ordinary tmux sessions. kersist start NAME Start (recreate) from the saved configuration. kersist stop NAME Stop but keep the configuration; stays stopped across reboots. kersist restart NAME Stop and recreate from the saved configuration. kersist drop NAME Stop managing; the tmux session keeps running. kersist --version Print the installed version. kersist --help Usage. kersist status NAME Live lifecycle state of one managed session. kersist exec NAME ... Run a command inside the session without attaching (exit status propagated; not `attach`). ``` ## Install ``` curl -fsSL https://apt.kersist.kerkars.com/install | sudo bash sudo apt install kersist kersist --version ``` The bootstrap installs the official repository signing key, configures APT sources, and verifies the repository signature. - Suite `stable`, architecture `amd64` and `arm64` - Signing key fingerprint: 6D57DDB3E19D0748E532B050C576A9B978E2BF71 ## Supported platforms - Ubuntu 24.04 LTS (amd64, arm64) - Ubuntu 26.04 LTS (amd64, arm64) - Debian 12 (amd64, arm64) - Requires systemd as PID 1, tmux 3.0+, Python 3.9+ ## Architecture ``` KERSIST CLI │ writes /var/lib/kersist/NAME.json, starts ▼ kersist@NAME.service (systemd) │ ▼ KERSIST supervisor ── recreates on crash/reboot │ ▼ tmux server + session NAME │ ▼ user shell / application ``` This website is hosted by the same mechanism: a KERSIST-managed session named `kersist-web` runs the static web server on each serving host, behind a redundant HTTPS reverse proxy with automatic failover. ## FAQ Q: Does KERSIST replace tmux? A: No. It composes tmux and systemd. Sessions remain ordinary tmux sessions. Q: Do sessions survive a reboot? A: Yes — layout and launched applications are replayed from the saved configuration, unless you intentionally `kersist stop NAME` first. Q: What if tmux crashes? A: KERSIST recreates the session and replays the command that was running in each pane. Q: What if I type `exit` in the last pane? A: The session and its configuration are deleted. KERSIST does not resurrect deliberate exits. Q: How do I uninstall? A: `sudo apt remove kersist` (or `sudo apt purge kersist`). Unmanaged tmux sessions are unaffected.