Update AGENTS.md with electron packaging docs

This commit is contained in:
2026-03-13 00:30:45 +08:00
parent 0d84793a48
commit d7f8c0f38a

View File

@@ -71,6 +71,20 @@ npm install --omit=dev
npm run start 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 ## Runtime entry points
- Web bootstrap: `web/src/main.tsx` - Web bootstrap: `web/src/main.tsx`
- Web server: `web/server/index.js` - Web server: `web/server/index.js`