Guide

Getting started

Install dpty, start a session, and keep it running. macOS (Apple silicon and Intel) and Linux (x86_64, aarch64).

In this guide

Guide

On this page

Install

Three ways to get dpty on your PATH. All three produce the same binary.

Homebrew (macOS, Linux)

$brew install jasonkneen/tap/dpty

curl install script

$curl -fsSL https://raw.githubusercontent.com/jasonkneen/durable-pty/main/install.sh | sh

Installs to ~/.local/bin and verifies a sha256 checksum. Set DPTY_VERSION=v0.1.0 to pin a version, DPTY_INSTALL_DIR to change the folder, or run with --help for the full list of options.

From source

$cargo install --path .

Requires a stable Rust toolchain. Puts dpty on your PATH at ~/.cargo/bin.

Your first session

The first command that needs the daemon starts it automatically — there is nothing to run first.

zsh
$ dpty new -n work -C ~/proj -- claude "fix the bug"attached to work (session 4f0c…) — Ctrl-\ to detach

Use -d / --detach to create a session without attaching to it, and -e KEY=VALUE to set extra environment variables.

Attach and detach

Attach by id, name or label. Detach without stopping anything by pressing Ctrl-\.

zsh
$ dpty attach work… live output …[detached: work]

Nothing stops when you detach. Reattach any time with the same command, from any terminal.

Run at login

dpty install sets up launchd on macOS or systemd --user on Linux, so the daemon starts at login and restarts if it exits.

zsh
$ dpty installinstalled — dpty will run at login and restart if it exits

Uninstall

dpty uninstall removes the login service. It keeps your sessions and history in ~/.durable-pty so nothing is lost by accident.

zsh
$ dpty uninstalluninstalled (sessions and history in ~/.durable-pty are kept)

To remove everything, delete the data directory yourself once you no longer need it: rm -rf ~/.durable-pty (or the directory you set with DPTY_HOME).