Electron in open-source AI tools: desktop apps like AnythingLLM, Cherry Studio and LobeChat in 2026
What Electron does
An Electron app has two kinds of processes. The main process runs Node.js and controls the app: windows, menus, file access, native dialogs, auto-updates and child processes. Each window runs a renderer process, a Chromium page that displays the interface built with HTML, CSS and a framework such as React or Vue. The two talk over inter-process messages through a preload script that exposes only the functions the interface needs.
GitHub created Electron in 2013 for the Atom editor. It is now maintained by the OpenJS Foundation and used by VS Code, Slack, Discord, Figma's desktop app, Notion and many AI apps.
Which directory projects use it
| Project | What it is | Why Electron |
|---|---|---|
| AnythingLLM | Document chat and agents | Same Node server and React interface as the Docker version, packaged for desktop with a built-in local model runner |
| Cherry Studio | Multi-provider AI desktop client | Cross-platform client for dozens of providers, local models, knowledge bases and MCP |
| LobeChat | Chat with plugins and agents | Desktop client wrapping the web app with local features |
AnythingLLM shows the main appeal. The same codebase serves a multi-user Docker deployment and a single-user desktop app, and the desktop version stores everything locally in SQLite and LanceDB files.
Electron 45
Electron ships a new major version every eight weeks, each upgrading Chromium, Node.js and V8. Electron 45.0.0, released October 20, 2026, includes Chromium 156, Node.js 24.22.0 and V8 15.6. Each upgrade brings Chromium's security fixes and new web platform features to apps, such as WebGPU improvements that help in-app model inference. Electron supports the three most recent major versions, so an app that falls more than about six months behind stops receiving security fixes.
Connecting to local models
Desktop AI apps often run models on the user's machine. Common approaches:
| Approach | How it works |
|---|---|
| Connect to Ollama or LM Studio | App calls the local server's HTTP API on localhost |
| Bundle a model runner | App ships llama.cpp or a similar engine and starts it as a child process |
| Run in the renderer with WebGPU | Transformers.js or WebLLM inside the Chromium window |
| Native Node bindings | node-llama-cpp loads models in the main process |
AnythingLLM's desktop app can use its built-in runner or connect to Ollama, LM Studio and cloud providers. Cherry Studio connects to Ollama and LM Studio alongside many hosted APIs.
Size and memory
| Metric | Typical Electron AI app | Typical Tauri app |
|---|---|---|
| Installer size | 100 to 250 MB | 5 to 20 MB |
| Idle memory | 150 to 400 MB | 50 to 150 MB |
| Startup | About 1 to 2 seconds | Under a second |
These numbers matter less than they seem for AI apps that load a local model, which takes gigabytes of memory on its own. They matter more for lightweight chat clients that call cloud APIs.
Security
Electron apps combine web content with system access, so mistakes can expose the whole computer. AI apps add risk because they display model output, which can contain anything an attacker managed to put in a document or web page the model read. Electron's security checklist covers the essentials:
- Keep
contextIsolationon andnodeIntegrationoff in renderers, the defaults since Electron 12. - Enable the sandbox for renderers.
- Expose a minimal, validated API through the preload script.
- Never render model output as raw HTML; sanitize Markdown output.
- Set a strict Content Security Policy.
- Validate URLs before opening them with
shell.openExternal. - Keep Electron current for Chromium security fixes.
- Sign and notarize builds so users can trust updates.
Apps that run MCP servers or let agents execute commands should ask for confirmation before risky actions and show exactly what will run.
Updates and distribution
Electron apps update themselves with tools such as electron-updater, which downloads new versions from GitHub Releases or a server. macOS requires apps to be signed and notarized by Apple, and Windows SmartScreen warns about unsigned installers, so open-source projects that distribute desktop builds need code-signing certificates. Linux builds usually ship as AppImage, deb and rpm packages, and sometimes Flatpak.
Electron compared with alternatives
| Framework | UI | Back end | Used by |
|---|---|---|---|
| Electron | Bundled Chromium | Node.js | AnythingLLM, Cherry Studio, Claude desktop, VS Code |
| Tauri | System web view | Rust | Jan, other newer AI clients |
| Native (Swift, WinUI) | Platform UI | Platform language | ChatGPT for macOS, Ollama's macOS app |
| Flutter | Own renderer | Dart | Some mobile-first AI apps |
| Wails | System web view | Go | Smaller tools |
Teams that already have a web app and Node expertise pick Electron. Teams that care most about size and startup, or already write Rust, pick Tauri.
Building an Electron AI app
Electron Forge and electron-vite are the common starting points; both set up TypeScript, a bundler and packaging. Keep API keys in the main process or the operating system's keychain through Electron's safeStorage API, not in the renderer. Run long tasks such as embedding a folder of documents in a utility process so the interface stays responsive. Test on all three platforms, since file paths, permissions and GPU behavior differ.
Desktop features AI apps add
Running on the desktop lets AI apps do things a browser tab cannot. Global keyboard shortcuts open a quick-ask window from anywhere. Apps can watch a folder and re-index documents when files change, read the clipboard on request, capture a screenshot for a vision model, and register as a handler for files so a user can right-click a PDF and send it to the assistant. Desktop apps can also run local MCP servers as child processes, which is how the Claude desktop app and Cherry Studio connect to tools on the user's computer. Each of these features needs care with permissions: macOS asks the user before an app can record the screen or read protected folders, and apps should explain why they need access.
Common problems for users
| Symptom | Likely cause |
|---|---|
| Blank window after update | GPU driver issue; try the app's disable-hardware-acceleration option |
| Cannot reach Ollama | Ollama not running, or a different port configured |
| High CPU while idle | An animation or polling loop in the renderer; update the app |
| macOS says the app is damaged | Unsigned or quarantined build; download from the official release |
Related: Node.js stack, JavaScript stack, React stack, SQLite stack, Ollama stack, Stack index.
Frequently asked questions
Why are so many AI desktop apps built with Electron?
AI companies usually build a web app first. Electron lets them reuse that code for desktop apps on all three major operating systems with one team, while adding desktop features such as global shortcuts, file access, system tray icons and connections to local model servers.
Is the Claude desktop app built with Electron?
Yes, Anthropic's Claude desktop app for macOS and Windows is built with Electron. OpenAI's ChatGPT app for macOS, by contrast, is a native app. Cursor and Windsurf are forks of VS Code, which is itself an Electron app.
Why do Electron apps use so much memory?
Each app runs its own copy of Chromium with several processes for the interface, rendering and GPU work. A simple Electron app may use 150 to 300 MB at idle, more than a native app. The size of the AI model you run locally usually matters far more than the Electron overhead.
What is the difference between Electron and Tauri?
Tauri uses the operating system's built-in web view instead of bundling Chromium, and a Rust back end instead of Node.js. Tauri apps are much smaller, often under 15 MB, and use less memory, but must handle rendering differences between web views on each platform. Jan and several newer AI apps use Tauri.
How often does Electron release?
A new major version every eight weeks, aligned with every other Chromium release. Electron supports the latest three major versions, so apps must update regularly to keep receiving Chromium security fixes.