desktop-tools GitHub

Use from Node

import { createDesktop } from "@githubnext/desktop-tools";

const desktop = createDesktop({
	client: "/Applications/Example.app/Contents/MacOS/desktop-tools-client",
	socket: "/path/to/desktop.sock",
	name: "Example",
	// Optional: names the agent in the host's window highlight, such as "Claude is using TextEdit".
	agent: "Claude",
});
const apps = await desktop({ op: "apps" }, AbortSignal.timeout(30_000));

Each result has:

Each request goes whole to the host, through its desktop-tools-client, as one tool call, so the host checks the arguments and shapes the result. One client process serves every call (desktop-tools-client <socket> --serve) and is replaced when it exits. Results take the compact shape described in Result shape. Pass verbose: true in the config, or set DESKTOP_TOOLS_VERBOSE=1, for native results whole, with their target_receipt. Check the inventory completeness fields before relying on a listing. Image bytes appear only in image.

client must be the desktop-tools-client of a host that embeds the Swift runtime from native2/ (#143), such as Desktop Tools 0.17.0 or later. The wire option, which chose it while the Peekaboo stack shipped beside it, is accepted and ignored.

Embedding from Node

The npm package is a thin layer for embedders such as Ace. It holds no tool logic, which all lives in the Swift package in native2/:

To serve your app’s grants to MCP clients too, ship desktop-tools-mcp from the native build beside your client, signed with the same identifier (see Embed). It names your app (its CFBundleName) in its instructions; pass --socket with the socket your app serves, since it looks for Desktop Tools’ state folder otherwise.