sess

dtach sessions with overlay isolation

Linux OverlayFS macOS APFS clones SSH remote sessions 1 file ~1100 LOC bash
$ npx @deepaksilaych/sess
terminal
# create a session โ€” you're in, working
$ sess new feature-auth
Session 'feature-auth' created. Attaching...
feature-auth | none | main | ~/project     14:30

# ...work in session... Ctrl+\ to detach

# reattach later
$ sess feature-auth

# close laptop. open laptop. all sessions still alive on the VM.
$ sess up
Reconnecting to 1 session(s)...

# create an isolated overlay (only deltas stored)
$ sess overlay new feature-auth bugfix-1222 main
Overlay 'bugfix-1222' created and mounted.

# writing to the overlay does NOT touch the original repo
$ sess diff feature-auth
+overlay change

# open Cursor on laptop, connected to VM session
$ sess code feature-auth
๐Ÿ”Œ

dtach persistence

Single Unix socket per session. No server process. Ctrl+\ to detach, sess <name> to reattach. Survives SSH drops.

๐Ÿ—‚๏ธ

Overlay isolation

N independent writable views of the same repo. Only deltas stored. Writing to one overlay never touches another or the base.

๐Ÿ“ก

Remote sessions

Sessions live on the VM. Your laptop is just a terminal. sess ssh connects, sess up reconnects all on wake.

๐Ÿ“‹

Connection log

Tracks how each session ended: detach (Ctrl+\), exit (typed exit), or drop (SSH timeout/laptop sleep).

๐Ÿ–ฅ๏ธ

Editor integration

sess code <name> opens Cursor/VS Code via Remote-SSH. No manual config needed.

๐Ÿ“Š

Status bar

PROMPT_COMMAND renders session | overlay | branch | path. Plain text, no colors, no multiplexer needed.

Remote workflow

macOS laptop โ†’ Linux VM
# one-time: point sess at your VM
$ sess remote add default user@dev-vm

# daily workflow
$ sess new feature-auth       # SSH to VM, create, attach
$ sess feature-auth           # reattach
$ sess code feature-auth      # open Cursor on laptop
$ sess ssh                    # plain SSH to VM

# close laptop. open laptop.
$ sess up                     # reconnects everything

# how did my last session end?
$ sess connections feature-auth
2026-07-09T14:30:00  detach (Ctrl+\)
2026-07-09T15:12:00  drop (exit code 141)
2026-07-09T16:45:00  exit

All commands

sess new <name> [branch] Create session + auto-attach sess <name> Attach to existing session (Ctrl+\ to detach) sess ls List sessions sess rm <name> Remove session (unmounts overlays) sess overlay new <s> <ov> [br] Create overlay from latest default branch sess overlay switch <s> <ov> Switch active overlay sess overlay ls <s> List overlays sess overlay rm <s> <ov> Remove overlay sess diff <name> [path] Git diff in overlay sess log <name> [N] Activity log sess connections <name> [N] Connection log (detach/exit/drop) sess path <name> Print overlay/cwd path (for scripts) sess code <name> Open Cursor/VS Code for session sess ssh [args] SSH to configured remote VM sess up Reconnect to previously active sessions sess remote add [name] <host> Configure a remote VM sess remote ls List remotes sess remote rm [name] Remove a remote sess status [name] Session info or overall status sess doctor Check prerequisites

Platform support

FeaturemacOSLinux
dtach sessionsโœ“โœ“
Status barโœ“โœ“
Connection logโœ“โœ“
Remote (SSH to VM)โœ“โœ“
Auto-reconnect on wakeโœ“ SleepWatcherโœ“ systemd
sess codeโœ“ Cursor/VS Codeโœ“
Overlay isolationโœ“ APFS cloneโœ“ OverlayFS

Why notโ€ฆ

sess git worktree tmux Docker
Isolation per-overlay branch-level shared FS full
Creation ~instant ~1s N/A ~seconds
Disk/session delta only full copy 0 full copy
SSH persist โœ“ dtach โœ— โœ“ manual
Extra process none none server daemon
Path stability same path varies โ€” mapping

Architecture

~/.sess/sessions/<name>/
~/.sess/sessions/feature-auth/
โ”œโ”€โ”€ socket              โ† dtach Unix socket
โ”œโ”€โ”€ hook.sh             โ† PROMPT_COMMAND status bar
โ”œโ”€โ”€ state               โ† session metadata
โ”œโ”€โ”€ log                 โ† activity log
โ”œโ”€โ”€ connections         โ† detach/exit/drop log
โ””โ”€โ”€ overlays/
    โ””โ”€โ”€ bugfix-1222/
        โ”œโ”€โ”€ upper/      โ† writable layer (deltas only)
        โ”œโ”€โ”€ work/       โ† kernel work dir
        โ””โ”€โ”€ merged/     โ† unified mount point

Get started

One file. No dependencies beyond dtach and git.