Arbor Arbor

← Docs

Documentation

Remote Access & HTTP API

Running the Remote Daemon

Start the daemon with any of these methods:

Connecting from the GUI

From the GUI, Connect to Host... accepts:

Desktop Daemon URL Override

Set daemon_url = "http://127.0.0.1:8787" in ~/.config/arbor/config.toml.

Web UI

If crates/arbor-web-ui/app/dist/index.html is missing, the daemon attempts an on-demand build with npm.

HTTP API Reference (v1)

Base URL defaults to http://0.0.0.0:8787 (set via ARBOR_HTTPD_BIND).

GET /api/v1/health

Returns daemon health.

GET /api/v1/repositories

Returns known repository roots from ~/.arbor/repositories.json.

GET /api/v1/worktrees

Returns worktrees across known repositories.

Query param: repo_root (optional) — filter to one repository root path.

GET /api/v1/terminals

Returns merged terminal session records from the daemon runtime and ~/.arbor/daemon/sessions.json.

POST /api/v1/terminals

Creates or attaches a terminal session.

{
  "session_id": "daemon-1",
  "workspace_id": "/Users/me/code/project",
  "cwd": "/Users/me/code/project",
  "shell": "/bin/zsh",
  "cols": 120,
  "rows": 35,
  "title": "term-project"
}

session_id is optional — the daemon generates one when omitted.

GET /api/v1/terminals/:session_id/snapshot

Returns output tail and state for one session.

Query param: max_lines (optional, default 180, max 2000).

POST /api/v1/terminals/:session_id/write

Writes UTF-8 input to a terminal.

{ "data": "ls -la\n" }

POST /api/v1/terminals/:session_id/resize

Resizes a terminal grid.

{ "cols": 120, "rows": 35 }

POST /api/v1/terminals/:session_id/signal

Sends a signal to a terminal session.

{ "signal": "interrupt" }

Allowed values: interrupt, terminate, kill.

POST /api/v1/terminals/:session_id/detach

Detaches the current client from a daemon-managed terminal session without killing it.

DELETE /api/v1/terminals/:session_id

Kills and removes a daemon-managed terminal session.

WebSocket Streaming

GET /api/v1/terminals/:session_id/ws

WebSocket stream for interactive terminal I/O.

Client messages

{"type":"input","data":"echo hi\n"}
{"type":"resize","cols":140,"rows":40}
{"type":"signal","signal":"interrupt"}
{"type":"detach"}

Server messages

{"type":"snapshot", ...}
{"type":"output", ...}
{"type":"exit", ...}
{"type":"error", ...}