The Node API of electron-agent-bridge: connect to an Electron app running the bridge, or launch one with it, and call the protocol with typed results.
npm install --save-dev @electron-agent-bridge/client
import { connect, launch } from '@electron-agent-bridge/client';
// An app started with EAB_ENABLE=1 (Integrated mode):
const app = await connect();
const { data } = await app.call('snapshot.take', {});
console.log(data.text);
await app.call('action.run', { actions: [{ type: 'click', locator: { role: 'button', name: 'Save' } }] });
// Or start an unmodified development build with the bridge injected (Launch mode):
const launched = await launch({ executable: './node_modules/.bin/electron', args: ['.'] });
await launched.client.call('targets.list', {});
await launched.close();
Also: listInstances() (running apps), YAML flows (parseFlow, FlowSchema), and toPlaywright(flow).
Docs ยท MIT licensed.
@electron-agent-bridge/client: Programmatic Node API: connect to or launch an app, typed BridgeApi, flow runner.