Coming soonSomething new is on the way: NovemAI

Free & open sourceApache-2.0beta · v0.2.0no server-side compute · chromium

ClientVM runs Node.js 24, a real bash and the unmodified npm in the browser. Each agent gets isolated instances with their own filesystem, processes and network, runs npm install and npm run dev, and previews the app it built. No containers, no servers to pay for.

npm install @clientvm/clientvm @clientvm/terminal
Try it in this tab →
user@clientvm
~/app $ npm create vite@latest app -- --template react-ts
Scaffolding project in /home/user/app...
~/app $ cd app && npm install
added 187 packages, and audited 188 packages in 9s
~/app $ npm run dev
  VITE v8  ready in 412 ms
  ➜  Local:   https://k3x9…-p5173.sandbox/

01 / live demo

Run it. Right here, in this tab.

bash · ~/app
editor

The project's files open here.

Changes save as you type. Press Escape, then Tab, to leave the editor.

preview

The page the server serves shows here.

  1. boot
  2. npm install
  3. start
  4. ready

idle

betaClientVM is pre-1.0 (v0.2.0): things can break, and APIs may change between releases. Found a bug? Open an issue.

02 / how it works

Four steps, all inside the browser.

How ClientVM runs codeYour page sends a message to a sandbox on its own origin. There a kernel worker runs node, bash and npm as Web Workers. A service worker serves the server they start as a preview, which your page shows in an iframe.your-app.comyour pagecontrollerchecks messagesyour UIterminal · iframeno COOP/COEPmessage<id>.sandboxown origin · hidden iframekernel workerfiles · processes · terminalsports · mailbox · limitssyscallsnodebashnpmone Web Worker eachvia service workerpreview<id>-p5173shown in an iframe on your page

under the hoodDocument-Isolation-PolicySharedArrayBuffer + Atomics.waitone Web Worker per processservice-worker previewsthreat model

04 / quickstart

Three steps to a running app.

You host one static sandbox, on a domain of its own; your app needs no special headers. Then a few lines boot an instance and show what it serves.

Hosting guide →

  1. Deploy the sandbox, once

    A folder of static files, served on every subdomain of a domain of its own. Each instance and each preview gets its own subdomain, so the browser walls agent code off from your app and from every other instance.

    Why a wildcard subdomain on a separate domain?
    myapp.example                  your app: the controller, no special headers
    └─ k3x9.myapp-sandbox.dev        instance: its own kernel, files, processes
       └─ k3x9-p5173.myapp-sandbox.dev   preview of the dev server on port 5173
    • The browser isolates origins: storage, service workers and windows. One origin per instance keeps its code out of your app and out of the other instances.
    • Previews get an origin per port, served by that origin’s service worker, so an app’s pages are isolated too.
    • Instance ids and ports are made at runtime, so the deployment must answer for any subdomain: a wildcard, not a list.
    • Under your own domain (sandbox.myapp.com) instance code would be same-site with your app, and could set cookies on .myapp.com. A separate domain keeps it cross-site.
    • The headers make every instance page cross-origin isolated (Document-Isolation-Policy). That is what lets fs.readFileSync really block, and why your app needs no COOP/COEP.
    More in the hosting guide →
    terminal
    # static files, no server code
    npm install -D @clientvm/sandbox-host
    
    # deploy node_modules/@clientvm/sandbox-host/dist to *.myapp-sandbox.dev,
    # with these headers on every response:
    #   Document-Isolation-Policy: isolate-and-require-corp
    #   Cross-Origin-Embedder-Policy: require-corp
    #   Cross-Origin-Resource-Policy: cross-origin
    #   Content-Security-Policy: frame-ancestors https://myapp.example
    # (and Service-Worker-Allowed: / on /__clientvm/sw.js)
    
    # then check the deployment
    npx clientvm-check-sandbox 'https://{id}.myapp-sandbox.dev' --app https://myapp.example
  2. Install the runtime in your app

    The controller that runs on your page. It only passes messages to the sandbox and checks each one.

    terminal
    npm install @clientvm/clientvm
  3. Boot an instance and show its preview

    Point the controller at the sandbox from step 1, boot a ready project and start its dev server.

    app.ts
    import { createClientVM } from '@clientvm/clientvm';
    
    // the sandbox from step 1; {id} becomes each instance's subdomain
    const vm = createClientVM({
      sandboxOrigin: (id) => `https://${id}.myapp-sandbox.dev`,
    });
    
    // a ready Vite + React + TypeScript project, node_modules included
    const app = await vm.createInstance({ preset: 'vite-react-ts' });
    
    // the dev server's port opens on its own origin, private to this tab
    const preview = document.querySelector('iframe')!;
    app.onPortOpen((port, url) => (preview.src = url));
    
    await app.spawn('npm', ['run', 'dev'], { cwd: '/home/user/app' });

Add-ons optional, on the same instance

add-ons
// npm install @clientvm/terminal @xterm/xterm
import { Terminal } from '@xterm/xterm'; // or any xterm.js-compatible emulator
import { attachShell } from '@clientvm/terminal';

const term = new Terminal();
term.open(document.querySelector('#terminal')!);

// a real bash: history, Tab completion, Ctrl+C, job control
await attachShell(term, app, { cwd: '/home/user/app' });

05 / limits

Where it stops.

Better to know before you build on it. We never claim generic Node compatibility; every supported API is listed with its gaps.

  • Chromium only

    v1 relies on Document-Isolation-Policy, OPFS and Atomics.waitAsync. Firefox and Safari are not supported yet.

  • No native addons

    node-gyp builds, sharp and prisma engines do not run. A few build tools are swapped for their WebAssembly builds; anything else fails with ERR_DLOPEN_FAILED.

  • The network is the browser’s

    Outbound fetch is subject to CORS, and there is no raw TCP or UDP. git remotes need a CORS proxy.

  • JavaScript only

    Node.js 24 and a TypeScript shell. No Python, no Go, no x86 emulation.

  • Pre-1.0

    The sandbox boundary has not had an independent security review yet. Every Node API we support is listed, with its gaps, in the compatibility matrix.

06 / open source

Free to use. Open source.

ClientVM is Apache-2.0: use it in commercial products, fork it, change it, ship it. The code runs in your users’ browsers, so there are no sandbox servers to run or pay for, only static files to host.

license
Apache-2.0
price
free
server compute
none
on npm
@clientvm/*