Shiro — A Unix environment in one HTML file A static HTML file that boots into a Unix shell. The filesystem is IndexedDB. Commands are JavaScript. Files survive page reloads. Everything runs client-side — the page works offline with no server at all. Build and interact with apps Write a counter, serve it, click buttons from the shell, upgrade to a grapher, commit with git. Interact counter → serve → page commands → upgrade → commit ↻ replay Build and interact with apps Serve an app, use page to click and read DOM elements, then commit. ▶ Real git, no server init, add, commit, diff — all running client-side via isomorphic-git. Git local repository operations ↻ replay Real git, no server init, add, commit, diff. Pure JavaScript, no server needed. ▶ Snapshot as a GIF Capture the entire filesystem into a GIF. Drag it to another instance to restore. Seed GIF snapshot → drag → restore ↻ replay source target Snapshot as a GIF Snapshot one Shiro instance, drag the GIF to restore in another. ▶ How it works Filesystem IndexedDB with a POSIX-like API. stat, readdir, readFile, writeFile, mkdir, symlink, chmod, glob. Files persist across reloads. Shell Pipes, redirects, $variables, &&, ||, quoting, heredocs. Enough of POSIX to be useful for real scripting. Packages Real npm tarballs from the registry. node runs JavaScript files. esbuild bundles TypeScript. require() resolves node_modules. One file Single self-contained HTML. All JS/CSS inlined by the build. ~420 KB gzipped. Deploy anywhere — GitHub Pages, S3, open it locally.
Source: Hacker News | Original Link