Skip to main content
Deno 2 is finally here 🎉️
Learn more

Deno Pty FFI

deno wrapper over https://docs.rs/portable-pty/latest/portable_pty/ that exposes a simple interface

Usage

import { Pty } from "jsr:@sigma/pty-ffi";

const pty = new Pty("bash");

// executs ls -la repedetly and shows output
pty.setPollInterval(500);
for await (const line of pty.readable) {
  console.log(line);
  pty.write("ls -la\n");
}