0.15.0
deno wrapper over rust protable-pty that exposes a simple interface
Attributes
Includes Deno configuration
Repository
Current version released
a year ago
Dependencies
deno.land/x
Deno Pty FFI
deno wrapper over https://docs.rs/portable-pty/latest/portable_pty/ that exposes a simple interface
Usage
This module requires --unstable
(for ffi)
import { Pty } from "https://deno.land/x/deno_pty_ffi/mod.ts";
const pty = await Pty.create({
cmd: "bash",
args: [],
env: [],
});
// executs ls -la repedetly and shows output
while (true) {
await pty.write("ls -la\n");
console.log(await pty.read());
await new Promise((r) => setTimeout(r, 100));
}