A Python binding to libghostty-vt, the terminal emulator at the core of Ghostty, built with PyO3 on libghostty-rs and packaged with maturin. Feed it the bytes a program writes to its terminal, and read back what that terminal shows, as values.
from evp import RenderState, Terminal
terminal = Terminal(80, 24, max_scrollback_bytes=10_000_000)
state = RenderState(terminal)
terminal.feed(b"hello, \x1b[1;31mworld\x1b[0m\r\n")
frame = state.frame()
print("".join(frame.rows[0].graphemes).rstrip()) # hello, worldThe name is a pun: EVP, electronic voice phenomena, are the voices ghost hunters claim to record, and evp is how Python hears from Ghostty.
evp is on PyPI, and needs Python 3.13 or newer:
pip install evpTo build it from source, install mise,
which provides Rust, Zig, just and uv at the versions in mise.toml, then:
mise install
just buildThe first build clones and compiles Ghostty, which takes a few minutes.
- Documentation
- libghostty-rs, the Rust crate evp builds on
- Ghostty
- counterweight, the terminal UI framework evp was written for