To install Buncurlcurl -fsSL https://bun.sh/install | bashnpmnpm install -g bunpowershellpowershell -c "irm bun.sh/install.ps1|iex"scoopscoop install bunbrewbrew tap oven-sh/bunbrew install bundockerdocker pull oven/bundocker run --rm --init --ulimit memlock=-1:-1 oven/bunTo upgrade Bunbun upgradeBun.Terminal API for pseudo-terminal (PTY) supportBun now has a built-in API for creating and managing pseudo-terminals, enabling interactive terminal applications like shells, vim, htop, and any program that expects to run in a real TTY.Use the new terminal option in Bun.spawn() to attach a PTY to your subprocess:const commands = ["echo Hello from PTY!", "exit"];
const proc = Bun.spawn(["bash"], {
terminal: {
cols: 80,
rows: 24,






