From d7f8c0f38a6f5093240f0b0ec5242798ba276f2e Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Fri, 13 Mar 2026 00:30:45 +0800 Subject: [PATCH] Update AGENTS.md with electron packaging docs --- AGENTS.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 9fd5ff7..66b33e6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -71,6 +71,20 @@ npm install --omit=dev npm run start ``` +## Electron single-exe distribution +To package as a single portable exe with built-in server: +```bash +cd web/electron +npx electron-builder --win --x64 +``` +Output: `web/electron/release/OpenChamber.exe` (single portable exe, ~260MB) + +The exe includes: +- Bundled Node.js runtime +- Server code, static files, and CLI +- System tray icon with context menu +- Auto-starts server on port 3000 + ## Runtime entry points - Web bootstrap: `web/src/main.tsx` - Web server: `web/server/index.js`