Haven CLI

haven is a small command-line tool that lets you browse and attach to your Haven sessions from any terminal. It's handy when you SSH directly into a machine without going through the Haven app — the work you started in Haven is right there waiting.

Install

Nothing to do. When the Haven app connects to a remote host it installs the daemon and the haven command at ~/.haven/bin/haven. Inside any session Haven spawns, that directory is already on PATH — just run haven.

To also call it from a plain SSH shell (so you can attach to your sessions from anywhere), add it to your shell's PATH:

echo 'export PATH="$HOME/.haven/bin:$PATH"' >> ~/.bashrc
# or ~/.zshrc, ~/.profile, etc.

Locally on your Mac you don't need the CLI — use the app.

Use it

Just run haven. It does the right thing:

Sessions on the hostWhat happens
NoneTells you to create one from the app
OneAttaches
More than oneOpens a picker

If you want to be explicit:

haven                  # smart default
haven ls               # list sessions
haven attach <target>  # attach by name, index, or id prefix
haven kill <target>
haven rename <target> <new-name>

<target> can be a session name, a 1-based index from haven ls, or a UUID prefix. So haven attach 2, haven attach training, and haven attach 7f3a all work.

Detach and switch

While attached, the prefix Ctrl-\ (or Ctrl-B for tmux muscle memory) is followed by:

KeysAction
Ctrl-\ dDetach — leave the session running, return to your shell
Ctrl-\ sSwitch — open the picker
Ctrl-\ ?Help overlay
Ctrl-\ Ctrl-\Send a literal Ctrl-\ to the program inside

Uninstall

Everything Haven puts on a remote host lives in ~/.haven/. To remove it:

rm -rf ~/.haven
rm -f ~/.local/bin/haven  # if you symlinked it

No system services, no files outside your home directory.

Source

The CLI and the daemon are the same Rust binary, dispatched on argv[0]. Source: github.com/christiansafka/haven-daemon (MIT).

Get in touch

Question, bug report, or feature request — we read everything.