HagalazOS is a fully client-side operating system simulator built entirely in HTML, CSS, and JavaScript. It runs in any modern browser with no server, no build step, and no runtime dependencies beyond the browser itself. The entire system — windowed desktop, terminal emulator, app registry, and bootloader — lives inside a small collection of static files you can open directly from disk or serve from any HTTP server.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/linuxfandudeguy/HagalazOS/llms.txt
Use this file to discover all available pages before exploring further.
Two modes
HagalazOS boots into one of two environments, selected from the keyboard-navigable bootloader inindex.html:
- GUI mode — A windowed desktop environment styled with 7.css, giving it the look and feel of Windows 7. Apps appear as icons on a grid-based desktop, open in resizable and draggable windows, and are listed on a taskbar.
- Terminal mode — A full-screen terminal emulator rendered over a Vanta.js animated globe background. It supports a set of built-in shell commands including
curl(via libcurl.js over a Wisp WebSocket proxy),neofetch,ip,games, andluminsdk.
Key technical design
Chainloading bootloader.index.html does not navigate to a new page when you boot. Instead it calls fetch() on the target file (os.html or terminal.html), reads the full HTML as text, then calls document.open() / document.write() / document.close() to replace the live document entirely in place. This keeps the browser history clean and avoids a hard navigation.
Blob iframe sandboxing. In GUI mode, each app’s HTML is loaded with fetch(), converted into a Blob URL (URL.createObjectURL), and mounted inside an <iframe>. This sandboxes app content from the parent document while still allowing apps to be served from relative paths or external URLs.
window.Apps[] registry. Each app file (e.g. apps/browser.js, apps/calculator.js) pushes a descriptor object onto window.Apps. On window.onload, script.js reads that array, renders a desktop icon at the configured grid position, and optionally adds a taskbar button. Apps declare their id, title, icon (Bootstrap Icons class), htmlPath, optional fallbackUrl, and grid coordinates.
Grid-based desktop layout. Desktop icons are positioned on an 80 × 80 pixel grid. script.js tracks occupied cells in a Set and auto-places icons that do not declare an explicit gridX/gridY. Positions are set with absolute CSS using pixel offsets calculated from the grid coordinates.
Ctrl+X shortcut. Pressing Ctrl+X closes whichever window currently has the highest z-index, letting you dismiss the frontmost window from the keyboard without reaching for the title bar close button.
Single-file deployment
For zero-setup use, HagalazOS ships two self-contained variants that resolve all assets from jsDelivr CDN using a<base href> tag:
| File | Purpose |
|---|---|
singlefile.html | Single-file bootloader — chainloads ossingle.html or terminal.html via CDN |
ossingle.html | Single-file GUI mode — all asset paths resolved from a pinned jsDelivr commit |
Explore further
GUI Overview
Learn about the windowed desktop, app registry, blob iframe sandboxing, and the 7.css Windows 7 styling.
Terminal Overview
Explore the built-in shell commands, libcurl.js network support, Vanta.js background, and the Lumin SDK integration.