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.