The Vision

A browser-native Linux system. No server, no VM, no compromise.

Why

Open a browser tab. It already has a persistent filesystem, a JIT compiler, hardware-accelerated graphics, and a network stack. It has everything a computer needs — except the software that makes it feel like one.

Shiro is that software. A Unix-like operating system that runs entirely in JavaScript, backed by IndexedDB for persistence. Shell, git, npm, node, compilers, databases, editors, and an AI coding agent — all in one tab, with zero backend.

Three Tiers

Not everything can be a JavaScript reimplementation. Shiro's architecture has three tiers of execution, each more general than the last:

Tier 1 — JavaScript

220+ hand-written commands

ls, cat, grep, sed, git, npm, node, esbuild, sqlite3, python — reimplemented in TypeScript. Fast, small (~420 KB total), deeply integrated with the browser.

Tier 2 — WASM + WASI

Real binaries via WebAssembly

A full WASI preview1 runtime with 40 syscalls. Runs real compiled programs: xcc (C compiler), Lua, jq, and 22 packages from the Wasmer registry. Near-native speed.

Tier 3 — x86 emulation

Run any Linux binary

A full x86-64 instruction-level emulator with ~130 instructions, 58 Linux syscalls, SSE2, and TLS support. JIT basic block cache and network syscall stubs. Runs real musl-static ELF binaries compiled with gcc — in the browser, no server.

What works today

Shiro isn't a prototype. It's a working system with comprehensive bash-compatible shell scripting, package management, and real development tools.

ls cat grep sed awk git npm node cc python sqlite3 esbuild vi nano jq lua curl tar zip find sort wc diff ssh-keygen

The shell supports pipes, redirects, heredocs, arrays, arithmetic, functions, process substitution, extended globbing, traps, programmable tab completion, and dozens more bash features — tested by 2,171+ automated tests.

The Chain

Proof that it works: six tools from three different execution models, piped through each other in a single browser tab.

cc node sqlite3 jq esbuild git serve

Compile C to WebAssembly, measure information entropy in Node.js, store results in SQLite, transform with jq, bundle a TypeScript visualization with esbuild, commit with git, and serve it — all without leaving the browser. Watch it run.

What's already shipped

Everything below was once "what's next." Now it's live, tested, and deployed:

Binary package managerxpkg install downloads and runs real x86 Linux binaries through the emulator. Terminal multiplexer — tmux-like pane splitting, sessions, and detach/attach. SSH-over-WebRTCssh <code> opens a peer-to-peer shell session between browser tabs, scp transfers files. Compression suite — bzip2, xz, and zstd with full tar integration. Init system + cron — systemctl services, cron scheduling, journalctl logs. JIT codegen — the x86 emulator now has block-level code generation. Node.js compat — npm installs real packages, node runs them with JSX/TSX support. npx auto-installs and executes. Computer visioncamera | cv "describe this" pipes webcam snapshots through Claude API. Hot reloadserve watches files and live-reloads the preview iframe.

What's next — Spirit + Package Ecosystem

The app platform is built. npm install, npm start, npx, JSX/TSX, and live preview with hot reload all work. The next frontier is AI-native shell interaction and real-world package compatibility.

Spirit pipe modecat data.csv | spirit "summarize this" pipes data through AI. Spirit generatespirit "write an Express API" > server.js. Package compatibility — prettier, eslint, typescript, and React running end-to-end in the browser. Port auto-detection — watch for listening ports and auto-open preview.

The goal

A browser tab where you can npm install, npm start, and see your app live — with Claude Code as your pair programmer. No server, no tunnel, no SSH. Just open a tab and start building.