← shiro.computer

Shiro

A static HTML file that boots into something resembling a Unix shell.~420 KB gzipped. All JavaScript and CSS are inlined into a single document — no external assets, no CDN, no build artifacts to coordinate. It has pipes, redirects, a persistent filesystem, and over 220 commands — just enough to be useful, not enough to fool anyone into thinking it's a real operating system.

Everything runs client-side. The shell, filesystem, editors, git, and npm are all JavaScript running in your browser — the page works with no server at all. But certain features need a network path: Claude Code calls the Anthropic API, git clone fetches remote repos, and npm install downloads packages. Those requests route through a CORS proxy on shiro.computer because browsers block direct cross-origin calls.

It exists primarily as a host for Claude Code. The idea was to shim enough of Node.js and enough of the standard tools that an AI coding agent could work inside a browser tab: reading files, making edits, searching code, serving apps. It mostly works.

Experimental. Claude Code runs with --dangerously-skip-permissions — every tool call is auto-approved with no confirmation. Because API requests pass through the CORS proxy, your Anthropic credentials transit an intermediary. Do not use this with sensitive data, secrets, or anything you wouldn't paste into a public terminal. Performance is unreliable; shims break in unexpected ways. Treat this as a demo, not a production environment.

If you'd rather just try it: shiro.computer.

loading shiro…
Pipespipes, redirects, and shell plumbing

Pipes

Pipes, redirects, and the usual shell plumbing.

Files persiststored in IndexedDB, survives reloads

Files persist

Stored in IndexedDB. Survives page reloads.

The commands above are JavaScript reimplementations. The filesystem is IndexedDB wearing a POSIX costume.stat, readdir, readFile, writeFile, mkdir, symlink, chmod, glob — enough of the POSIX surface that isomorphic-git and npm can work against it without modification. Files survive page reloads, and each subdomain (app.shiro.computer, game.shiro.computer) gets its own isolated storage courtesy of the browser's same-origin policy.

Text toolsgrep, sort, cut, awk

Text tools

grep, sort, cut, awk — the standard toolkit.

Gitlocal repository operations via isomorphic-git

Git

Local repository operations via isomorphic-git.

Git operations use isomorphic-git, a pure-JavaScript implementation. Local operations — init, add, commit, diff, log, branch — need no server at all. Cloning from GitHub requires a CORS proxy, since browsers can't make cross-origin git HTTP requests directly.The production server at shiro.computer is about 400 lines of Node.js. It serves the static file and proxies API routes (Anthropic, GitHub, OAuth), handles WebRTC signaling, git CORS, and a WebSocket relay for encrypted group networking.

Serve a pagewrite HTML, serve it, edit in place

Serve a page

Write HTML, serve it, edit in place.

preview
appears when demo runs

Web applications are served inside the browser using virtual servers that intercept fetch requests. No actual HTTP server is involved. The page command lets you interact with served apps programmatically — clicking buttons, reading text, evaluating JavaScript — which is how Claude Code tests the things it builds.

Interact with an apppage command, click & read DOM, then commit

Interact with an app

Serve an app, use page to click and read DOM elements, then commit.

Vi editorcreate, edit, search, and serve — all from vi

Vi editor

Create a file with vi, edit it, serve it.

Nano editorcut, paste, search, save with Ctrl shortcuts

Nano editor

Edit files with nano. Cut, paste, search, save.

Advanced workflow

The hc command navigates DOM trees with a token-efficient shorthand.Hypercompact: hc open parses HTML from disk, hc q runs CSS selectors, hc look lists interactive elements. Designed for LLM agents that need to inspect pages without rendering them. Combined with page input, page eval, and grep -rn, you get a full CLI-driven development loop: build a multi-file project, serve it, interact with it through the DOM, search the codebase, and commit — without leaving the terminal.

Advancedhc, page input/eval, grep -rn, multi-file project

Advanced workflow

Build a todo app, serve it, interact with the DOM, search code, commit.

IDE

The ide command opens a visual development environment.LiteEditor is a zero-dependency textarea-based editor with syntax highlighting for JavaScript, TypeScript, CSS, HTML, JSON, and Markdown. The two layers — a transparent textarea on top, a highlighted pre below — are kept in pixel-perfect alignment by matching all font and spacing properties. File tree, multi-tab editor with syntax highlighting, live preview, integrated terminal, git status, and a Claude chat panel. Everything runs through the same virtual filesystem — the IDE is just another way to look at the same files.

IDEvisual development environment

IDE

File tree, editor with syntax highlighting, terminal, live preview.

Seed GIFsnapshot one instance, drag to restore in another
source
target

Seed GIF

Snapshot one Shiro instance, drag the GIF to restore in another.

Claude Code

The real @anthropic-ai/claude-code npm package runs inside a Node.js runtime shim.The CLI is about 11 MB of bundled ESM. The runtime shim provides roughly 50 Node.js module stubs — fs, path, process, child_process, crypto, and so on. API calls route through a CORS proxy to api.anthropic.com since the browser can't reach it directly. Not a reimplementation — the actual CLI, loaded and executed in the browser's JavaScript VM. The tools Claude Code depends on — file reads, edits, grep, glob, bash — are wired to the virtual filesystem. Both interactive mode and print mode work.

It's good enough for reading, editing, and searching code. Building and testing work for simple projects. Complex workflows occasionally find the seams.

Remote control

An outer Claude Code instance — running on your actual machine — can control Shiro via MCP tools over WebRTC.The server handles the initial WebRTC signaling handshake. After that, all data flows peer-to-peer between the browser and the outer Claude Code process. Connection codes have ~46 bits of entropy and expire in 5 minutes. Run remote start in Shiro to get a connection code, then use the shiro-mcp package to exec commands, read and write files, and evaluate JavaScript in the browser.

Snapshots

seed gif is perhaps the most unusual feature.The GIF encoder is handwritten TypeScript — LZW compression, extension blocks, the whole format — with zero npm dependencies. The filesystem data is gzipped and stored in a SHIRO1.0 Application Extension block. It captures a terminal screenshot, encodes it as a real GIF image, and embeds the entire filesystem in a custom extension block. The result looks like a screenshot but carries the complete state. Drag it back onto Shiro to restore everything.

seed html downloads a standalone HTML file — open it in any browser to boot Shiro with your filesystem already loaded.

Inject into any page

seed (with no arguments) copies a JavaScript snippet to your clipboard. Open DevTools on any website, paste it into the console, and a floating Shiro window appears on top of the page.The snippet creates a draggable, resizable iframe with macOS-style traffic lights (close, minimize), font size controls, and a title bar. It loads Shiro from shiro.computer and sends your entire filesystem + localStorage via postMessage. Your files come with it. Everything you had in Shiro is available inside the injected window.

More interesting: the snippet also installs an hc bridge into the host page. From inside the injected Shiro, run hc outer and all hc commands now operate on the host page's DOM.The bridge communicates via postMessage. The Shiro iframe sends shiro-hc messages; the host-page bridge executes q, look, @N, g, and the rest of the HC command set against the real document, then posts the result back. No cross-origin issues because postMessage doesn't require same-origin. hc look lists every button, link, and input on the page. hc q .product-price queries elements. hc @3 clicks one. You can read text, grep content, inspect attributes — all from a shell prompt floating over the page you're examining.

Since Claude Code runs inside Shiro, this means an AI coding agent can interact with any website: navigate a page, read its DOM, click buttons, extract data. The page doesn't need to cooperate or expose an API.

seed blob is the self-contained variant.The blob variant inlines all of Shiro's HTML, JavaScript, and CSS, gzip-compresses everything, and base64-encodes it. At runtime it decompresses and creates a blob URL. No network request to shiro.computer, so it works even on pages with restrictive Content Security Policies. Instead of loading Shiro from shiro.computer, it packs the entire application into the snippet itself — gzip-compressed and encoded as a blob URL. No external fetch, no CSP issues. It works offline, on intranets, behind firewalls.

Rough edges

Shell scripting handles basic constructs, not the full POSIX specification. npm installs real packages from the registry, but anything requiring native compilation won't work. There's no process isolation — everything runs in the main thread.It's a browser pretending to be a computer. The pretense is good enough to be useful, not good enough to be invisible.