Pi Interactive Shell

Lets the Pi coding agent drive interactive CLIs autonomously in an observable overlay, with one-key user takeover.

Stars
★ 608
Last updated
28d ago
FARS reviewed
Nov 25, 2026
Primary language
TypeScript

At a glance

How it runs
Agent plugin / skillCLI
Works with
Portable with changes
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Node.jsPi coding agentzigpty prebuilt binariesShell / CLINetwork accessLocal filesystem
Typical use
Developers who want Pi to open vim or psql and also be able to type commands into the same session
Not a fit if
  • Teams not using the Pi coding agent
  • Users needing stable Linux production support (Linux is experimental)
  • Workflows requiring confirmed subprocess termination
Maintenance
Commits in the last 30 dayslast commit 2026-10-28

What does this agent do, and when should you use it?

Pi Interactive Shell is an extension for the Pi coding agent that runs interactive subprocesses inside a TUI overlay through the interactive_shell tool. It uses zigpty for full PTY emulation and xterm-headless for terminal emulation, so programs such as vim, psql, htop and ssh behave as if attached to a real terminal. Four modes cover the workflow: interactive for human-driven shells, hands-free for polling, dispatch for fire-and-forget completion callbacks, and monitor for trigger-based wakeups. Users can type to take over, press Ctrl+T to transfer output back to the main agent, or Ctrl+B to background a session, while the agent drives the same shell through a stable sessionId. Headless dispatch and monitor sessions write full output logs under ~/.pi/agent/cache/interactive-shell/ and wake the agent with a compact notification. It is distributed as an npm package for Pi, with no external multiplexer required.

The agent calls interactive_shell({ command }); the extension opens a PTY via zigpty, renders it through xterm-headless into a Pi TUI overlay, and immediately returns a stable sessionId. Later calls reuse that sessionId with input plus submit, inputKeys (such as ctrl+c, down, enter), inputPaste or inputHex to write to the terminal, and with outputLines, incremental or drain to read output. mode: "dispatch" returns at once and later wakes the agent through triggerTurn with a captured tail; mode: "monitor" supports stream, poll-diff and file-watch strategies with literal, regex and threshold triggers, queryable via monitorStatus and monitorEvents. Structured spawn parameters and the /spawn command launch pi, codex, claude, cursor or custom spawn agents, optionally with worktree: true inside a separate git worktree. Optional Jev semantic supervision transmits bounded, redacted terminal text only when the global config enables jev.enabled, TYPESAFE_API_KEY is present in the Pi process environment, and the tool call explicitly supplies monitor.semantic.

  1. Developers who want Pi to open vim or psql and also be able to type commands into the same session
  2. Engineers delegating a refactor with /spawn codex --worktree and waiting for a completion notification
  3. Testers who want Pi to watch npm test -- --watch and wake only when a FAIL line appears
  4. Teams running several background pi or claude dispatches in parallel and handling each result as it arrives
  5. Operators who need alerts when a new PDF lands in an uploads folder or a health endpoint changes

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Config files
~/.pi/agent/interactive-shell.json .pi/interactive-shell.json

How do you install or deploy this agent?

Install the extension as a Pi npm package:

pi install npm:pi-interactive-shell

Node.js is required; PTY support uses zigpty prebuilt binaries, so no node-gyp toolchain is needed on supported platforms. If you load the extension from a local folder instead of the package, link skills/interactive-shell into ~/.pi/agent/skills/ yourself.

How do you use this agent?

After installation, ask Pi in natural language and let it issue the tool call; users can also use the /spawn, /attach and /dismiss commands. Agent-side examples:

interactive_shell({ command: 'vim package.json' })
interactive_shell({ command: 'npm run dev', mode: 'hands-free', reason: 'Dev server' })
interactive_shell({ sessionId: 'calm-reef', input: 'SELECT * FROM users;', submit: true })
interactive_shell({ spawn: { agent: 'codex' }, mode: 'dispatch' })

Global config lives at ~/.pi/agent/interactive-shell.json and project config at .pi/interactive-shell.json:

{
  "overlayWidthPercent": 95,
  "overlayHeightPercent": 60,
  "focusShortcut": "alt+shift+f"
}

Overlay keys: Ctrl+T transfers output, Ctrl+B backgrounds the session, Ctrl+Q opens the session menu, and Ctrl+G returns control to the agent after you take over a monitored session.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Full PTY through zigpty with no tmux dependency, so CLIs believe they are in a real terminal
  • Four modes (interactive, hands-free, dispatch, monitor) share one stable sessionId model
  • Lean tool schema cuts the per-request definition from about 18,644 to about 4,700 characters
  • Any keypress lets the user take over, and Ctrl+T hands subagent output straight back to the main agent
  • Background dispatch and monitors run concurrently, with optional git worktree isolation for spawns
Limitations
  • Tightly bound to the Pi coding agent; other agents cannot use it directly
  • macOS is tested while Linux is labeled experimental, and some TUI apps show rendering quirks
  • kill only cancels local supervision; subprocess exit is not confirmed
  • Agent queries are rate limited to 60 seconds by default unless reconfigured
  • Optional Jev supervision needs a TYPESAFE_API_KEY and sends bounded terminal text to an external provider

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Pi Interactive Shell This agent 58 · Major gaps Agent plugin / skillFree + model costs ★ 608 28d ago TypeScript —
Oh My Pi 68 · Some gaps CLIFree + model costs ★ 40k today TypeScript Codex · OpenAI API · Claude API
Pi Subagents 69 · Some gaps Agent plugin / skill ★ 4.3k today TypeScript —
Cline 60 · Some gaps CLIFree + model costs ★ 72k today TypeScript OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
58/ 100 5-point scale 2.9 / 5
Trust 12/29
Reliability 8/14
Adaptability 14/18
Convention 11/18
Effectiveness 9/13
Verifiability 4/8
Why each dimension lost points
Trust12 / 29 · 2.1/5

README documents multiple consent gates for Jev/TypeSafe egress (per-launch outputSelection, global jev.enabled, inherited TYPESAFE_API_KEY) plus local raw recovery and fixed retention bounds, so data_flow_transparency scores 2. However the extension lets an agent autonomously run arbitrary CLIs (vim/ssh/psql/pi/claude) in a PTY with no per-command confirmation, so least_privilege and user_confirmation score 1. Dependencies include prebuilt zigpty binaries and a pinned @typesafe-ai/sdk with no audit or integrity note, so dependency_security scores 1. External effects (worktrees, background processes, log writes) are described but rollback relies on best-effort kill and 24h log cleanup, so external_effects and rollback score 1. Author and repo URL are present but publisher is unverified, so source_attribution scores 1.

Reliability8 / 14 · 2.9/5

README and SKILL.md agree on modes, autoExitOnQuiet, and completionReason semantics, and tests cover config merging, background widget, and session selection, so self_consistency scores 2. CI uses npm install --no-package-lock and peerDependencies are '*', weakening reproducibility, so dependency_availability scores 1. Error paths exist (describeShellResolutionError, console.error on invalid config), so failure_messages scores 2.

Adaptability14 / 18 · 3.9/5

Covers many interactive CLIs and coding agents with four modes and spawn resolution, so audience_and_scenarios scores 3. SKILL.md states when to use bash vs interactive_shell, so capability_boundaries scores 2. Monitor triggers support literal/regex/threshold, so trigger_precision scores 2. Node>=22.19 and zigpty platform support are stated, so environment_fit scores 2.

Convention11 / 18 · 3.1/5

README is well structured with clear install and rich examples, so examples_and_faq scores 3. CHANGELOG appears only in the files list with no content in evidence, so versioning_changelog scores 1. package.json says MIT while top-level metadata says unknown, so license scores 2. Maintenance rests on a single author and issues link, so maintenance_responsibility scores 1.

Effectiveness9 / 13 · 3.5/5

Output is configurable (lines, pagination, drain) and notifications include tail plus log path, so output_usability scores 2. Marginal value over plain bash is PTY coverage and an observable overlay, so marginal_value scores 2. Token efficiency is claimed but Jev selection adds external call cost, so cost_benefit scores 2.

Verifiability4 / 8 · 2.5/5

README cites a frozen corpus hash and eval numbers that cannot be checked statically, so claim_traceability scores 1. README, SKILL.md, tests, and package.json corroborate each other on modes and config, so cross_source_corroboration scores 2. Docs separate claims from inference (e.g., 'does not establish universal accuracy'), so fact_inference_separation scores 2.

Risks and how to mitigate them
  • The extension lets an agent autonomously run arbitrary commands in a PTY with no per-command confirmation; prefer isolated environments or worktrees.
  • Jev/TypeSafe egress depends on global config and an inherited API key; confirm users understand the three consent gates before enabling.
  • Dependencies include prebuilt zigpty binaries and a pinned SDK with no stated integrity check or audit.
  • CI uses npm install --no-package-lock, weakening dependency reproducibility.
  • Publisher identity is unverified and license metadata is unknown at top level while package.json says MIT; verify independently.
Evidence confidence: Low Reviewed Nov 25, 2026 Reviewed revision 38236846c69c
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/pi-interactive-shell.svg)](https://followagents.com/en/agents/pi-interactive-shell)
<a href="https://followagents.com/en/agents/pi-interactive-shell"><img src="https://followagents.com/badge/pi-interactive-shell.svg" alt="FARS review"></a>

FAQ

Does it need tmux or another terminal multiplexer?
No. The extension provides full PTY emulation through zigpty and terminal emulation through xterm-headless, so the subprocess behaves as if it had a real terminal.
Can a user interact with the overlay directly?
Yes. Typing anything in the overlay takes over, including in hands-free mode. After taking over a monitored hands-free or dispatch session, Ctrl+G returns control to the agent.
When does a dispatch session notify the agent?
When the session completes or local supervision ends, the agent receives a new turn with duration, output line count, the last 5 lines, and the full log path. Dispatch enables autoExitOnQuiet by default: after a 15s startup grace period it auto-closes after 8s of silence, and that completionReason is auto-close-quiet, not a command verdict.
Is terminal content sent to an external service?
Only when all three gates are open: global jev.enabled is true, TYPESAFE_API_KEY is in the Pi process environment, and the tool call explicitly supplies monitor.semantic. ANSI stripping and redaction run first, but redaction is not a guarantee that every secret is found.
Which shell do new sessions use?
New sessions follow Pi's Bash resolver rather than the ambient $SHELL. Set shellPath in ~/.pi/agent/settings.json to pick a specific Bash executable; PowerShell, cmd.exe and the legacy WSL bash.exe are not supported.
Is Pi Interactive Shell free?
The software is free, but Pi Interactive Shell calls an AI model, and you pay that model provider for usage (or run a local model).
Is Pi Interactive Shell open source?
The source code is public on GitHub (nicobailon/pi-interactive-shell), but the repository does not declare a recognised licence, so the rights to reuse or modify it are unclear. Ask the author or check the README before building on it.
Is Pi Interactive Shell safe to use?
FollowAgents' FARS review (Nov 25, 2026) scored Pi Interactive Shell 12/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is Pi Interactive Shell still maintained?
Yes. The latest commit on GitHub is from 2026-10-28, within the last 30 days.
Who makes Pi Interactive Shell?
Pi Interactive Shell is published on GitHub by the account nicobailon. FollowAgents has not verified which person or company is behind that account.
Was this page helpful?
View on GitHub ↗ Install ↓

Related concepts