Daemon mode¶
DaVinci Resolve's cold scripting connection takes 2-3 seconds on macOS. For LLM agents and shell scripts that run many sequential commands, that handshake dominates wall-clock time.
dvr serve runs once in the background and serves requests over a Unix-domain socket.
Quick start¶
dvr serve start # detaches into the background
dvr timeline list # ~50ms instead of ~2.5s
dvr timeline inspect # ~50ms
dvr serve stop
Transparent CLI forwarding¶
While the daemon is running, every ordinary dvr command automatically routes through it — no flags needed. The client forwards its arguments over the socket, the daemon executes the command in-process against its persistent Resolve connection, and stdout/stderr/exit code come back unchanged. You keep the exact same CLI; you just stop paying the cold connect.
What always runs locally instead:
dvr serve ...,dvr mcp ...,dvr completion,dvr plugin,dvr repl,dvr doctor- streaming / long-blocking commands (
render watch, anything with--streamor--wait) - anything when
DVR_NO_DAEMON=1is set
Set DVR_DAEMON=auto to have the first dvr command spawn the daemon automatically when the socket doesn't exist yet.
Status¶
Wire format¶
The daemon speaks newline-delimited JSON over its Unix socket. One request per line, one response per line:
Errors come back as the standard DvrError.to_dict() payload:
{"id": "abc", "ok": false, "error": {"type": "TimelineError", "message": "...", "cause": "...", "fix": "...", "state": {}}}
Method allow-list¶
The daemon dispatches against an explicit allow-list to prevent arbitrary attribute traversal. List it with:
Examples: timeline.inspect, project.list, project.ensure, render.submit, render.queue, app.page.set, app.version.
Python client¶
If the daemon isn't running, the client raises dvr.errors.ConnectionError with a fix pointing to dvr serve start.
Socket location¶
| Platform | Default socket path |
|---|---|
macOS / Linux (no XDG_RUNTIME_DIR) |
~/.cache/dvr/dvr.sock |
Linux (with XDG_RUNTIME_DIR) |
$XDG_RUNTIME_DIR/dvr/dvr.sock |
| Windows | not currently supported — use the in-process Python library |
The socket is created with mode 0600 — same-user only.
Lifecycle¶
The daemon holds exactly one Resolve connection. If Resolve quits, the daemon's connection becomes stale; restart the daemon (dvr serve stop && dvr serve start).
For automation, you can detach the daemon from a single shell command: