beorn/termless
Like Playwright, but for terminal apps — headless testing across xterm.js, Ghostty, Alacritty, WezTerm, and more
Headless terminal testing library. Like Playwright, but for terminal apps.
Terminal apps are hard to test because the terminal is a black box — you can see text on screen but can't programmatically inspect colors, cursor position, scrollback history, terminal modes, or cell attributes. Termless opens up the entire terminal buffer for structured testing, and runs the same tests against multiple terminal emulators to catch cross-terminal compatibility issues.
Built alongside silvery, a React TUI framework, but works with any terminal app.
term.screen, term.scrollback, term.cell(r, c), term.row(n) for precise assertions@resvg/resvg-js)termless capture for scripts, termless mcp for AI agentsimport { createTerminal } from "@termless/core"
import { createXtermBackend } from "@termless/xtermjs"
const GREEN = (s: string) => `\x1b[38;2;0;255;0m${s}\x1b[0m`
const term = createTerminal({ backend: createXtermBackend(), cols: 80, rows: 24 })
term.feed(GREEN("● API online"))
// String matching sees text. termless sees everything.
term.screen.getText() // "● API online"
term.cell(0, 0).fg // { r: 0, g: 255, b: 0 } — the color getText() can't see
await term.close()Loading reviews...