Welcome to YaBRI (Yet another Browser-based REPL Interface)

YaBRI is a lightweight, embeddable JavaScript REPL (Read-Eval-Print Loop) built with modern web technologies. Designed for developers, educators, and learners, it runs completely in the browser with no backend requirements, providing a safe, feature-rich, and highly customizable environment for live code execution, teaching, and experimentation. Whether you're building interactive tutorials, prototyping client-side logic, or enhancing developer tools, YaBRI delivers a seamless in-browser coding experience with deep integration capabilities and strong support for safety, usability, and extensibility.

Press Ctrl + I while focused on any of the REPL terminals to access the documentation. This reveals a list of key combinations and features, helping you make the most out of YaBRI's functionality.

Below, you'll find three distinct instances of YaBRI, each configured to demonstrate specific capabilities and features. Feel free to experiment with them to explore what YaBRI can do.

1. Interactive API Injection

One of YaBRI's powerful features is its ability to inject custom JavaScript APIs — of any depth — directly into its execution environment. This allows you to expose your application's logic or external libraries, making them accessible to users within the REPL.

How to use the `app` object:

In the REPL below, we've injected a global object named app. Use the commands to the left to see it in action. These commands will execute in the REPL area.

Suggested Commands

Click to execute in the REPL

Define & Inject Custom API

Modify the JavaScript object below, then click Inject API to integrate it into the REPL environment. The REPL will clear upon injection. Evaluation occurs in your browser, so you may use any JavaScript features supported by it.


2. Comprehensive Event Emission

YaBRI is designed with a rich event-driven architecture, emitting detailed custom events for virtually every user interaction and system action. This allows your hosting application to monitor behavior, develop analytics, inform AI, and create custom workflows.

Interact with the REPL below (type code, press Ctrl + Enter, copy output, clear session, etc.), and watch the event log to see the detailed event data in real-time.

Live Event Log


3. Session Persistence

YaBRI allows users and developers/integrators to save and restore the entire REPL session, including all input and output history. This is useful for preserving work, sharing code snippets with context, or continuing a learning session later.

A session includes both your code and the output history. You can choose to save just the code or the full session.

You can manually save a session using Ctrl + D (or Cmd + D on Mac), or upload a session/code using Ctrl + U (or Cmd + U on Mac). As a developer or integrator, you can also interact with the REPL programmatically via its API to perform the same operations, as well as retrieve and set the session state directly — without requiring manual download/upload. Below, you can interact with the REPL, then try saving your current session or loading another one to see how it works.

Suggested Operations

Click to execute in the REPL

Initialize or Reset the REPL Programmatically

Modify the JSON or JavaScript code below, then click Set Session or Set Code to insert it into the REPL.

Note: Injecting a new session or code will reset the REPL.