terminai

Make your coding AI available in your shell

View on GitHub

CLI Agent Architecture

Status: Current implementation

Terminai embeds a real PTY-backed terminal that runs the user’s configured CLI agent, such as codex or claude.

Runtime Shape

┌───────────────────────────────┐
│ Terminai host process         │
│                                │
│  ┌──────────────┐              │
│  │ Wrapped shell│◄──── input ──┤
│  └──────┬───────┘              │
│         │ terminal VT          │
│  ┌──────▼───────┐              │
│  │ Host MCP     │              │
│  │ read_terminal│              │
│  │ suggest_input│              │
│  └──────┬───────┘              │
│         │ MCP HTTP             │
│  ┌──────▼───────┐              │
│  │ AI CLI PTY   │              │
│  │ codex/claude │              │
│  └──────────────┘              │
└───────────────────────────────┘

Responsibilities

MCP Tools

Security Model

Terminai does not own model credentials or provider routing. The configured CLI agent handles auth and model selection. Terminai only exposes terminal context and never sends suggested shell input to the wrapped shell without the user’s approval.