Skip to content

Quickstart

Use Node.js 24 or newer. Choose a new directory for your app:

Terminal window
npx @oxvm/cli@latest init my-app --start

Creates the app, installs dependencies and starts a local server. Open the local URL printed in your terminal.

The starter runs real Linux Python and pandas in your browser. Edit the Python code, upload a CSV and explore the resulting DataFrame. An interactive Linux terminal is included.

The generated app includes the SDK, browser headers and a signed, prebuilt image reference. You do not need to build an image or download the engine locally. The engine and image load in the browser when you run the app.

To start it again later, run npm run dev or bun run dev from my-app. See Starter example for its files and features.

To change the Linux programs, follow Custom images. The generated README links to the exact release recipe and build guide. The recipe directory is not copied into your app.

OxVM project skills are included in every new starter. Open the folder in Codex or Claude Code and start building.

Add a revenue chart from the DataFrame result. Keep Python running in Linux.
Already have a project? Install the plugin
Terminal window
codex plugin marketplace add spacia-ai/oxvm-skills
codex plugin add oxvm@oxvm

For existing projects. The starter needs no extra installation. Use current Codex or Claude Code.

Desktop setup ↗ · Updates & compatibility ↗

If you already have a Vite app, follow the steps below to write a file into a VM’s workspace and read it back with a Linux program.

Local development needs no account or token. Before publishing this app, register a public license and pass its token as runtime.license.

  1. Install the SDK.

    Terminal window
    npm install @oxvm/sdk

    The package contains no engine or guest image. The hosted runtime downloads the explicitly selected signed image in the browser. Use the src/image.ts reference from a starter generated with the same SDK release, or copy the trusted reference below to your app’s src/image.ts. It includes the manifest hash and independent author key. A custom image build is optional.

    Image recipe for SDK 0.0.34 · Complete build and deployment guide · Signed starter image reference

  2. Serve with the right headers. The engine needs a cross-origin isolated page, so every response needs two headers. In Vite:

    vite.config.ts
    import { defineConfig } from "vite";
    const headers = {
    "Cross-Origin-Opener-Policy": "same-origin",
    "Cross-Origin-Embedder-Policy": "require-corp",
    };
    export default defineConfig({
    optimizeDeps: { exclude: ["@oxvm/sdk"] }, // keeps the SDK's worker URLs intact
    worker: { format: "es" },
    server: { headers },
    preview: { headers },
    });

    Restart the dev server, open your app and check that crossOriginIsolated is true in the browser console.

  3. Create your first VM. Call createVM from browser code, never during server rendering:

    src/main.ts
    import { createVM } from "@oxvm/sdk";
    import image from "./image.js";
    const vm = await createVM({ mode: "userspace", runtime: { hosting: "frame" }, image });
    try {
    await vm.workspace.writeText("hello.txt", "Hello from Linux\n");
    const result = await vm.exec({ command: "cat", args: ["hello.txt"] });
    console.log(new TextDecoder().decode(result.stdout), result.exit);
    } finally {
    await vm.dispose();
    }

    runtime: { hosting: "frame" } runs the engine in a hidden frame from https://run.oxvm.dev, which also serves the default image.

    Run the same two steps on this page’s own VM:

    Write a file, read it backUserspaceNot started
    Hello from Linuxexit: {"kind":"exited","code":0}
    Downloads Linux into this tab when you click.
  • vm.workspace reads and writes files under /workspace in the VM. See Workspace files.
  • vm.exec runs a short command and returns its output and exit status. See Run commands.
  • result.exit is { kind: "exited", code } or { kind: "signaled", signal, signalNumber }. A non-zero exit code is a normal result, not an error.
  • Your site serves only your app. Deploying covers the headers on your host, a Content Security Policy, and serving the engine yourself.

Next, open an interactive terminal or decide between Userspace and System.