npx noninteractive

Run interactive CLIs
without a human

Let AI agents complete setup wizards, OAuth flows, and interactive installers autonomously.

$ npx noninteractive copy
View source
~ / noninteractive
# start the WorkOS installer in a background PTY
npx noninteractive workos
◆ Run the AuthKit installer?
● Yes / ○ No
# send Enter to confirm, wait for next prompt
npx noninteractive send workos "" --wait
◆ You are on main. Create a feature branch?
● Create feat/add-workos-authkit
# send Enter again, wait for response
npx noninteractive send workos "" --wait
1

Spawn in a real PTY

Just prefix your command with noninteractive. It launches a detached daemon that runs it inside a real pseudo-terminal. The child process sees isTTY=true — ANSI colors, select menus, and raw terminal mode all work.

2

Talk over a unix socket

The daemon listens on a socket at ~/.noninteractive/sessions/<name>.sock. No ports, no HTTP — just fast, local IPC with JSON messages.

3

Send, wait, repeat

The agent sends keystrokes with --wait and blocks until new output appears. No polling loops — one call per interaction. It completes the entire flow autonomously.

Real terminal, clean output

Go-based PTY bridge allocates a real pseudo-terminal. Programs that check isTTY, render @clack/prompts menus, or use raw mode all work correctly. Output is returned as clean text with ANSI codes stripped — ready for agents to parse.

Zero config

No native deps, no Python, no Docker. Just npx noninteractive and it works. Ships cross-compiled binaries for macOS and Linux.

Works with everything

WorkOS, Vercel, Supabase, Stripe — any CLI that uses interactive prompts. If it runs in a terminal, noninteractive can drive it.

Detached sessions

Sessions persist as background daemons. Start a flow, read it later, send input when ready. The process keeps running even if the agent disconnects.

Four commands. That's it.

<tool> [args] Start a session — runs npx <tool> in a background PTY
send <session> <text> --wait Send keystrokes and wait for new output — one call instead of polling
read <session> --wait Block until new output appears (for OAuth flows, long operations)
stop <session> Stop a running session

Why this matters

Every devtool has a getting-started flow. Most of them are interactive. If an AI agent can't navigate your setup wizard, it can't use your product.

As agents become first-class users of developer tools, the gap between "has a CLI" and "works with agents" is just a PTY bridge away. noninteractive closes that gap.

Teach your agent to use noninteractive

noninteractive ships with an Agent Skill — a SKILL.md file that gives AI agents the knowledge to use it correctly. No more guessing about commands or confusing it with built-in flags.

$ npx skills add https://noninteractive.org copy
SKILL.md
---
name: noninteractive
description: Run interactive CLI commands non-interactively...
---
# noninteractive
Use `npx noninteractive` to drive interactive CLI tools
without a human. It spawns commands in a real PTY and
lets you read output and send keystrokes programmatically.
## Step-by-step workflow
1. npx noninteractive <tool>
2. npx noninteractive send <session> "input" --wait
3. npx noninteractive read <session> --wait
4. Repeat until done