repl-sdk is a runtime compiler library for building fast, extensible REPLs and interactive playgrounds in the browser. Current stable version is 1.6.0, released in April 2026 as part of the ember-repl monorepo. It uses es-module-shims and supports JavaScript, React, Vue, Svelte, Ember, Glimdown, and Mermaid out of the box. Key differentiators: on-demand async compilation (only pay for what you compile for), nested language support within Markdown, and a flexible plugin API for adding custom compilers/renderers. Unlike alternatives like CodeSandbox or RunKit, repl-sdk is designed for embedding in web apps with minimal overhead and full control over the compilation pipeline.
npm install repl-sdkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a REPL SDK instance, compiles a simple JavaScript expression, and logs the resulting code.
Use ES module import: import { ... } from 'repl-sdk'Use buildCompiler() instead: import { buildCompiler } from 'repl-sdk'Refer to documentation for adding custom compilers; expect possible breaking changes in minor versions.
Always await the compilation result.
Add type="module" to your script tag: <script type="module" src="app.js"></script>
Ensure createReplSdk() is awaited: const sdk = await createReplSdk();
Install es-module-shims: npm install es-module-shims
Verify that createReplSdk() resolves and assign it correctly.