An interactive playground to run, debug, and explore JavaScript and TypeScript code in real-time.
Syntax is a lightweight desktop app and web playground designed for developers who want to visualize code execution instantly โ line by line, with zero setup.
| Platform | Link |
|---|---|
| Windows (Installer) | Syntax Setup 1.0.1.exe |
| Windows (Portable) | Syntax 1.0.1.exe |
| macOS (Intel) | Syntax-1.0.1.dmg |
| macOS (Apple Silicon) | Syntax-1.0.1-arm64.dmg |
The desktop app works 100% offline. No internet required after installation.
- Real-time Execution โ Code is transpiled and executed in a dedicated Web Worker using Sucrase for near-instant feedback.
- Incremental Execution โ Only re-evaluates from the first changed statement. Results for unchanged lines are preserved instantly โ zero flicker, maximum performance.
- TypeScript Support โ Full support for TS syntax, interfaces, generics, and types. Switch between JS and TS modes with a single click.
- Interactive Console โ See the result of every expression right next to the line that produced it.
- Top-Level Mode โ Toggle to automatically log expressions without needing
console.log. - Monaco Editor โ Powered by the same engine as VS Code, including IntelliSense, snippets, and syntax highlighting.
- Flexible Layout โ Swap editor and console positions, toggle minimap and word wrap.
- Themes โ Via Lรกctea (default), VS Dark, VS Light.
- Offline-First โ All dependencies bundled. No CDN, no network requests from the app itself.
| Layer | Tech |
|---|---|
| UI Framework | React 19 |
| Bundler | Vite 7 |
| Desktop | Electron 42 |
| Editor | Monaco Editor |
| Transpiler | Sucrase |
| Parser | Acorn |
| Styling | Tailwind CSS 4 |
# Clone
git clone https://github.com/RoyNadiel/Syntax.git
cd Syntax
# Install dependencies
pnpm install
# Web dev server (Vite, with HMR)
pnpm dev
# Launch as Electron app (builds first)
pnpm electron
# Launch Electron with existing dist (faster)
pnpm electron:dev
# Generate installers (.exe / .dmg)
pnpm packageSyntax doesn't just eval() your code. It:
- Transpiles โ Converts TypeScript to JavaScript via Sucrase.
- Parses โ Builds an Abstract Syntax Tree (AST) with Acorn.
- Instruments โ Injects tracking calls into the AST to capture expression values and console output.
- Diffs โ Compares top-level statements against the previous execution to find the first change point.
- Executes โ Runs only what changed, skipping result recording for unchanged lines before the divergence point.
- Visualizes โ Maps captured results back to their original line numbers in the editor.
All of steps 1โ5 happen inside a Web Worker to keep the UI thread unblocked.
New releases are built automatically via GitHub Actions when a version tag is pushed:
git tag v1.x.x
git push origin v1.x.xThe workflow builds Windows (.exe) and macOS (.dmg for Intel and Apple Silicon) binaries and uploads them to the GitHub Release automatically.
This project is licensed under the terms of the MIT Non-Commercial License (which permits personal, educational, and non-commercial use, but strictly prohibits commercial exploitation). See LICENSE for full details.
To push new versions use the configured github workflow action.