Ghostel.el: Terminal emulator powered by libghostty

signa111 pts0 comments

ghostel.el - Terminal emulator powered by libghostty

ghostel.el - Terminal emulator powered by libghostty

Table of Contents

1. Quick Start

1.1. Shell integration at a glance

1.2. Input modes at a glance

2. Requirements

3. Installation

3.1. MELPA

3.2. use-package with :vc (Emacs 30+)

3.3. use-package with :load-path

3.4. Manual

3.5. Native module

3.6. Platform notes

3.6.1. Windows

4. Building from source

4.1. Bundled terminfo

5. Shell integration

6. Input modes

6.1. Mode-switch keybindings

6.2. Semi-char mode (default)

6.3. Char mode

6.4. Emacs mode

6.5. Copy mode

6.6. Mouse selection

6.7. Line mode

6.8. Scrollback search outside copy mode

7. Features

7.1. Terminal emulation

7.2. Process model

7.3. Bookmarks

7.4. Links and file detection

7.5. Clipboard

7.6. Input

7.7. Password prompt detection

7.8. Shell integration features

7.9. Rendering

7.10. Inline images (Kitty graphics protocol)

7.10.1. Limitations

7.11. Calling Elisp from the shell

7.12. Notifications and progress

7.13. Color palette

8. TRAMP (Remote Terminals)

8.1. Remote shell integration

8.1.1. Option 1: Automatic injection (recommended for convenience)

8.1.2. Option 2: Manual setup (recommended for permanent remote hosts)

8.2. Remote xterm-ghostty terminfo

8.2.1. TRAMP-launched ghostel

8.2.2. Outbound ssh from a local ghostel buffer

8.2.3. Manual install (no auto-machinery)

8.2.4. Drop the Ghostty advertisement entirely

9. Configuration

9.1. Process and environment

9.2. Native module

9.3. TRAMP and remote

9.4. Rendering and performance

9.5. Images

9.6. Links, clipboard, and detection

9.7. Password prompts

9.8. Notifications and progress

9.9. Input and interaction

9.10. Line mode

10. Extensions

10.1. Evil-mode

10.2. Compilation mode

10.2.1. Live mode switching

10.2.2. Keybindings (ghostel-compile-view-mode, also active during a read-only run)

10.2.3. Make compile / recompile / project-compile use ghostel

10.2.4. Hooks for your own integrations

10.3. Eshell integration

10.4. Comint integration

10.5. Emacs Lisp input methods

11. Commands

11.1. Sending input from Lisp

11.2. Project integration

12. Running tests

13. Performance

13.1. Native vs Emacs PTY

13.2. Burst absorption (cat a 10 MB file)

13.3. Typing latency

14. Ghostel vs vterm and eat

14.1. Feature comparison

14.2. Key differences

15. Architecture

15.1. PTY and process ownership

15.2. Renderer and buffer positions

15.2.1. Renderer-owned buffer position preservation

15.2.2. Avoid around-redraw semantic patching in Elisp

16. Contributing

17. Changelog

18. License

19. Indices

19.1. Command and function index

19.2. Concept index

Ghostel is an Emacs terminal emulator powered by libghostty-vt - the same VT<br>engine that drives the Ghostty terminal. A native dynamic module written in<br>Zig handles terminal state, rendering, and local PTY I/O; Elisp manages<br>keymaps, buffers, commands, and remote process integration.

Ghostel is inspired by emacs-libvterm and follows the same two-layer design,<br>but uses Ghostty's modern VT engine instead of libvterm. This brings the Kitty<br>keyboard and graphics protocols, rich underline styles, OSC 8 hyperlinks, OSC<br>4/10/11 color queries, and synchronized output (DEC 2026) - none of which<br>libvterm supports. See Ghostel vs vterm and eat for a detailed comparison.

The native module is downloaded automatically on first use, so no toolchain is<br>required for the common case. Open a terminal with M-x ghostel.

Table of Contents

1. Quick Start

1.1. Shell integration at a glance

1.2. Input modes at a glance

2. Requirements

3. Installation

3.1. MELPA

3.2. use-package with :vc (Emacs 30+)

3.3. use-package with :load-path

3.4. Manual

3.5. Native module

3.6. Platform notes

3.6.1. Windows

4. Building from source

4.1. Bundled terminfo

5. Shell integration

6. Input modes

6.1. Mode-switch keybindings

6.2. Semi-char mode (default)

6.3. Char mode

6.4. Emacs mode

6.5. Copy mode

6.6. Mouse selection

6.7. Line mode

6.8. Scrollback search outside copy mode

7. Features

7.1. Terminal emulation

7.2. Process model

7.3. Bookmarks

7.4. Links and file detection

7.5. Clipboard

7.6. Input

7.7. Password prompt detection

7.8. Shell integration features

7.9. Rendering

7.10. Inline images (Kitty graphics protocol)

7.10.1. Limitations

7.11. Calling Elisp from the shell

7.12. Notifications and progress

7.13. Color palette

8. TRAMP (Remote Terminals)

8.1. Remote shell integration

8.1.1. Option 1: Automatic injection (recommended for convenience)

8.1.2. Option 2: Manual setup (recommended for permanent remote hosts)

8.2. Remote xterm-ghostty terminfo

8.2.1. TRAMP-launched ghostel

8.2.2. Outbound ssh from a local ghostel buffer

8.2.3. Manual install (no auto-machinery)

8.2.4. Drop the Ghostty advertisement entirely

9. Configuration

9.1. Process and environment

9.2. Native module

9.3. TRAMP and remote

9.4. Rendering and performance

9.5. Images

9.6. Links, clipboard,...

mode ghostel integration remote shell terminal

Related Articles