pithings

pithings / zigpty

Public

Tiny, cross-platform PTY library for Node.js, built in Zig, also usable as a standalone Zig package. Supports Linux, macOS, and Windows.

25
0
100% credibility
Found Mar 22, 2026 at 25 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Zig
AI Summary

A compact tool that enables Node.js applications to run interactive command-line programs with full terminal features like colors, resizing, and prompts on any operating system.

How It Works

1
🔍 Discover zigpty

You find zigpty while searching for an easy way to run command-line programs inside your app, like shells or tools that need a real terminal feel.

2
📦 Add it simply

You bring zigpty into your project effortlessly—no extra tools or compilers required, just a quick addition.

3
🚀 Start your shell

You launch a shell or program, and it instantly feels like a real terminal with colors, prompts, and smooth interaction.

4
📏 Resize freely

You adjust the window size anytime, and everything adapts perfectly without glitches.

5
đź’¬ Interact naturally

You type commands, see live output, handle prompts, and even wait for specific text before responding, just like on your desktop.

âś… Perfect results

Your app now embeds full terminals, tests tools flawlessly, or powers smart agents—lightweight and reliable across all computers.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 25 to 25 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is zigpty?

Zigpty is a tiny PTY library for Node.js, built in Zig for cross-platform support on Linux, macOS, and Windows. It spawns subprocesses like shells or vim inside a pseudo-terminal, enabling colors, cursor control, resizing, and interactive TUIs that fail with plain child_process.spawn. Like github tiny c compiler or github tiny file manager, it's built small—43KB packed—with prebuilts for all arches, including musl for Alpine.

Why is it gaining traction?

Drop-in node-pty replacement at 350x smaller size, no node-gyp or C++ compiler needed. Ships raw Uint8Array data callbacks, waitFor(pattern) for prompts, and Bun-style Terminal with AsyncDisposable. Cross-platform like tiny tina wonderlands cross platform pc and ps5, it handles flow control, custom env/TERM, and uid/gid—perfect for lean builds without bloat.

Who should use this?

Node.js devs embedding terminals in Electron/Tauri apps, streaming remote shells over WebSocket, or running TTY-dependent CI/automation. Ideal for AI agents needing real shell interaction (observe prompts, send inputs) and CLI testers verifying colors/prompts, like github tiny wii backup manager or github tiny tapeout workflows.

Verdict

Strong pick for lightweight PTY needs—try it over node-pty for instant size wins and easy installs. 25 stars and 1.0% credibility score flag early maturity, but full tests, docs, and 8-platform prebuilts make it production-ready for non-critical use; monitor for edge cases.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.