@tuishot/cli
v0.2.1
Published
Capture exact screenshots of terminal user interfaces
Readme
@tuishot/cli
Native tuishot CLI and typed Node.js API for Node 18 and newer.
npm install --save-dev @tuishot/cli
tuishot --size 120x40 --wait-text Ready -o dashboard.png -- my-tuiimport { writeFile } from "node:fs/promises";
import { shoot, runScenes } from "@tuishot/cli";
const capture = await shoot({
command: "my-tui",
args: ["--fixture", "demo.json"],
size: "120x40",
waitText: "Ready",
formats: ["png", "json"],
});
await writeFile("dashboard.png", capture.png!);
console.log(capture.json?.cells.length);
await runScenes("tuishot.toml");shoot invokes one platform-specific native binary and returns every requested format from one captured grid. The binary is installed through an exact-version optional package. The launcher never searches PATH for a fallback tuishot executable.
Use npx @tuishot/cli or bunx @tuishot/cli. npm rejected the unscoped tuishot alias as too similar to teashot; it is not published. The installed executable is still named tuishot.
