session is a lightweight terminal session manager for persistent shells.
It is designed for the simple workflow:
- start a session
- disconnect from SSH or close your terminal
- come back later
- run
session --resumeand jump back in
Unlike screen, this project stays focused on session persistence and quick re-entry, not full terminal multiplexing.
- Persistent shell sessions backed by a PTY
- Resume picker built with Bubble Tea
- Newest-first session list
- Named sessions with
--name - Detach shortcut with
Ctrl-Bthend - Session bar at the top of attached terminals
- Live session details in the list and resume UI:
- session name
- current working directory
- detected foreground application
- shell and daemon PIDs
- Single-binary workflow
This is an intentionally small first version.
Current behavior:
- one client attached to a session at a time
- one shell per session
- sessions are stored under the user state directory:
$XDG_STATE_HOME/session- or
~/.local/state/session
One-line install to /usr/local/bin:
curl -fsSL https://raw.githubusercontent.com/SarahRoseLives/session/main/install.sh | shThe installer downloads the latest GitHub release binary and places it at /usr/local/bin/session. It currently supports Linux amd64 and Linux arm64. If /usr/local/bin is not writable, it will use sudo.
Build it locally:
go build -o session .Or install it to your Go bin directory:
go install .Start a new session:
sessionStart a named session:
session --name workbenchList saved sessions:
session --listOpen the interactive resume picker:
session --resumeDetach from an attached session without stopping it:
- press Ctrl-B then d
The --resume screen supports:
- arrow keys or
j/kto move - enter to reconnect
- q or esc to cancel
It adapts to smaller terminals by switching to a compact layout and trimming long values.
When you start a session, session launches a detached background daemon that:
- starts your shell inside a PTY
- stores session metadata on disk
- exposes a Unix socket for reconnecting
- forwards terminal input, output, and resize events
The resume view reads saved sessions, checks which ones are still alive, enriches them with runtime details from /proc, and presents them newest first.
screen is a powerful multiplexer.
session is narrower by design:
- better for: “keep this shell alive and let me get back to it later”
- not trying to be: multiwindow management, copy mode, splits, or a full multiplexer replacement
Run tests:
go test ./...