Skip to content

leaningtech/browsercode

Repository files navigation

BrowserCode logo

Discord server Issues Version

Run AI coding CLIs and frameworks in the browser

BrowserCode is a browser-based playground for fast-prototyping full-stack apps and sharing them instantly. It runs on BrowserPod, a multi-language WebAssembly sandbox (Node.js, Python, and more), with no installs, no servers, and no cloud compute.

Table of contents

What is BrowserCode?

BrowserCode is a browser-based coding sandbox. It's a working example of BrowserPod, and includes:

  • Node.js v22 running in the browser via WebAssembly
  • A browser-contained, POSIX-like filesystem
  • Command line tools: bash, git, npm
  • Browser sandbox isolation from the user's operating system
  • Restricted outbound networking
  • Instant previews over URL via BrowserPod's portal function
  • Support for Express.js, Svelte, Next, Nuxt and React (with Wasm overrides)

BrowserCode started out as a way to run AI coding CLIs entirely client-side. It's since grown into a full IDE: alongside the CLIs, it can boot and preview web frameworks directly in the browser, so you can prototype an agent's output without ever leaving the tab.

BrowserCode 0.6.0 is our latest beta release. This preview launches with an unmodified version of Claude Code, running completely client-side. Gemini CLI is available as well.

Quickstart

Want to try BrowserCode without installing anything? Use the hosted app.

  1. Go to browsercode.io
  2. BrowserCode will boot instantly, opening with a quick modal tutorial to guide you
  3. Claude Code will launch instantly
  4. Depending on your log-in option, you may be asked to authenticate your account by copying a code from a separate tab

Make it your own

Want to run your own copy, customize the CLIs, or contribute? Clone the repo and run it locally.

  1. Clone the repository and install dependencies

    git clone https://github.com/leaningtech/browsercode.git
    cd browsercode
    npm install
  2. Get a BrowserPod API key at browserpod.io and expose it to the app as VITE_API_KEY

    echo "VITE_API_KEY=your-key-here" > .env
  3. Start the dev server

    npm run dev
  4. Open the printed local URL in a Chromium-based browser

Other useful scripts:

  • npm run build — build a production bundle
  • npm run preview — preview the production build locally
  • npm run check — type-check the project
  • npm run lint / npm run format — lint and format with Prettier + ESLint

CLI availability and behavior are configured in src/lib/config/tools.ts — this is the place to start if you want to add or tweak a CLI.

Breaking BrowserCode

This is BrowserCode beta. Don't be kind to it. Stretch it, bend it, find out what breaks. Here are a few walls you might hit:

  • At launch, Claude is prompted using a custom skill to help it understand that it is running in a custom environment. However, it may first attempt its default behavior before referencing the file
  • BrowserCode doesn't yet support native binaries. For more information, see the BrowserPod documentation
  • Networking over TCP isn't available
  • For maximum compatibility, please use a Chromium browser. Safari currently isn't supported

Roadmap

CLI Status
Gemini CLI Gemini CLI ✅ Beta open now
Claude Code Claude Code ✅ Beta open now
Codex Codex 🚧 Coming soon
OpenCode OpenCode 🚧 Coming soon

Also coming up: cloning GitHub repos directly into your BrowserCode workspace.

(back to top)