Skip to content

Emacs

The client is MIT-licensed.

ubiquitty-sync.el attaches to a session on ubiquitty-host and draws it in an Emacs buffer. The terminal itself runs in the host, not in Emacs, so the session survives an Emacs restart and can be open in the macOS app and in Emacs at the same time. It speaks Sync in Emacs Lisp with no native module.

An Emacs GUI window split between its welcome buffer and Neovim running in the Ubiquitty client, in Noir.
Neovim running inside Ubiquitty inside Emacs GUI.
  • Draws the screen from the host’s checkpoint and row updates, and checks the checkpoint’s SHA-256.
  • Forwards keys and the mouse. C-c is the prefix for Emacs commands: C-c C-q detaches, C-c C-c sends an interrupt.
  • Draws inline images on graphical frames, including crops and PNG-backed RGBA transparency.
  • Colours the session with your Ubiquitty theme.

The client does not provide a scrollback view, link opening, consent prompts or QUIC. Double-width and double-height rows are approximated; Unicode-placeholder images draw blank; text-mode Emacs draws no images.

Open a terminal in Emacs without leaving your editor. You can even run Neovim in that terminal, then open another host session from Neovim.

Layers, from the outside in: Ubiquitty draws the screen; Emacs runs in it, with a notes window on the right listing the layers and, on the left, its Ubiquitty client attached to the host session outer, labelled outer: ~/demo in its header line; in that session Neovim runs, split in two, with frame.c on the right and, on the left, its Ubiquitty client attached to the host session inner, labelled ubiquitty://inner: ~/demo in its status line; in that session Emacs edits frame.c, with its own mode line.
Emacs opens a host session running Neovim. Inside Neovim, another host session runs Emacs, editing frame.c.

Requirements: Emacs 27.1 or later, and the ubiquitty-host binary. The macOS app has it at /Applications/Ubiquitty.app/Contents/Helpers/ubiquitty-host, or build it:

Terminal window
UBQ_BUILD_ROOT="$PWD/build" ./Scripts/build-host.sh # build/host/ubiquitty-host
(use-package ubiquitty-sync
:load-path "/path/to/ubiquitty/Source/Platform/Emacs"
:custom
;; Only needed when ubiquitty-host is not on PATH:
(ubiquitty-sync-host-program "/path/to/ubiquitty-host"))

Then M-x ubiquitty-sync. The client starts the host if none is running and attaches through ubiquitty-host --attach; the host refuses a direct socket connection from Emacs, because only its own binaries connect without a token.