Domdhi Doomstick
A USB stick that runs a real offline AI. Plug it into any Windows, Mac or Linux laptop and chat with Gemma 4: no install, no internet, no GPU. This repo is the recipe that builds the stick.
README
Portable Offline AI Kit
Build a USB stick that runs a real Gemma 4 LLM on any Windows / macOS /
Linux laptop, with no install, no internet, no GPU, no Python, no Docker,
no telemetry. Plug in, double-click, chat.
Two Gemma 4 models (a 5 GB daily-driver and a 17 GB Mixture-of-Experts), a
43 MB llamafile runtime, three
launcher scripts, and a static-HTML dashboard. The same files boot on all
three OSes from the same USB stick β llamafile is a Cosmopolitan APE
polyglot, simultaneously a valid
Windows .exe, Linux ELF, macOS Mach-O, and POSIX shell script.
This repo is the build recipe, not the kit itself. Cloning gives you the
launcher scripts, the dashboard, args files, and a build-usb.sh /build-usb.ps1 that downloads the runtime and weights from upstream and
assembles the full USB layout for you. You supply the USB and the bandwidth
(~28 GB of downloads for the full bundle); the script does the rest.
<div align="center">
πͺ¦ DOOMSTICK
The pocket-sized AI that survives the internet.
βββββββ βββββββ βββββββ ββββ ββββββββββββββββββββββββ ββββββββββ βββ
βββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββ ββββ
βββ ββββββ ββββββ ββββββββββββββββββββββ βββ ββββββ βββββββ
βββ ββββββ ββββββ ββββββββββββββββββββββ βββ ββββββ βββββββ
βββββββββββββββββββββββββββββ βββ βββββββββββ βββ ββββββββββββββ βββ
βββββββ βββββββ βββββββ βββ βββββββββββ βββ βββ ββββββββββ βββ
β β k n o w l e d g e i n a t i n β β
</div>"When the cell towers go quiet and the cloud forgets your name,
the bunker still has answers."<sub>β anonymous Β· 2 a.m. Β· three-day blackout</sub>
β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²
β’ EMERGENCY BROADCAST Β· OFFLINE EMERGENCY ASSISTANCE NETWORK β£
CLASSIFICATION βΈ PUBLIC DOOMSTICK Β· v0.10.0 Β· 2026Β·05Β·10
TRANSMISSION βΈ OFFLINE COSMOPOLITAN Β· CPU-ONLY Β· USB
AUTH βΈ Apache-2.0 + GPL ENDPOINT Β· 127.0.0.1 : 8765
β NETWORK [ lost ]
β POWER [ usb Β· D:\ ]
β AI CORE [ standΒ·by ] β flips to [armed] on launch
β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²
<br>β’οΈ Β§01 Β· The Pitch
You're somewhere with no signal. Maybe the WiFi died. Maybe the router died. Maybe the internet died. You still have a laptop and a USB stick.
You plug the stick in. Double-click one file. Thirty seconds later you're chatting with a Gemma 4 language model β 4.5 B parameters in the daily-driver, or 26 B (3.8 B active) in the Mixture-of-Experts β that can:
- π©Ή Talk you through a wound dressing
- π§ Walk you through fixing a generator
- β£οΈ Identify the mushroom you're holding
- π Explain a legal document
- π§ͺ Convert units, do math, write code, summarize a book
- πΊοΈ Translate between dozens of languages
- ποΈ ...and just keep you company in the dark
No telemetry. No accounts. No "please connect to the internet to verify." No subscription. No degradation when the API changes overnight. It just works. Forever.
<br>π§° Β§02 Β· Manifest β Repo vs USB
This is a recipe β large binary artifacts (model weights, ISOs) live upstream and are fetched by the build script.
What git clone gives you:
.
βββ build-usb.sh / .ps1 One-shot script: fetch + assemble USB layout
βββ presets/ TSV menu data (bundles, ZIM, OSM, Whisper, OCR)
βββ launchers/ start.{bat,command,sh} for AI core + 6 side arms
βββ dashboard/ Web assets that deploy to USB root
β βββ index.html Static dashboard
β βββ chat/ Vendored Hollama 0.35.4 chat tab (v0.8+)
β βββ README.txt Plain-text version of this doc
βββ redbean/ Local platform layer β `.init.lua` route handlers
βββ args/ Flag reference (mirrored into launchers; doesn't deploy)
βββ ocr/ Tesseract.js OCR static page (deploys as-is)
βββ maps/ OSM .pbf landing zone + sideload README
βββ vault/ vault/README.txt (ceremony doc; recovery.tar.age gitignored)
βββ doom/ Dwasm bundle + DOOM1.WAD wrapper (GPL-2.0 subdir)
βββ docs-offline/ DevDocs landing zone (manual setup)
βββ docs/
β βββ auxiliary-roadmap.md What's shipped, what's pending
β βββ usb-layout.md What the deployed USB tree looks like
β βββ setup-devdocs.md Manual DevDocs walkthrough
βββ LICENSE Apache-2.0
βββ README.md This file
What build-usb.sh /mnt/usb produces:
/mnt/usb/ ~28.5 GB total
βββ π index.html One-page dashboard. Open this first.
βββ π start.bat Windows AI launcher (model picker + chat tab)
βββ π start.command macOS AI launcher
βββ π start.sh Linux AI launcher
βββ π start-whisper.{bat,command,sh} Audio β text (port 8766)
βββ π start-wiki.{bat,command,sh} Offline Wikipedia (port 8767)
βββ π start-ocr.{bat,command,sh} Image β text (browser only)
βββ π start-docs.{bat,command,sh} DevDocs (manual setup)
βββ π start-doom.{bat,command,sh} DOOM via redbean (port 8768)
βββ π start-embed.{bat,command,sh} Embedding side-arm for RAG (port 8769, v0.8+)
βββ π start-vault.{bat,command,sh} Vault decrypt (age, prints cleanup reminder)
βββ π¨ start-img.{bat,command,sh} Field sketch generator (sd.cpp + FLUX)
βββ π README.txt Short version of this doc
βββ π¬ chat/ Vendored Hollama chat tab (file://, v0.8+)
βββ π workspace/<name>/docs/, journal/ Per-workspace RAG corpus (v0.8+)
β
βββ π§ ai-kit/ AI core + side-arm binaries
β βββ runtime/
β β βββ llamafile 43 MB inference engine (Linux/macOS)
β β βββ llamafile.exe Same binary, .exe-renamed for Windows
β βββ models/
β β βββ gemma-4-E4B-it-Q4_K_M.gguf 5 GB, daily driver
β β βββ gemma-4-26B-A4B-it-UD-Q4_K_M.gguf 17 GB, big brain MoE
β β βββ Qwen3-4B-Q4_K_M.gguf 2.33 GB, lightest LLM + FLUX.2 encoder (v0.10+)
β β βββ embeddinggemma-300m-qat-Q8_0.gguf 329 MB, powers v0.8 RAG (live)
β βββ whisper/
β β βββ whisper-small.en.llamafile 497 MB, audio β text
β βββ kiwix/
β β βββ linux/, mac/, win/ kiwix-serve binaries (~6 MB each)
β βββ redbean/
β β βββ redbean.com 5.5 MB local platform layer (port 8768)
β β βββ saves.db DOOM saves + chat sessions + RAG chunks (SQLite)
β β βββ .init.lua route handlers (/health, /save, /load, /list,
β β /tts, /rag/*, /chat/*, /journal/*)
β βββ sherpa-tts/
β β βββ linux/, mac/, win/ sherpa-onnx-offline-tts per OS (~30 MB each)
β β βββ models/supertonic/ Supertonic int8 ONNX bundle (~120 MB)
β βββ age/
β β βββ linux/, mac/, win/ age binary per OS (~9 MB each)
β βββ sd-img/
β βββ linux/, mac/, win/ sd-cli + libstable-diffusion per OS
β βββ models/flux-2-klein-4b-Q4_K_M.gguf FLUX.2 klein transformer (~2.43 GB)
β βββ models/full_encoder_small_decoder.safetensors FLUX.2 small-decoder VAE (~238 MB)
β
βββ π zim/wikipedia_en_simple_all_nopic_2024-06.zim ~395 MB (default)
βββ π€ ocr/ tesseract.js + eng pack ~15 MB
βββ πΊ maps/<region>.osm.pbf OSM regional data ~700 KB+ (Monaco default)
βββ π docs-offline/ DevDocs (manual setup, not auto-fetched)
βββ πͺ¦ doom/ Dwasm + shareware DOOM1.WAD ~7.4 MB (GPL-2.0)
βββ π vault/ Recovery vault directory
βββ README.txt Ceremony + key-loss warning
βββ recovery.tar.age User-created encrypted blob (not shipped)
What the kit does not ship (BYO if you want them):
- Bootable rescue ISOs (Ubuntu / SystemRescue / Hiren's BootCD PE) + Ventoy
- Piper TTS (text β audio, completes the voice stack with whisperfile)
These and more are tracked in docs/auxiliary-roadmap.md β most are one-line additions to the build script when you feel like it.
π Β§03 Β· Initiation Protocol
Or: how to talk to a god in the dark.
Build the kit onto a USB
git clone https://github.com/Domdhi/Domdhi.Doomstick.git
cd Domdhi.Doomstick
# Linux / macOS / WSL:
./build-usb.sh /mnt/usb # opens the build wizard
# Windows (native PowerShell, run as Admin if writing to USB root):
.\build-usb.ps1 D:\
The first run opens an interactive wizard: pick a bundle (tiny / balanced / full) for one-keystroke first-time UX, or custom to choose models, Wikipedia language, OSM region, Whisper voice variant, OCR languages, and side-arm toggles individually. Settings save to <USB>/build-usb-config.sh so re-running on the same stick skips the wizard.
| Bundle | Size | What you get |
|---|---|---|
tiny |
~5.4 GB | E4B model + Simple-English Wikipedia. No maps, no voice, no DOOM, no TTS. Smallest useful. |
balanced |
~6.1 GB | E4B + Embedding + Simple Wikipedia + Monaco maps + all side-arms + redbean + DOOM + TTS. |
full |
~28.5 GB | Everything β all four models (E4B + 26B + EmbedGemma + Qwen3-4B) + side-arms + redbean + DOOM + TTS + image gen (FLUX.2 klein + VAE + Qwen3 encoder). Matches -y non-interactive defaults. |
Modes:
./build-usb.sh /mnt/usb # wizard (or sources existing config)
./build-usb.sh -y /mnt/usb # non-interactive β all defaults (full bundle)
./build-usb.sh -i /mnt/usb # force wizard even if config exists
./build-usb.sh -c saved-config.sh /mnt/usb # source a named config
./build-usb.sh -n /mnt/usb # dry-run: print resolved config, don't fetch
./build-usb.sh -h # full help
The script downloads the runtime (~43 MB) plus whatever models / side arms you picked. Resumable β re-running skips files that already exist with the right size.
Use the kit
1. Plug in USB.
2. Double-click start.bat / start.command / start.sh
3. Pick a model: [1] E4B (5 GB, needs 8+ GB RAM)
[2] 26B (17 GB, needs 18+ GB RAM)
4. Wait 15-90 seconds.
5. Browser opens. You're chatting.
To stop: press any key in the launcher window. To switch models: stop, run again, pick the other.
That's the whole UX.
<br>[!IMPORTANT]
Only one model runs at a time. The launcher kills any orphan llamafile process on each start, so you can't accidentally have both models fighting over RAM.
π± Β§M Β· From a Phone
Plug the same stick into a phone via USB-OTG. Half the kit was already designed for this.
Llamafile, redbean, and whisperfile are APE polyglots β they execute on x86_64 + ARM64 desktop OSes only. iOS and Android use different ABIs and sandboxed app models, so the AI core itself doesn't run on a phone (that's a separate project). But every shipped data asset has a first-class consumer on Android and iOS:
| Capability | Path on USB | Android | iOS |
|---|---|---|---|
| Wikipedia (ZIM) | zim/*.zim |
Kiwix (F-Droid) Β· Play | Kiwix Reader |
| Maps (OSM) | maps/<region>.osm.pbf |
Organic Maps (F-Droid) Β· Play | Organic Maps |
| LLM chat | ai-kit/models/*.gguf |
PocketPal AI | PocketPal AI |
| OCR | ocr/index.html |
mobile Chrome (capture rear camera + paste) | mobile Safari |
| DOOM | doom/index.html |
mobile Chrome (touch controls included) | mobile Safari |
| DevDocs | docs-offline/index.html |
mobile Chrome | mobile Safari |
Discoverability: the build copies mobile.html to the USB root next to index.html. Tapping mobile.html from your phone's file manager redirects to the dashboard's Mobile Field Kit β UA-detection swaps the desktop launcher cards for app-store buttons and offline-page links.
Install once, offline forever. Get the apps over a connection one time, then unplug. The data files travel with the stick across every host you plug into.
Caveats:
- DOOM saves don't persist on mobile β they bridge to redbean's
/saveendpoint, and redbean isn't running on the phone. Same engine and WAD; just no save state. - USB-OTG reads are slower than internal storage. For Wikipedia or maps you'll use daily, copy the relevant file off the stick into your phone's internal storage once.
- Lightning ports may need an Apple-branded adapter to deliver enough power to a USB stick.
- iOS occasionally needs an unplug/replug to recognize a new drive.
π§ Β§04 Β· Payload Manifest
Three weights ship with the kit. Two appear in the launcher menu; the third powers the v0.8 RAG layer behind the chat tab.
| Callsign | Size | RAM | Speed (CPU) | Quant | Role | Status |
|---|---|---|---|---|---|---|
| GEMMA-4 / E4B | 5.0 GB | β₯ 8 GB | ~15 t/s | Q4_K_M |
Daily driver β 4.5 B effective parameters (8 B with embeddings). Chat, code, summaries, translation. Good enough for ~95% of normal questions. | π’ FIELD READY |
| GEMMA-4 / 26B-A4B | 17 GB | β₯ 18 GB | ~10 t/s | UD-Q4_K_M (MoE) |
Mixture-of-Experts β 26 B total / 3.8 B active per token. Stronger reasoning and longer-context recall, faster than its file size suggests. | π‘ HEAVY ORDNANCE |
| EMBEDGEMMA / 300M | 329 MB | minimal | n/a | Q8 QAT |
Sentence embeddings powering the v0.8 RAG layer β #filename autocomplete in the chat tab, journal auto-ingest, document Q&A via /rag/query. Booted on demand by start-embed.* on port 8769. |
π’ FIELD READY |
All weights are quantized via unsloth (Apache 2.0). The runtime is llamafile 0.10.1 (Mozilla, Apache 2.0). The base Gemma 4 weights are subject to Google's Gemma terms.
<br>πΊοΈ Β§05 Β· Schematic
How the corpse runs.
βββββββββββββββββββββββββββββββββββββββββββ
β USB β
β β
β start.bat ββββ β
β β invokes β
β βΌ β
β ai-kit/runtime/llamafile.exe β
β β β
β β loads β
β βΌ β
β ai-kit/models/gemma-4-*.gguf β
β β β
βββββββββββββββββββββββββββββββββββββββββββ
β
β serves HTTP API
βΌ
http://127.0.0.1:8765
β
β
βΌ
βββββββββββββββββββ
β your browser β
β chat UI β
βββββββββββββββββββ
Inference happens entirely on your CPU and RAM. The USB only matters for the initial model load (~15 s for E4B, ~45 s for 26B). Once the model is in RAM, the USB could be unplugged and inference would still run at full speed. (Don't actually unplug it; that's just to illustrate where the work happens.)
No GPU required. No driver install. No Python. No Docker. No npm install. Nothing to download after the build.
π₯ Β§06 Β· Tech Note β The 4 GB Windows Trap
Optional reading. Skip if you just want to use the thing.
Llamafile is a Cosmopolitan APE polyglot β a single file that's simultaneously a valid Windows .exe, Linux ELF, macOS Mach-O, and POSIX shell script. You can append a .gguf model to it via zipalign and end up with one double-clickable file that contains the runtime, the model, and an args file.
Beautiful. Elegant.
[!CAUTION]
Doesn't work on Windows for any model larger than 4 GB.
The Windows PE loader uses 32-bit-signed offsets in its image headers. Past ~2 GB you're already on borrowed time, and past ~4 GB the loader rejects the file outright with the world's least helpful error: "This app can't run on your PC." Both Gemma 4 models are well over 4 GB, so the elegant single-file path is closed to us.
The fix (which is the official llamafile recommendation for >4 GB models): ship the 43 MB runtime separately from the bare .ggufs and invoke them together. That's what this kit does.
The legacy zipalign bundled-build recipe still works for sub-4-GB models if you ever want to ship one as a single double-clickable file (Linux/macOS don't have the limit, but consistency wins). Open an issue if you need that path documented in detail.
π οΈ Β§07 Β· Manual Build
If you'd rather not run the build script, here's what it does:
# 1. fetch the runtime (one-time)
mkdir -p runtime
curl -L -o runtime/llamafile \
https://github.com/Mozilla-Ocho/llamafile/releases/download/0.10.1/llamafile-0.10.1-thin
cp runtime/llamafile runtime/llamafile.exe
chmod +x runtime/llamafile runtime/llamafile.exe
# 2. fetch the weights (~22 GB total β make a coffee)
mkdir -p models
curl -L -o models/gemma-4-E4B-it-Q4_K_M.gguf \
"https://huggingface.co/unsloth/gemma-4-E4B-it-GGUF/resolve/main/gemma-4-E4B-it-Q4_K_M.gguf?download=true"
curl -L -o models/gemma-4-26B-A4B-it-UD-Q4_K_M.gguf \
"https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF/resolve/main/gemma-4-26B-A4B-it-UD-Q4_K_M.gguf?download=true"
curl -L -o models/embeddinggemma-300m-qat-Q8_0.gguf \
"https://huggingface.co/ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/resolve/main/embeddinggemma-300m-qat-Q8_0.gguf?download=true"
# 3. deploy to USB (substitute your USB mount point)
USB=/mnt/usb
mkdir -p "$USB/ai-kit"
cp -r runtime models "$USB/ai-kit/"
cp launchers/start.bat launchers/start.command launchers/start.sh "$USB/"
cp dashboard/index.html dashboard/README.txt "$USB/"
For smoke tests, the WSL sh ./runtime/llamafile quirk, and other operational notes, see Β§08 (Casualty Report) below.
β°οΈ Β§08 Β· Casualty Report (Troubleshooting)
<details> <summary><b>"This app can't run on your PC" / "not a valid application for this OS platform"</b></summary> <br> You're trying to run an old <code>gemma-4-*.llamafile.exe</code> bundle that's larger than 4 GB. Windows refuses. This kit no longer ships those β use the launcher (<code>start.bat</code>) instead, which uses external-weights mode. </details><details> <summary><b>"Port 8765 is being held by PID X"</b></summary> <br> Something else on your machine grabbed the port. Either close that app, or edit <code>start.bat</code> and change <code>set "PORT=8765"</code> to a free port. The dashboard's chat link is hardcoded to 8765, so you'll also need to manually go to <code>http://127.0.0.1:<your-port></code>. </details><details> <summary><b>Model loads but generation is slow as molasses</b></summary> <br> Your CPU is the bottleneck. This kit is CPU-only by design (works on any host, including hosts with no GPU). For a long session, copy <code>ai-kit/runtime/llamafile.exe</code> and the model <code>.gguf</code> to your local SSD and run from there β exFAT on USB is slower than local disk for the initial load (though once loaded into RAM, generation speed is identical). </details><details> <summary><b>"APE is running on WIN32 inside WSL"</b></summary> <br> You're trying to run llamafile or zipalign directly inside WSL. Prefix with <code>sh</code>: <code>sh ./runtime/llamafile -m models/...</code>. The binaries are polyglot shell scripts; the <code>sh</code> prefix bypasses WSL's APE interception. </details><details> <summary><b>Browser opens but chat UI is empty / spinning forever</b></summary> <br> Model is still loading from USB. Wait 30-60 more seconds and refresh. Or open <code>D:\ai-kit\llamafile-e4b.log</code> to see live progress (look for <code>server is listening on http://127.0.0.1:8765</code>). </details><details> <summary><b>I want to use this from a different host. Can I just copy <code>ai-kit/</code> to my Desktop?</b></summary> <br> Yes β and you should, for any session longer than a few minutes. Local SSD loads ~3-4Γ faster than USB. Just keep the directory structure: <code>runtime/</code> next to <code>models/</code>, with the launcher one level above. Or invoke <code>runtime/llamafile -m models/<file>.gguf --server --host 127.0.0.1 --port 8765 -c 8192</code> directly. </details><details> <summary><b>start-vault: "vault/recovery.tar.age not found"</b></summary> <br> You haven't created a vault yet β the launcher's job is to decrypt an existing blob, not to bootstrap one. The launcher prints the create-vault one-liner and exits 0 (intentional β this is guidance, not an error). To create one, see <a href="docs/vault-guide.md">docs/vault-guide.md</a> Quick Start, or run from the USB: <pre><code>cd vault/ tar c recovery/ | ../ai-kit/age/linux/age -p > recovery.tar.age</code></pre> (Use <code>mac</code> or <code>win</code> in the path on those OSes; <code>tar.exe</code> + redirect-to-Set-Content on Windows PowerShell.) </details><details> <summary><b>start-vault: "Decryption failed. Check your passphrase."</b></summary> <br> Either the passphrase was wrong, or the vault was encrypted to an identity file that's not on the decrypt host (Ceremony 2/3 in <a href="docs/vault-guide.md">docs/vault-guide.md</a>). Check: did you encrypt with <code>age -p</code> (passphrase) or <code>age -r</code> (recipient)? The default ceremony is <code>-p</code> β if you used <code>-r</code>, you need <code>age -d -i <identity-file></code> instead of the launcher's pure-passphrase prompt. The tmpdir is auto-cleaned on decrypt failure (no partial extracts). </details><details> <summary><b>Image gen: "sd-cli not found" / launcher exits immediately</b></summary> <br> The <code>ai-kit/sd-img/</code> directory is empty or missing β the image-gen binaries are fetched by the build script, not committed to the repo. Run <code>build-usb.{sh,ps1}</code> against your USB first. If you already ran the build script and the directory is still empty, check the build log for download errors (the FLUX.2 klein transformer is ~2.43 GB, the Qwen3-4B text encoder at <code>ai-kit/models/</code> is ~2.33 GB, and the VAE is ~238 MB β any of them may time out on slow connections; re-run the build script to resume). </details><details> <summary><b>Image gen: out of memory mid-generation</b></summary> <br> sd.cpp loads the FLUX.2 klein transformer (~2.43 GB), the Qwen3-4B text encoder (~2.33 GB), and the VAE (~238 MB) all together, plus working buffers β you need approximately 8-10 GB of free working RAM. Stop the AI core launcher (<code>start.bat / .sh / .command</code>) and close any browser tabs streaming from it, then retry. If the OOM persists, the host has less than 10 GB total RAM available β image generation will struggle on that machine. The AI core (Gemma 4 E4B or Qwen3 4B) and the image generator cannot run simultaneously on an 8 GB host. </details><details> <summary><b>Image gen: takes forever / hangs at 0% / first image extremely slow</b></summary> <br> Expected on lower-powered hardware. sd.cpp loads fresh per invocation (no persistent server process), and FLUX.2 klein generates a 1024Γ1024 image in ~1-3 minutes on a modern laptop CPU. On Pi-class hardware (Raspberry Pi 5 or similar ARM boards) expect 5-10 minutes for the first image β subsequent images in the same session take the same time since the process exits after each generation. If the progress bar is moving (even slowly), it is working. Only kill the process if it shows no progress after 10+ minutes. </details>[!TIP]
Long session? Copyai-kit/runtime/llamafile(.exe)and the model GGUF to your host's local SSD. Generation speed is identical once loaded β the USB only matters for the initial model load, and exFAT is 3-4Γ slower than ext4/NTFS/APFS for that.
<br>[!WARNING]
Windows Defender false-positive on first run. Some Windows hosts will quarantinellamafile.exeand/orredbean.com.exewith a generic verdict (e.g.Trojan:Win32/ClickFix.CCJ!MTB). This is a known false-positive against Cosmopolitan APE polyglots β the same single binary boots on Windows, Linux, and macOS, which trips heuristics tuned for normal single-OS PE32 executables. Both binaries are unmodified upstream releases (Mozilla-Ocho llamafile 0.10.1, redbean 3.0.0 from redbean.dev) with their own published SHA-256 checksums. To proceed: open Windows Security β Protection history β Allow on the quarantined item, or add the USB drive letter to Defender exclusions. Seedashboard/README.txton the USB for the full walkthrough.
π‘ Β§09 Β· Auxiliary Equipment
Fifteen tools shipped from v0.4 through v0.12 β see docs/auxiliary-roadmap.md for the full living menu.
Now in the kit:
| Status | Item | Default size | What it adds |
|---|---|---|---|
| β | Whisperfile (small.en) | ~497 MB | Audio β text via OpenAI Whisper. APE polyglot, port 8766. |
| β | Tesseract OCR (tesseract.js) | ~15 MB | Image β text. Pure browser, no server, runs from file://. |
| β | Kiwix + Wikipedia | ~395 MB (Simple EN) | Offline Wikipedia. Drop bigger ZIMs into zim/; kiwix-serve picks them up. Port 8767. |
| β | DevDocs offline | varies | Programming reference. Manual setup β see docs/setup-devdocs.md. |
| β | Organic Maps + .pbf | ~700 KB (Monaco) | OSM regional data; sideload to phone. See maps/README.md to swap region. |
| β | redbean (3.0.0) | ~5.5 MB | Single-file APE webserver, port 8768. Local platform layer for tools that need real HTTP. Cosmopolitan family, same as llamafile. |
| β | DOOM (Dwasm + shareware WAD) | ~7.4 MB | Browser DOOM via emscripten/PrBoom+, served by redbean. Plug-and-play; no host install. |
| β | USB-resident DOOM saves (v0.6) | tiny | Saves persist to ai-kit/redbean/saves.db via redbean's /save /load /list. Pre-fetched on boot, hooks FS.trackingDelegate.onCloseFile to capture in-game saves. Travel across hosts. |
| β | TTS via Sherpa-ONNX + Supertonic (v0.7) | ~210 MB | Text β audio. POST text/plain to :8768/tts, get audio/wav back. Sherpa-ONNX v1.13.1 native C++ runtime per OS (no Python on host) + Supertonic int8 (~99M params, ranks high on CPU TTS β RTF 0.3 on a literal e-reader). Pivoted away from Kokoro to avoid a Python-on-host dependency. Full research: docs/research/tts-rag-2026-05-08.md. |
| β | EmbeddingGemma RAG + chat tab + journal (v0.8) | shared with EmbedGemma + ~3.5 MB Hollama vendor | Vector index over workspace/<name>/docs/ via redbean's /rag/ingest + /rag/query endpoints. Pure-Lua cosine over embedding BLOB columns (FTS5 isn't available in redbean's bundled lsqlite3 β see architecture doc for the pivot rationale). Vendored Hollama 0.35.4 chat tab at chat/index.html with five _extras-*.js adapters (#filename autocomplete, workspace dropdown, server-backed session persistence via /chat/save, three-server provider seed, daily-journal sidebar via /journal/append). Embedding side-arm start-embed.* boots EmbeddingGemma-300M on port 8769 on demand. Full design: docs/research/rag-architecture-2026-05-09.md. |
| β | age-encrypted recovery vault (v0.9) | ~25 MB | Per-OS age v1.3.1 binaries at ai-kit/age/{linux,mac,win}/. vault/recovery.tar.age is the encrypted blob (user-created). Default ceremony: tar c recovery/ | age -p > vault/recovery.tar.age. Launcher start-vault.* decrypts to host tmpdir (preserves POSIX 0600 on SSH keys). Air-gapped from redbean β no HTTP route. BSD-3, native Go binary, no APE polyglot, no Defender FP. Full guide: docs/vault-guide.md. |
| β | offline image generation (v0.10) | ~5.0 GB | Per-OS sd-cli (stable-diffusion.cpp master-596-90e87bc) at ai-kit/sd-img/{linux,mac,win}/ + FLUX.2 klein 4B Q4_K_M transformer GGUF (~2.43 GB) + small-decoder VAE safetensors (~238 MB) at ai-kit/sd-img/models/ + Qwen3-4B Q4_K_M text encoder (~2.33 GB, doubles as AI core option) at ai-kit/models/. All Apache-2.0. Launcher start-img.* reads a prompt, writes a 1024Γ1024 PNG to the USB root. Standalone β no redbean coupling, no port. ~1-3 min per image on CPU; needs ~8-10 GB working RAM. Full guide: docs/img-guide.md. |
| β | KeePassXC password manager (v0.11) | ~250 MB cross-OS | Per-OS KeePassXC 2.7.12 GUI binaries at ai-kit/keepassxc/{linux,mac,win}/. Launcher start-passwords.* opens the GUI directly against passwords/vault.kdbx on the USB. GPL-2.0+. Bundles: balanced + full. Full guide: docs/keepassxc-guide.md. |
| β | ffmpeg media toolkit (v0.11) | ~210 MB cross-OS | Static ffmpeg n7.1 per-OS at ai-kit/ffmpeg/{linux,mac,win}/. Launcher start-ffmpeg.* primes PATH so ffmpeg resolves for the session. GPL-3.0+. Pairs with whisperfile for live captions and sd-img for animated outputs. Bundle: full-only. Full guide: docs/ffmpeg-guide.md. |
| β | Portable dev tools (v0.12) | ~280 MB cross-OS | ripgrep 14.1.1, fzf 0.61.3, jq 1.7.1, 7-Zip 2409, VSCodium 1.99.3 at ai-kit/devtools/{linux,mac,win}/. Launcher start-devtools.* primes PATH so all five tools resolve for the session. Mixed licenses: MIT (ripgrep, fzf, jq, VSCodium) + LGPL-2.1 (7-Zip). PortableGit deferred to v0.12.1. Bundle: balanced+full. Guide: docs/devtools-guide.md. |
| β | Mozilla CA bundle (v0.12) | ~226 KB | cacert.pem from curl.se/ca/cacert.pem at ai-kit/certs/. Always-on (no bundle toggle). Enables curl --cacert ./cacert.pem and REQUESTS_CA_BUNDLE on air-gapped USB. Refreshed on each build run. MPL-2.0. |
| β | Field manual corpus (v0.12) | ~240 KB committed | Six public-domain topic files at field-manual/: FM 21-76 survival, FEMA CERT first aid, edible plants, FCC Part 97 amateur radio, EPA well water, pre-1928 knots. Browse via field-manual/index.html (file://, mobile-friendly). All US Government works (PD per 17 U.S.C. Β§ 105) + pre-1928 US Navy sources. 50 MB ceiling for user additions. Bundle: balanced+full. |
Still pending (ranked by payoff):
| β | Item | Size | What it adds |
|---|---|---|---|
| π₯ | Project Gutenberg subset + Calibre Portable | ~3 GB | Offline classic books. |
| π₯ | Bigger Wikipedia ZIMs | up to ~50 GB | wikipedia_en_top_nopic (~6 GB) is the sweet spot. |
PRs welcome.
<br>π Β§10 Β· Field Notes
A few hard-earned lessons from building this:
The first 30 seconds matter. If a non-technical person plugs in the stick and doesn't see something obviously clickable within the first File Explorer view, they bounce. Putting
start.batandindex.htmlat the USB root, not buried in a folder, is the single biggest UX call this kit makes.
Boring beats clever. We tried the elegant single-file
.llamafilebundle. It failed on Windows. The "boring" pattern (runtime + bare weights + launcher script) works on every host we've tested. Boring won.
Offline doesn't mean obsolete. A multi-billion-parameter open-weight model from 2026, run on a $200 laptop, would have been a research demo five years ago. Today it fits on a USB stick and answers most "I have a question" queries faster than typing the question into Google.
<br>Plan for the cache miss. USB is 3-4Γ slower than local SSD for model loading. Build the launcher to be polite about that ("Loading the E4B model from USB. About 15-30 seconds.") instead of leaving the user staring at a black window.
π€ Β§11 Β· Enlist
This is a recipe project β the most useful contributions are:
- New tools for the pending menu (Whisperfile, Tesseract, Kiwix, etc.) β add a fetch step to
build-usb.{sh,ps1}and a card toindex.html. - Cross-platform launcher fixes β anything that improves first-run reliability on a fresh host.
- Smaller, faster, or newer models β particularly anything β€4 GB that could revive the legacy single-file bundled path.
- Bug reports from real USB sticks on real hosts β especially weird BIOS / PE loader / antivirus interactions.
Open an issue or PR. For substantial changes, please open an issue first to discuss.
<br>πͺ¦ Β§12 Β· Acknowledgments
Built on the shoulders of giants who decided portability mattered:
- Mozilla-Ocho/llamafile β the polyglot APE runtime that makes everything possible.
- Cosmopolitan Libc by Justine Tunney β the underlying "build once, run anywhere" magic.
- unsloth β Gemma 4 GGUF quantizations (Apache 2.0).
- Google β Gemma 4 weights and EmbeddingGemma (Apache 2.0, plus Gemma terms).
- Kiwix & Ventoy β the offline-knowledge and bootable-USB stack we crib from.
π Β§13 Β· Legal
This recipe (everything in this repo) is licensed under the Apache License, Version 2.0 β see LICENSE.
Embedded artifacts retain their upstream licenses:
| Artifact | License |
|---|---|
| llamafile runtime | Apache 2.0 (Mozilla-Ocho/llamafile) |
| Gemma 4 weights | Apache 2.0 + Google's Gemma terms |
| EmbeddingGemma | Apache 2.0 + Google's Gemma terms |
| unsloth quantizations | Apache 2.0 |
| redbean | ISC (jart/cosmopolitan) |
Dwasm bundle (doom/index.{js,data,wasm} + our wrapper) |
GPL-2.0 (GMH-Code/Dwasm) |
| Shareware DOOM1.WAD | Freely redistributable per id Software (Episode 1 only) |
[!IMPORTANT]
License boundary βdoom/is GPL-2.0. The kit as a whole is Apache-2.0
but thedoom/subdirectory inherits GPL-2.0 from upstream Dwasm. Seedoom/NOTICE.mdfor the full attribution and the
rules for modifying or redistributing files in that directory.
<br>[!WARNING]
The Gemma terms add a Prohibited Use Policy on top of Apache 2.0. Read it before redistributing the weights commercially.
<div align="center">
_ ._ _ , _ ._
(_ ' ( ` )_ .__)
( ( ( ) `) ) _)
(__ (_ (_ . _) _) ,__)
`~~`\ ' . /`~~`
; ;
/ \
_________________________/_ __ \_____________
β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²
ββββββββββββββββββββββββββββββββββ
β DECLASSIFIED Β· 2026Β·05Β·09 β
β β USE WITH CAUTION β β
ββββββββββββββββββββββββββββββββββ
β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²β±β²
stay weird. stay prepared. stay offline.
v0.10.0 Β· "the easel" Β· 2026Β·05Β·10