Docs
Automation
Script the whole fleet from any shell, and let agents drive the built-in browser through a first-party MCP server. One local control plane; nothing listens on TCP.
The mogging CLI
The mogging CLI talks to the local PTY daemon over its authed socket, the same one the app itself uses. Every verb works from any terminal, script, or CI job on the machine:
| Command | Does | Exit codes |
|---|---|---|
| mogging list | Enumerate live panes: id, size, state (idle, busy, attention), and title. Line-oriented and script-friendly. | 0 ok |
| mogging send <pane> <text> [--no-enter] | Type text into a pane; appends Enter unless --no-enter. Completion is confirmed on the ordered stream. | 0 ok · 1 unknown pane |
| mogging send-key <pane> <key> | Press a named key from the allowlist below. | 0 ok · 1 unknown pane · 2 unknown key |
| mogging capture <pane> [--lines N] | Print the pane's retained scrollback tail to stdout (default 1000 lines, up to 10000). | 0 ok · 1 unknown pane |
| mogging <dir> | Open or focus a workspace for a directory. The deep link from any shell. | 0 |
| mogging notify --event <e> | Raise the current pane's attention state. Always exits 0; a hook must never fail its agent. | 0 |
Shared failure codes for the control verbs: 2 usage · 3 no daemon or timeout · 4 auth refused.
A chained example, from watching to acting:
# find the pane that needs you mogging list | grep attention # read what it is asking mogging capture 3 --lines 80 # answer it mogging send-key 3 enter
Named keys
send-key accepts a closed allowlist of key names, resolved to control bytes inside the daemon. Arbitrary escape sequences from the command line are rejected by design:
enter tab escape backspace space up down left right home end page-up page-down c-c c-d c-z c-l c-u c-r
Socket auth and discovery
The daemon writes a discovery record (endpoint plus token) into the per-user runtime directory, readable only by your user account. The CLI reads it, authenticates, and speaks newline JSON over a unix socket or named pipe. Nothing new ever listens on TCP, and every client on the socket proves it is you.
Agent hooks
First-party hook configs for Claude Code, Codex, and Gemini wire mogging notify into each CLI’s own hook system, so an agent that finishes or needs input raises its pane’s attention state automatically. Hooks carry local signals only, never credentials.
The MCP server
Workspace ships a first-party MCP server: a stdio JSON-RPC server any MCP-speaking CLI can register. It exposes the browser toolset below and forwards each call to the app over a token-authed local socket. Consent is per workspace, and every tool call is denied until you grant it.
Browser tools for agents
With consent, an agent gets the wheel of the browser dock through these verbs:
- navigate, back, forward, reload: move the page
- snapshot: an accessibility outline with visible text and stable refs, the agent’s eyes
- screenshot: pixels when structure is not enough
- click, type, scroll, select: act on the page
- eval: run page script
- console and network_failures: the error feedback loop
- wait_for: settle before the next step
Together they close the build, preview, see the error, fix loop without a human alt-tabbing between windows.
