Run on your board
Everything you need to put Kog on a real device lives on this page — no CLI, no Python, no local toolchain. The editor below compiles in your browser; the simulator shows the result instantly; and if you plug in a blessed board, the same edit flashes and hot-reloads onto the hardware over Web Serial.
Web Serial is a Chromium API, so flashing and the live dev-link need Chrome or Edge on desktop. In any other browser the editor and simulator still work — you just won't see the "Your board" controls light up.
The three steps
- Connect a board. Click Connect a board and pick your device's serial port. Browsers require this to be a click you make — a page can never open a port on its own.
- Flash firmware. Flash firmware reads the chip, matches it to a blessed board, downloads the verified image (each part is checked against its SHA-256 before it's written), and writes only the firmware's own flash regions — your files and settings elsewhere on the chip are left alone. On a CYD the page asks which panel generation you have (the two share one chip and can't be told apart over USB): pick the standard one first, and if the screen comes up left/right mirrored with orange-instead-of-blue UI, flash again and pick the classic panel instead.
- Open the dev-link. Once firmware is running, Open dev-link handshakes
with the device (checking the ABI and bytecode version match this page's
compiler). After that, every edit hot-reloads onto the board — the editor
compiles to MQuickJS bytecode and pushes it over the same serial connection, and
the board's
console.logand errors stream back into the device console.
What's happening under the hood
The browser does the whole toolchain. Your TSX is bundled and lowered to a
self-contained ES5 script by the in-page compiler, then compiled to raw MQuickJS
bytecode by the same WebAssembly runtime that powers the simulator — so the bytecode
the board runs is byte-for-byte what the simulator validated. Flashing uses
esptool-js; the dev-link speaks a small
framed protocol over the board's USB serial. It's all in
@kog/weblink — a framework-agnostic package, so the same
engine can drive a future standalone IDE.
Blessed development firmware runs unsigned bundles so the browser can hot-reload freely. Production/OTA is a separate, signed path — a device provisioned with an OTA key refuses unsigned pushes by design. See OTA.
Prefer a wire? The flash-your-board and hot-reload guides cover the CLI path and wireless dev.