Skip to main content
Glama

AgentDeck

English | 简体中文

CI License: MIT Node >= 22 Platforms PRs Welcome Zero build

One screen. Four terminals. Any AI coding agent.

Stop juggling terminal tabs. AgentDeck gives you a 2×2 grid of real terminals in your browser — launch pi, Claude Code, Codex, Gemini CLI, Aider, or a plain shell in any pane, and drive them all from one page.

Why

Running multiple coding agents in parallel means N terminal windows, N tabs, endless ⌘-Tab. AgentDeck keeps every agent visible at once, lets you talk to one or all of them from a single input, and keeps processes alive across page refreshes.

Related MCP server: Antigravity Browser Operator

Quick start

git clone https://github.com/flashclub/agent-deck.git
cd agent-deck
npm install
node server.mjs
# open http://127.0.0.1:7788

Requirements: Node ≥ 22, macOS / Linux. No build step, no config file.

Agents are auto-detected from your machine (command -v): pi, Claude Code, Codex, Gemini CLI, Aider, plus a login shell. Add your own in detectAgents() in server.mjs.

Features

  • Real terminals — node-pty + xterm.js. Full ANSI / 256-color / full-screen TUI rendering; every agent shortcut works exactly as locally.

  • Survives refresh & reconnect — panes are server-side PTYs with ~160KB output replay per pane. Close the tab, come back, keep going.

  • Caster dock — hover the ⌨ dock at the bottom:

    • Tab / Shift+Tab cycle targets (All → pane 1..4, skips stopped panes)

    • Enter sends to the selected pane

    • ⌘/Ctrl+Enter broadcasts to all running agents at once

    • receiving panes flash; Esc collapses and returns focus to the terminal

  • English & Chinese UI — defaults to English, one-click 中/EN switch in the toolbar, every string localized.

  • Editable pane titles — click a pane's title to rename it; the full path slides in on hover. Titles and pane positions persist across refresh.

  • Collapsible toolbar — hide the top bar for maximum terminal real estate; a small ⌃ button brings it back.

  • Light & dark themes + six accent colors — tuned terminal palettes (cursor follows your accent), persisted; adjustable terminal font size (12–24px).

  • Per-pane controls — click to focus, ⤢ maximize, ↻ restart, ✕ close; status dot pulses while output is flowing.

  • Isolated worktrees — tick “Isolated worktree” in the launcher to run a pane in its own git worktree (ad/wt* branch, created outside your repo under ~/.agent-deck/worktrees). When closing the pane you choose: merge the changes back, discard them, or keep the worktree for later. Restarts reuse the same worktree. Parallel agents on one repo never step on each other.

  • Browser bridge (experimental) — pair the bundled Chrome extension (extension/) and any pane's agent can drive your real browser: navigate, click, eval JS, read pages, and screenshot (returned inline to multimodal agents, also saved to ~/.agent-deck/shots/). Token-paired, localhost-only. Register mcp.mjs as an MCP server (pi mcp add agentdeck-browser -- node …/mcp.mjs) for native tool calls, or just curl the HTTP API — see extension/README.md.

  • Smart cwd picker — optionally offers recent project directories read from pi's local session library (see Privacy).

  • Custom dialogs & toasts — no native alert() anywhere.

Keyboard map

Key

Action

Tab (in caster)

cycle send target

⌘/Ctrl+Enter

broadcast to all panes

Alt+1..4

focus pane 1–4

Esc

collapse caster / cancel dialog

Everything else (including Shift+Enter, steering, aborts…) is handled by each agent's own TUI.

How it works

Browser (xterm.js ×4, caster, theming, i18n)
   │  WebSocket (JSON: spawn / input / resize / replay)
   ▼
Node server (server.mjs)
   │  node-pty  ── one PTY per pane
   ▼
pi / claude / codex / $SHELL  — full TUI agents in their own cwd
  • Static assets are served straight from node_modules (xterm.js) — no bundler.

  • Each pane keeps a ring buffer so reconnects replay recent output.

  • Broadcast = writing text + \r to every running PTY; agents receive it like typed input.

Privacy

  • Nothing leaves your machine. The server binds to 127.0.0.1 and makes no outbound requests.

  • No paths are baked into the repo. The "recent directories" picker reads pi's local session library (~/.pi/agent/sessions) on your machine at runtime — everyone who clones sees only their own history.

  • Don't want that? Run with AG_RECENTS=0 to disable the scan entirely.

  • Isolated worktrees live under ~/.agent-deck/worktrees/ and are cleaned up automatically on merge/discard. Kept worktrees can be reclaimed with git worktree prune or by deleting that folder.

Security

No authentication, by design — a local tool. Do not expose it to a network (AG_HOST=0.0.0.0 is a foot-gun: anyone on your LAN gets a shell).

Test

node server.mjs &        # start server first
npm run test:e2e         # protocol-level E2E: shell echo round-trip + pi TUI boot

License

MIT

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Chrome extension + MCP server. Lets coding agents (Claude Code, Codex CLI) drive your real Chrome — sessions intact, 2FA stays with the user. 26 browser tools: form fill on React/CodeMirror/Monaco, privileged fetch that bypasses page CSP, authenticated downloads, in-extension docx parsing. Battle-tested by 400+ hours of real agentic browser work before public v0.9 release.
    283 npm
    3
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to drive the user's already-running Google Chrome through a WebSocket bridge, listing and switching tabs, navigating, clicking, typing, scrolling, extracting DOM, taking screenshots, and evaluating JavaScript. It works without restarting Chrome and preserves all existing logins, cookies, and 2FA sessions.
    11
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to control Chrome, Edge, Brave and other Chromium browsers through an extension and native messaging host, exposing a Claude-in-Chrome-compatible tool set for real clicks, typing, screenshots, accessibility-tree reading, page text, form filling, JavaScript execution, console and network inspection, file uploads and GIF recording. Agent sessions run in isolated tab groups with per-site permission prompts, activity logging and a global stop control.
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Lets AI coding tools drive the real, already-logged-in Chrome browser over local stdio—snapshotting and reading pages, clicking, typing, managing tabs, capturing screenshots, and inspecting network, console, storage, and cookies—without opening a remote-debugging port. It installs as a Chrome extension plus native-messaging bridge, so agents work in the user's authenticated sessions while passing bot detection.
    1 npm
    ISC