Show HN: I built a transparent terminal wrapper for unobtrusive AI
Terminai is a transparent terminal wrapper that overlays AI CLI agents (like Codex or Claude Code) onto the host shell without replacing it. It utilizes a local MCP server to provide agents with read-only access to terminal context and scrollback, while enforcing strict user approval for any shell input execution. The tool preserves native terminal behaviors such as copy-paste and scrollback by running the wrapped shell in a PTY with VT100 emulation. Configuration is handled via YAML files, allo
Analysis
TL;DR
- Terminai is a transparent terminal wrapper that overlays AI CLI agents (like Codex or Claude Code) onto the host shell without replacing it.
- It utilizes a local MCP server to provide agents with read-only access to terminal context and scrollback, while enforcing strict user approval for any shell input execution.
- The tool preserves native terminal behaviors such as copy-paste and scrollback by running the wrapped shell in a PTY with VT100 emulation.
- Configuration is handled via YAML files, allowing customization of agent presets, layout positions, key bindings, and privacy filters.
- Currently in alpha, it supports macOS and Linux, offering both "always-ask" and "auto-approval" modes for managing suggested commands.
Why It Matters
Terminai addresses the friction of switching between traditional command-line workflows and AI-assisted development by integrating them into a single visual interface. This approach allows practitioners to leverage AI capabilities for complex tasks while maintaining full control and visibility over system commands, reducing the risk of unintended side effects. It represents a shift towards "overlay-based" AI integration rather than replacing core developer tools.
Technical Details
- Architecture: Terminai runs a primary shell inside a PTY and renders it using VT100 emulation, preserving host terminal features. An overlay PTY hosts the selected AI agent CLI.
- Context Access: Agents interact with the shell via a local MCP server, which exposes terminal content, session context (working directory, OS, dimensions), and recent scrollback after configurable privacy filtering.
- Security Model: Suggested shell inputs are queued for user review. The default mode requires explicit approval ("y" or "n") before execution, though an "auto-approval" mode exists for trusted environments.
- Configuration: Uses YAML configuration files located in standard paths (e.g.,
~/.config/terminai/terminai.yaml). Supports presets for agents like Codex and allows runtime adjustment of layout (top/bottom/fullscreen) and split percentages. - Installation: Available via Homebrew (
brew install emosenkis/tap/terminai) or manual download from GitHub Releases. Built in Rust but does not require local compilation for end-users.
Industry Insight
- Workflow Integration: Developers should evaluate Terminai for tasks requiring frequent context-switching between coding and system administration, as it streamlines the feedback loop between AI suggestions and shell execution.
- Security Awareness: The distinction between "always-ask" and "auto-approval" highlights the ongoing industry challenge of balancing convenience with security; users must carefully configure risk classifiers and privacy filters.
- Tool Selection: As AI CLIs mature, wrappers that decouple model logic from terminal management may become standard infrastructure, allowing teams to swap underlying models without changing their terminal workflow.
Disclaimer: The above content is generated by AI and is for reference only.