keep-running
A terminal session manager. Like dtach, but with names you can remember and a CLI that doesn't fight you.
Start something, walk away, come back, it's still running.
# detach with Ctrl+a d, close your terminal, go to lunch...
Install
From crates.io:
From source:
Unix only (Linux, macOS). Uses Unix domain sockets.
Use
Shortcuts at the top level:
Inside an attached session:
Ctrl+a d detach (leave it running)
Ctrl+a k kill it
Ctrl+a Ctrl+a send a literal Ctrl+a
If you don't name a session, it gets a random one like fuzzy-penguin or quiet-otter. Any unique prefix attaches it.
Shell completions
Also supports elvish and powershell.
Where state lives
- Session metadata (
<name>.json):$XDG_CONFIG_HOME/keep-running/sessions/(typically~/.config/keep-running/sessions/on Linux,~/Library/Application Support/keep-running/sessions/on macOS). - Sockets:
$XDG_RUNTIME_DIR/keep-running/, or/tmp/keep-running-<uid>/if unset.
Override either with KEEP_RUNNING_SESSION_DIR / KEEP_RUNNING_SOCKET_DIR.
If a daemon crashes, leftover socket files are cleaned up on the next run/start for that name; stale .json files clear when list notices the pid is gone.
Compared to…
dtach— same idea, but sessions have names instead of socket paths you have to remember, pluslist/killbuilt in.tmux/screen— those are multiplexers.keep-runningdoes one thing: keep a process running detached. No windows, panes, or config language.
License
MIT. See LICENSE.