term-mesh-clilisted
Install: claude install-skill x-mesh/term-mesh
# term-mesh CLI
`term-mesh` is a terminal emulator with first-class support for browser splits (WKWebView-based panels living alongside terminals). When Claude is running inside term-mesh, it can open browser panels, evaluate JavaScript in them, navigate pages, click elements, and tear them down — all via the `term-mesh` CLI.
## Detect you are inside term-mesh
```bash
[ -n "$TERMMESH_SURFACE_ID" ] && echo "inside term-mesh"
# or check the socket
[ -S /tmp/term-mesh.sock ] && echo "daemon running"
```
If neither is true, `term-mesh` CLI commands will fail with a connection error — use a different approach (e.g., `open` to launch Safari).
## Opening a browser split
```bash
# Preferred: one command, opens a new browser split to the right
term-mesh new-split right --type browser --url http://localhost:9876
# → "OK surface:N workspace:M"
# Alternative (same effect, different syntax)
term-mesh new-pane --type browser --direction right --url http://localhost:9876
# Reuse-or-open: if a browser pane already exists, navigate it; otherwise open new
term-mesh browser open http://localhost:9876
```
Direction: `left`, `right`, `up`, or `down`.
## Finding browser surfaces
```bash
# All panes and their surface refs
term-mesh --json list-panes
# Surfaces in a specific pane (with type: terminal|browser)
term-mesh --json list-pane-surfaces --pane pane:N
```
Parse with `python3 -c "import sys,json; d=json.load(sys.stdin); ..."` to extract `surface:N` refs.
## Evaluating JavaScript