Skip to main content
Module backends run code in the Electron Main process. This allows you to utilize Node.js API suites, interact with local operating systems, and manage subprocess terminals.

Environment details

The extension backend runs inside a Node.js process managed directly by Electron. Because it runs in the main thread, it has unrestricted access to the local machine:
  • Run filesystem operations (fs-extra).
  • Intercept and manage host IPC channels.
  • Spawn pseudo-terminals (node-pty) for CLI tools.

Entrypoint configuration

Your backend script must build into scripts/main.mjs as an ES module. The host application imports it during startup. Your entrypoint file must export a default async function that initializes your cards:

Module registration array

The returned array contains MainModules objects mapping each module ID to its main process methods:
Last modified on June 21, 2026