Scan your whole stack
Are you using pty-to-stdio?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.9.0
pty-to-stdio was last scanned on 25 Nov 2026 at version 0.9.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.9.0 LATEST | 25 Nov 2026 | No rules fired |
| 0.0.0-stage | 25 Nov 2026 | Not shown |
Findings for v0.9.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.9.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Bridge a program in a pseudo-terminal to standard input/output
This is a small Command-Line Interface (CLI) for conveniently running
an interactive program, like the AI agent harness CLIs Claude Code,
Codex, or Copilot, in a pseudo-terminal (PTY) and bridging this
pseudo-terminal to plain standard input/output pipes. It allows a
Node.js application to host interactive terminal programs without
depending on the native addon node-pty itself: the application just
spawns npx -y pty-to-stdio -- <command> [<arg> ...] as an ordinary
child process and talks to it over its pipes.
The PTY-to-Stdio program runs the given command in a pseudo-terminal of the given initial size, in the given working directory and with its own environment (see Environment below), copies the raw output of the pseudo-terminal to standard output, reads framed input data and resize requests from standard input (see Protocol below), and terminates with the exit status of the command.
$ npm install -g pty-to-stdio
Usage: pty-to-stdio [options] -- <command> [<arg> ...]
Bridge a program in a pseudo-terminal to standard input/output
Options:
-V, --version show program version information
-c, --cols <n> initial terminal columns (default: "80", env: COLS)
-r, --rows <n> initial terminal rows (default: "24", env: ROWS)
-d, --cwd <dir> working directory of the command (default: ".")
-h, --help show this usage help
Example:
$ npx -y pty-to-stdio \
--cols 120 \
--rows 40 \
--cwd ~/project \
-- \
claude --continue
Standard Output carries the raw output of the pseudo-terminal, unchanged and without any framing.
Standard Input carries a sequence of frames, so that input data and control messages never mix. Each frame consists of a 1-byte type, a 4-byte unsigned big-endian payload length (at most 1 MiB), and the payload:
i (0x69): input data, passed unchanged to the
pseudo-terminalr (0x72): resize, a payload of the 2-byte columns and
the 2-byte rows, both unsigned big-endianAny other frame is a protocol violation, which kills the command and terminates with exit status 1.
Closing Standard Input hangs up the pseudo-terminal: the command
receives SIGHUP and, if it is still running after 5 seconds,
SIGKILL. The signals SIGHUP, SIGINT, and SIGTERM received
by PTY-to-Stdio itself are passed on to the command.
Exit Status is the one of the command, resp. 128 plus the number of the signal which terminated it.
Example (Node.js):
import { spawn } from "node:child_process"
const frame = (type, payload) => {
const head = Buffer.alloc(5)
head.writeUInt8(type.charCodeAt(0), 0)
head.writeUInt32BE(payload.length, 1)
return Buffer.concat([ head, payload ])
}
const child = spawn("npx", [ "-y", "pty-to-stdio", "--", "bash" ],
{ stdio: [ "pipe", "pipe", "inherit" ] })
child.stdout.on("data", (data) => { process.stdout.write(data) })
child.stdin.write(frame("i", Buffer.from("stty size; exit\r")))
const size = Buffer.alloc(4)
size.writeUInt16BE(132, 0)
size.writeUInt16BE(50, 2)
child.stdin.write(frame("r", size))
The command inherits the environment of PTY-to-Stdio, except for
what npm resp. npx injected when it started PTY-to-Stdio, so the
command sees the environment of the caller of npx instead:
npm_*,INIT_CWD, NODE, and COLOR, and.../node_modules/.bin and .../node-gyp-bin
prepended to PATH, which would otherwise shadow the programs of
the caller with the ones of the npx package cache.EDITOR is kept, as npm sets it only when the caller had no own
value. When PTY-to-Stdio is started directly instead of through
npm or npx, the environment is passed on unchanged. Use the option
--cwd to run npx from a neutral directory (without a package.json
or .npmrc of its own) while the command still runs in the intended
working directory.
The pseudo-terminal is provided by the native addon node-pty, whose
prebuilt binaries need neither an install script nor a C/C++ toolchain:
On Linux with the musl C library (e.g. Alpine Linux), the prebuilt
binaries cannot be loaded, so PTY-to-Stdio refuses to start unless
node-pty was built from source: install it with the install scripts
of node-pty allowed, npm_config_build_from_source=true, and a C/C++
toolchain (python3, make, g++).
Copyright © 2026 Matthias Brusdeylins
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.