A lightweight, keyboard-driven editor with integrated AI chat, powered by Synapse and Monaco.
Quick Start · Features · Architecture · Configuration · Building
Forge is a desktop code editor with a built-in AI coding assistant. It uses Monaco (the engine behind VS Code) for editing and Synapse for AI — giving you agentic coding capabilities in a standalone app.
# Install dependencies
npm install
# Start in dev mode
npm run dev
# Build for distribution
npm run package
Key features:
.gitignore support~/bin/synapse.exegit clone https://github.com/zanfiel/forge.git
cd forge
npm install
npm run dev
This starts Vite in watch mode and launches Electron. Changes to Svelte components hot-reload automatically.
npm run build
npm run package # → release/ directory
Ctrl+SThe chat panel connects to Synapse running in headless mode (synapse serve). Forge spawns Synapse automatically when you open a project folder.
node_modules, .git, dist, build, __pycache__, .venv, target, etc.┌────────────────────────────────────────────────────────┐
│ Forge (Electron) │
│ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Renderer (Svelte 5) │ │
│ │ │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │ │
│ │ │ Monaco │ │ Chat │ │ File Tree │ │ │
│ │ │ Editor │ │ Panel │ │ Explorer │ │ │
│ │ └──────────┘ └──────────┘ └──────────────┘ │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │ │
│ │ │ Title Bar│ │ Terminal │ │ Welcome │ │ │
│ │ │ (custom) │ │ (xterm) │ │ Screen │ │ │
│ │ └──────────┘ └──────────┘ └──────────────┘ │ │
│ │ │ │
│ │ Stores: projectDir, fileTree, openTabs, │ │
│ │ chatMessages, sessionId, panels │ │
│ └───────────────────────┬─────────────────────────┘ │
│ │ IPC (preload bridge) │
│ ┌───────────────────────┴─────────────────────────┐ │
│ │ Main Process (Node.js) │ │
│ │ │ │
│ │ • Window management (frameless, custom chrome) │ │
│ │ • File system operations (read/write/stat/dir) │ │
│ │ • Synapse process management (spawn/kill) │ │
│ │ • AI chat proxy (HTTP → Synapse → SSE) │ │
│ │ • Dialog handling (folder picker) │ │
│ └─────────────────────────────────────────────────┘ │
│ │ │
└──────────────────────────┼─────────────────────────────┘
│ HTTP (localhost:4300)
┌──────┴──────┐
│ Synapse │
│ (headless) │
└─────────────┘
| Layer | Technology |
|---|---|
| Desktop framework | Electron 35 |
| UI framework | Svelte 5 (runes) |
| Code editor | Monaco Editor |
| Terminal | xterm.js |
| Build tool | Vite 6 |
| Language | TypeScript 5.8 (strict) |
| AI backend | Synapse (headless HTTP) |
| Packaging | electron-builder |
src/
├── main/
│ ├── main.ts # Electron main process, IPC, Synapse lifecycle
│ └── preload.ts # Security bridge (contextIsolation)
│
└── renderer/
├── App.svelte # Root layout (3-column grid)
├── main.ts # Vite entry point
├── components/
│ ├── TitleBar.svelte # Custom window chrome + panel toggles
│ ├── FileTree.svelte # Recursive file explorer
│ ├── Editor.svelte # Monaco editor with tabs
│ ├── ChatPanel.svelte # AI chat with streaming + tool viz
│ └── WelcomeScreen.svelte
├── stores/
│ └── app.svelte.ts # Reactive state (Svelte 5 runes)
└── styles/
└── global.css # Theme variables + base styles
Forge looks for the Synapse binary in this order:
%USERPROFILE%\bin\synapse.exe%USERPROFILE%\bin\synapse-new.exesynapse (on PATH)When a project folder is opened, Forge spawns synapse serve pointed at that directory. The AI chat communicates with Synapse at http://127.0.0.1:4300.
| Field | Value |
|---|---|
| App ID | dev.zanverse.forge |
| Product Name | Forge |
| Version | 0.1.0 |
npm run dev # Vite watch + Electron
npm run build # Compile Svelte + TypeScript
npm run package # Build distributable (→ release/)
npm run start # Run production build locally
| Script | Description |
|---|---|
dev |
Start Vite in watch mode + launch Electron |
dev:svelte |
Vite build with watch (renderer only) |
dev:electron |
Wait for renderer build, then launch Electron |
build |
Production build (Vite + TypeScript) |
start |
Launch Electron from built files |
package |
Build + package with electron-builder |
Elastic License 2.0 — see LICENSE.