Desktop development environment for Tela OS — a declarative UI framework for ESP32 smartwatches.
Write apps in HTML + Lua, preview them instantly in the built-in emulator, then push to your watch over USB.
- Live emulator — pixel-accurate watch screen (410×502) with full Lua VM (WebAssembly)
- Code editor — Monaco (VS Code engine) with syntax highlighting and validation
- Serial connection — push/pull apps to ESP32 over USB
- CSS engine — tag selectors, class selectors, compound selectors, specificity cascade
- Full Lua API —
state,navigate(),focus(),setAttr(),getAttr(),canvas.*,json.*,fetch(),os.date() - Typed state —
bool,int,float,stringwith correct Lua semantics
git clone https://github.com/OpenTela/TelaIDE.git
cd TelaIDE
npm install
npm startNote: Serial port features require a native rebuild:
npx electron-rebuild
- Launch the app
- Click any app in the launcher, or create a new one
- Edit code → Run to preview instantly
- Connect watch via USB
- Click 🔌 Connect → select COM port
- Apps sync automatically — Pull from watch, Push to watch
Tela apps are single HTML files with a declarative structure:
<app>
<ui default="/main">
<page id="main">
<label align="center" y="20%" font="48" color="#fff">{time}</label>
<button x="10%" y="70%" w="80%" h="40" bgcolor="#06f" onclick="doSomething">
Click me
</button>
</page>
</ui>
<state>
<string name="time" default="00:00"/>
</state>
<script language="lua">
function doSomething()
state.time = os.date("%H:%M")
end
</script>
<style>
button { border-radius: 8; }
</style>
</app>See the full spec: UI HTML Specification
TelaIDE/
├── src/
│ ├── index.html # IDE interface (launcher, editor, toolbar)
│ ├── main.js # Electron main process
│ ├── preload.js # IPC bridge (serial, filesystem)
│ ├── runtime.html # Watch emulator screen
│ ├── runtime.js # Emulator engine (parser, CSS, widgets, Lua bridge)
│ ├── wasmoon.js # Lua VM — WebAssembly build of Lua 5.4
│ └── glue.wasm # Lua VM binary
├── package.json
├── start.bat # Windows shortcut
└── .gitignore
The emulator runtime (runtime.html + runtime.js + wasmoon.js + glue.wasm) can be used standalone — in any WebView, browser, or mobile app. No Electron required.
- Electron — desktop shell
- Monaco Editor — code editing
- Wasmoon — Lua 5.4 via WebAssembly
- SerialPort — USB communication with ESP32
MIT

