An interpreter for the BrightScript language that runs Roku apps on browser platforms and Node.js.
The BrightScript Simulation Engine implements an interpreter for the BrightScript language, that can be embedded in Web, Electron and Node.js applications, or used as a CLI/REPL standalone tool, allowing Roku apps to be executed in several different non-Roku platforms.
Initially the focus was on the support of Draw 2D API components (roScreen, roCompositor, roRegion, etc.) along with the core elements of the BrightScript language, allowing a full Roku app execution over an HTML5 Canvas, but the scope was extended to include the SceneGraph framework, simulation of the Roku file system, registry, remote control and the Micro Debugger.
The brs-engine is developed in TypeScript and bundled as a collection of Webpack JavaScript libraries. Starting with version 2.0 we also expose an extension interface so advanced features can be delivered as optional bundles that plug into the interpreter lifecycle.
This repository is organized as a monorepo that contains three separate packages:
- brs-engine – core browser/web worker package that provides the BrightScript interpreter for web apps.
- brs-node – Node.js package that provides a CLI app and the interpreter library for non-browser platforms.
- brs-scenegraph – Roku SceneGraph extension package that adds support for RSG components and nodes.
Note
- The SceneGraph support is currently in development, and released as an experimental feature. We have a lot of challenges ahead, feel free to reach out and learn how you can help.
- Although brs-engine runs apps with user interface, it has no intention of emulating the full Roku OS or hardware devices, it is primarily aimed as a development tool for the Roku Community.
- The simulation engine can also to be used as a framework for running BrightScript apps and games in other platforms, like iOS, macOS, Android, Linux and Windows.
- Please check the Current Limitations document for further details on what is still missing or out of scope.
- This repository was originally a fork from brs, a BrightScript command line interpreter.
The browser package provides a complete BrightScript interpreter that runs directly in browser environments with full support for the BrightScript language up to Roku OS version 15.
- Client-side execution - No server required
- Web Worker - Interpreter runs in a Web Worker, optimized for browser performance
- HTML5 Canvas rendering - Full Draw 2D API support
- Audio & Video - Supports media playback via HTML5 Audio and Video elements
- File System Simulation - Virtual file system for Roku apps
- BrightScript Micro Debugger - Step-through debugging capabilities
- Input Simulation - Simulates remote control input for Roku apps both via keyboard and gamepad
npm install brs-engine📖 Browser Package: More details | 🚀 Live Demo | 🧑💻 Code Playground | 🖥️ Desktop App
The Node.js package includes a complete CLI application, ECP and SSDP servers, and the Simulation Engine Node.js library that provides a powerful environment for running BrightScript applications in a server-side context or in test automation workflows.
- Interactive REPL - Command-line BrightScript shell
- File Execution - Run
.brs,.zip, and.bpkfiles - ASCII Rendering - Simulates
roScreenandroSGScreenoutput in the terminal - ECP Server - External Control Protocol implementation
- Package Creation - Build and encrypt
.bpkfiles - CI/CD Integration - Perfect for automated testing
# for global CLI installation
npm install -g brs-node
# for project installation
npm install brs-node📖 Node.js Package: More details | ⌨️ CLI Guide
- brs-scenegraph – ships the SceneGraph runtime as a standalone extension that loads automatically whenever a Roku app contains
pkg:/components/assets. - Roku SDK1 compatibility (planned) – upcoming extension focused on legacy SDK1 channels and their APIs.
- BrightSign runtime (planned) – upcoming extension to add support for BrightSign-specific components and hardware features.
Read more about the shared extension model in docs/extensions.md.
There are many ways you can use and/or participate in the project, read the documents below to learn more:
- How to build from source
- How add the Engine to a Web Application
- How to run as a Command Line Interface
- How to use the Node.js Library
- How to use and build extensions
- How to customize the Engine behavior
- Remote Control Simulation
- BrightScript Engine API reference
- BrightScript Engine Limitations
- How to contribute to this Project
- Click here to view the release changelog.
- My website: https://lvcabral.com
- My threads: @lvcabral
- My Bluesky: @lvcabral.com
- My X/twitter: @lvcabral
- My podcast: PODebug Podcast
- Check my other GitHub repositories
Copyright © 2019-2026 Marcelo Lv Cabral. All rights reserved.
Licensed under the MIT license.

