{"slug": "offline-survival-assistant-local-llm-and-kiwix-runs-from-a-usb-stick", "title": "Offline survival assistant – local LLM and Kiwix, runs from a USB stick", "summary": "A GitHub project called ia-da-sobrevivencia, published by developer sdalberto, packages a fully offline survival assistant that runs on Windows, Linux and macOS from a USB drive, combining local language models via llama.cpp or Ollama with Kiwix offline libraries such as medical Wikipedia, Where There Is No Doctor, wikiHow and iFixit. The kit's Python script uses only the standard library with no pip install, searches the bundled guides with BM25 and the .zim files, then has the local model answer with cited [1] [2] sources, and falls back to showing the most relevant passages when no model is loaded. A preparer script offers three model sizes — leve at 1 GB for 4 GB RAM, padrao at 2 GB for 8 GB RAM (recommended) and forte at 4.7 GB for 16 GB RAM — plus Kiwix library tiers from minimo (~3–5 GB) to completo (100+ GB, full Wikipedia), with large files excluded from git via .gitignore.", "body_md": "**A survival assistant that works 100% without internet** — on Windows, Linux and macOS.\n\n[🇧🇷 Português](https://github.com/sdalberto/ia-da-sobrevivencia/blob/main/README.md) · 🇺🇸 English · [🇪🇸 Español](https://github.com/sdalberto/ia-da-sobrevivencia/blob/main/README.es.md)\n\nIf the internet, power and services go down, this kit keeps working on a laptop or USB drive:\n\n- 📚 **Practical guides with cited sources** (EN, PT, ES): water, fire, shelter, food, gardening and livestock, foraging/fishing/hunting,**first aid and medicine** , hygiene and homemade soap,**alcohol** (fermentation, distillation, antiseptic and fuel), solar power, radio and navigation, tools and knots, mental health and community, and checklists for 72 hours and**1 year** .\n- 🤖 **Local AI** that answers any question in natural language,**citing its sources** — it runs on your own computer (llama.cpp or Ollama); nothing goes to the internet.\n- 🌐 **Kiwix offline libraries** : medical Wikipedia, post-disaster manuals,*Where There Is No Doctor* , wikiHow, iFixit and more — the AI searches them too.\n- 📱 **Web interface** in your browser, shareable over the local network (other phones connect via Wi-Fi, even with no internet).\n- 🔍 **No-AI mode** : even without a model, guide search works on any PC with Python.\n\n**Disclaimer:** educational content. It does not replace doctors, firefighters or emergency services. Health guidance follows public guidelines (WHO, Red Cross/IFRC, AHA, CDC, Hesperian…) cited in each section.\n\n⚠️ \n\n```\n Question ──► search kit guides (BM25) ──────┐\n          └─► search Kiwix (.zim files) ──────┼─► local language model ──► answer with [1] [2] sources\n                                              └─► (no model? shows the most relevant passages)\n```\n\n| Part | What it is | Where | \n|---|---|---|\n| `sobrevivencia.py` +`app/` | The AI (Python standard library only, no `pip install` ) | repository | \n| `knowledge/pt | en | es/` | \n| `knowledge/extra/` | **Your**`.md` /`.txt` documents (searched and cited by the AI) | repository | \n| `runtime/llama.cpp/` | Engine that runs the AI model | downloaded by the preparer | \n| `models/*.gguf` | Language model (1–5 GB) | downloaded by the preparer | \n| `runtime/kiwix-tools/` +`zim/*.zim` | Kiwix server and libraries | downloaded by the preparer | \n| `runtime/python/` | Portable Python (for PCs without Python) | downloaded by the preparer | \n\nLarge files are **not committed to git** (see `.gitignore`): the repository stays small and everyone builds their own kit with the preparer.\n\n```\ngit clone https://github.com/sdalberto/ia-da-sobrevivencia.git\ncd ia-da-sobrevivencia\n```\n\n| System | How to run | \n|---|---|\n| **Windows** | double-click `preparar-kit.bat` | \n| **macOS** | double-click `preparar-kit.command` (first time: right-click › Open) | \n| **Linux** | `./preparar-kit.sh --lang en` | \n\nThe preparer asks for:\n\n1. **AI model:**`leve` (light, 1 GB, 4 GB RAM),`padrao` (default, 2 GB, 8 GB RAM — recommended),`forte` (strong, 4.7 GB, 16 GB RAM).\n2. **Kiwix libraries:**`minimo` (~3–5 GB),`recomendado` (~25–40 GB) or`completo` (100+ GB, full Wikipedia).\n3. **Systems:** this computer only, or**Windows + Linux + macOS** (universal USB kit).\n4. **Portable Python:** so the kit opens on computers without Python.\n\nNon-interactive:\n\n```\npython sobrevivencia.py --lang en prepare --model padrao --zims recomendado --os all --python\n```\n\n| System | How to open | \n|---|---|\n| **Windows** | `iniciar.bat --lang en` (or double-click`iniciar.bat` and press**EN** ) | \n| **macOS** | `iniciar.command` | \n| **Linux** | `./iniciar.sh --lang en` | \n\nYour browser opens [http://127.0.0.1:8090](http://127.0.0.1:8090). Switch language anytime with the PT/EN/ES buttons. To make English the default, create `config/settings.local.json` with `{ \"language\": \"en\" }`.\n\nCopy **the whole folder** to a USB drive or external disk formatted as **exFAT** (works on all three systems and supports files over 4 GB).\n\n```\npython sobrevivencia.py --lang en chat                   # terminal chat\npython sobrevivencia.py --lang en ask \"how do I make oral rehydration solution?\"\npython sobrevivencia.py --lang en search burn\npython sobrevivencia.py status\npython sobrevivencia.py start --host 0.0.0.0             # share on the local network\npython sobrevivencia.py prepare --search survival        # find more Kiwix libraries\n```\n\n**Ollama:** if you use [Ollama](https://ollama.com), run `ollama pull qwen2.5:3b` — it is detected automatically. Any local OpenAI-compatible server (LM Studio, llamafile, KoboldCpp, Jan) also works: set `llm_url`.\n\n**Kiwix Desktop:** [Kiwix Desktop](https://kiwix.org) can open the `.zim` files in `zim/`. To let the AI use its *Local Kiwix Server*, set `{ \"kiwix_url\": \"http://127.0.0.1:<port>\" }` in `config/settings.local.json`. The Windows Kiwix Desktop package (~150 MB) exceeds GitHub's 100 MB per-file limit — publish it as a **Release asset** instead of committing it.\n\nDrop `.md` or `.txt` files in `knowledge/extra/` (family recipes, local maps, contacts, equipment manuals). They are indexed and cited by the AI.\n\n- **Minimum (search only):** any PC with Python 3.8+.\n- **With AI:** 4 GB RAM (light model), 8 GB recommended; x86-64 CPU with AVX2 or Apple Silicon/ARM64. No GPU needed.\n- **Disk:** 3 GB (minimal kit) to 100+ GB (full kit).\n\n```\npython -m unittest discover -s tests\n```\n\nCode: [MIT](https://github.com/sdalberto/ia-da-sobrevivencia/blob/main/LICENSE). Guides in `knowledge/`: [CC BY-SA 4.0](https://github.com/sdalberto/ia-da-sobrevivencia/blob/main/LICENSE-CONTENT.md). Models, Kiwix, llama.cpp and ZIM files downloaded by the preparer have their own licenses. The default model (Qwen2.5 3B) uses the *Qwen Research License*; for commercial use choose `leve` or `forte` (Apache 2.0).", "url": "https://wpnews.pro/news/offline-survival-assistant-local-llm-and-kiwix-runs-from-a-usb-stick", "canonical_source": "https://github.com/sdalberto/ia-da-sobrevivencia/blob/main/README.en.md", "published_at": "2026-11-05 15:25:36+00:00", "updated_at": "2026-11-05 16:51:28.034112+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "artificial-intelligence", "ai-products"], "entities": ["sdalberto", "ia-da-sobrevivencia", "llama.cpp", "Ollama", "Kiwix", "GitHub", "Where There Is No Doctor", "wikiHow"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/offline-survival-assistant-local-llm-and-kiwix-runs-from-a-usb-stick", "markdown": "https://wpnews.pro/news/offline-survival-assistant-local-llm-and-kiwix-runs-from-a-usb-stick.md", "text": "https://wpnews.pro/news/offline-survival-assistant-local-llm-and-kiwix-runs-from-a-usb-stick.txt", "jsonld": "https://wpnews.pro/news/offline-survival-assistant-local-llm-and-kiwix-runs-from-a-usb-stick.jsonld"}}