SafeSuite #01 · Open Source · Apache 2.0

Safe4wiki converts local folders and private or public Git repositories into deep, citation-verified engineering wikis with auto-healed Mermaid diagrams, Hybrid RAG code chat, offline PDF/HTML exports, and 1-click subdomain publishing — running 100% on your own machine.

Apache 2.0 LicenseZero Telemetry · 127.0.0.1Ollama · GGUF · APIs · CLIsNode.js >= 18

Flagship #01 in SafeSuite · Built by Safe4AI

Safe4wiki is the first open-source tool in the SafeSuite ecosystem — created by Safe4AI so engineering teams can generate deep, audit-friendly codebase documentation without uploading proprietary code to hosted clouds.

Quick Start · Node.js >= 18

Running locally in under two minutes.

Starts at http://localhost:4317 with two complete, bundled real-world wikis ready to browse immediately.

git clone https://github.com/Safe4ai-com/Safe4wiki.git
cd Safe4wiki
npm install
npm run build
npm start
2 bundled example wikis included: microsoft/vscode (60 pages, claude-haiku-4-5) · microsoft/playwright (49 pages, deepseek-v4.1-flash-free + claude-haiku-4-5)README Quick Start ↗

Inside the Workspace

Built for engineers who read code, not marketing blurbs.

Explore the four core surfaces inside Safe4wiki running on 127.0.0.1:4317.

http://127.0.0.1:4317
Zero Telemetry · Local Mode

3-Level Wiki Tree

01. Architecture Overview
02. Scheduler & Workers
2.1 GPU Slot Locking
2.2 Auto-Pause & Resume
03. Hybrid RAG Engine
04. Design Docs & Glossary
Generated with local-model · commit dcfac26
Relevant source files (6)99.8% verified citations

Scheduler & Rate-Limit Checkpointing

Every generated section links directly to verified repository files in a single deduplicated drawer per page. If a provider hits rate limits or a 5-hour CLI cap, completed pages stay safe in .state.json so generation resumes cleanly on the exact next page.

server/scheduler.js:42-118server/worker.js:15-89

What's Inside

Six capabilities built for real repositories.

Every detail — from GPU scheduling to citation deduplication — is engineered to turn raw source trees into living documentation you completely own.

WIKI ENGINE

Deep multi-page wikis that survive rate limits.

Auto-scales from small libraries to 60+ page monorepos with 3-level nested trees, automatic Glossary & Design Docs, pause/resume & auto-pause on provider limits, smart parallel scheduling, and transactional incremental builds.

HYBRID RAG

Code chat with line-level proof.

Combines BM25 lexical search over wiki sections and source chunks with optional background semantic embeddings (zero startup delay), clickable file & line-range citation chips, a Split-View Code Inspector, and file attachments.

MERMAID

Auto-healed architecture diagrams.

A line-anchored fenced-code parser and automatic Mermaid sanitizer + retry renderer handle tricky labels (parentheses, colons, inline fences) across sequence, flow, class, and state diagrams with pan/zoom lightbox and instant SVG caching.

MODEL HUB

Bring local weights, APIs, or Agent CLIs.

Configure independent models for wiki generation and chat across Ollama, LM Studio, llama.cpp/vLLM, direct .gguf files, OpenAI/Anthropic-compatible APIs, and coding CLIs with 1-click Terminal Auth and live model discovery.

PRIVACY

Localhost-only with zero telemetry.

Runs strictly on 127.0.0.1:4317. Supports local folders and private Git via SSH or HTTPS tokens stored with chmod 600 and masked from the browser, skips Git LFS smudges, isolates CLI auth, and tags every page with model provenance.

OWN THE OUTPUT

Offline handbooks & 1-click subdomain publish.

Export single-file offline HTML (*-docs.html) that works via file://, print-quality PDFs with vector diagrams and numbered TOCs, static ZIP bundles, or publish straight to SSH/rsync, GitHub Pages, Cloudflare Pages, or Netlify.

Unified Model Hub

Run 100% offline, via APIs, or with your coding CLIs.

Assign separate models for deep wiki generation and fast RAG chat, and switch anytime without losing progress.

Zero Cloud Egress

Local (100% Offline)

OllamaLM Studiollama.cpp server / vLLMDirect .gguf (node-llama-cpp)
  • Live installed model list discovery
  • Automatic thinking-token stripping
  • Configurable num_ctx & 15-min local timeout
  • Single serialized GPU slot to avoid VRAM thrashing
Bring Your Own Key

Online APIs

OpenAI-compatible (OpenAI, OpenRouter, Groq, DeepSeek, Z.AI/GLM, self-hosted)Anthropic-compatible endpoints
  • Parallel generation across multiple repositories
  • Configurable concurrency per provider
  • Masked chmod 600 credential storage
  • Supports env:VAR_NAME secret references
Use Existing Subscriptions

Agent CLIs

Claude Code (claude)Codex (codex)OpenCode (opencode)DeepSeek Harness (dsh)ZCode (zcode)Gemini CLI (gemini) & Custom CLIs
  • 1-click Terminal Auth inside the UI
  • Per-CLI reasoning effort (low → max/ultra)
  • Live model discovery (opencode models & Codex cache)
  • Auto-pause & resume across 5-hour quota resets

Head-to-Head Benchmark

Safe4wiki (Local) vs DeepWiki.com (Hosted)

Tested on the exact same public repository and commit — genes8/open-repo-wiki @ dcfac26 (101 files) — auditing every generated page on disk and live in headless Chrome.

MetricSafe4wiki (Local)DeepWiki.com (Hosted)
Pages generated34 (auto-scaled, incl. Glossary & 6 Design Docs)33
Documentation depth36,540 words · 71 structured tables~300–450 words & 0 tables on core pages
Mermaid diagrams (live Chrome render)38 / 38 rendered (100%, 0 errors)3 broken diagrams across 4 inspected pages
Repository file coverage96 / 101 files (95.0%)~90%
Verified source citations661 / 662 (99.8%), deduplicated into 1 drawer/pageMixed plain-text citations & repeated Sources: blocks
Rendering / formatting defects0Unrendered raw LaTeX (Node.js >= 18) + broken diagrams
Privacy & model choice100% local — Ollama, GGUF, BYO API, or Agent CLIsCloud-hosted only
Offline export & self-hostingSingle-file HTML, Print PDF, Static ZIP, 1-click PublishWeb viewer only

Why Safe4wiki renders 100% of Mermaid diagrams: Safe4wiki ships with a line-anchored fenced-code parser plus an automatic Mermaid sanitizer and retry renderer so tricky labels (parentheses, colons, inline code fences) render cleanly as crisp SVGs.

Local Architecture

Every stage runs on your own machine.

Isolated workers, transactional staging under ~/.repowiki, and real-time SSE streaming to your browser.

01

React + Vite UI

wiki · diagrams · rag · publish

02

Local Server

127.0.0.1:4317 · sse

03

Parallel Scheduler

cloud parallel · 1 gpu slot

04

Isolated Worker

scan · plan · gen · verify

05

~/.repowiki Store

staged · .state.json

06

Hybrid RAG

bm25 · embeddings

07

Export & Publish

pdf · html · zip · ssh

127.0.0.1:4317 · zero telemetry · transactional staging

From Individual Teams to Enterprise Rollouts

Use Safe4wiki free under Apache 2.0 — or partner with Safe4AI at scale.

Open Source · Self-Hosted

Safe4wiki (Apache 2.0)

Ideal for developers, architects, and teams onboarding onto local or private repositories from their own workstation.

  • Run free on macOS, Linux, or Windows (Node.js >= 18)
  • Connect Ollama, LM Studio, GGUF, APIs, or Agent CLIs
  • Hybrid RAG chat + Split-View Code Inspector
  • Offline HTML, Print PDF, Static ZIP & 1-click publish
Clone on GitHub ↗
Safe4AI Engineering · Custom Scope

Enterprise AI & SafeSuite Deployment

When you need organization-wide automation, governance, or full-company knowledge systems built by our engineering team inside your perimeter.

  • CI/CD automated wiki regeneration across private org repos
  • Enterprise SSO / RBAC governance & audit logging
  • Air-gapped VPC hosting, custom SafeSuite extensions & GPU sizing
  • Combine codebases with regulated docs via Private·ai

Frequently Asked Questions

Safe4wiki is open-source under the Apache License, Version 2.0 (Copyright 2026 Safe4AI). You can clone, run locally, audit, modify, and self-host generated wikis freely. As noted in the repository NOTICE file, the wiki generation engine in server/engine/ incorporates code from open-repo-wiki under the MIT License.

No. The Safe4wiki server binds strictly to localhost (127.0.0.1:4317) with zero telemetry and stores state locally under ~/.repowiki. Your source code only leaves your machine if you explicitly configure an online API or cloud-backed CLI; running with Ollama, LM Studio, llama.cpp, or a local .gguf file keeps everything 100% offline.

Safe4wiki persists the accepted plan and every completed page incrementally to disk. You can pause manually anytime or let Safe4wiki auto-pause when a provider hits rate or 5-hour CLI limits, then resume from the exact next page — even after switching to another model or backend.

Safe4wiki is the flagship open-source developer tool (#01) in SafeSuite by Safe4AI, focused on turning local folders and Git repositories into verifiable engineering wikis. Private·ai is Safe4AI’s compliance-first enterprise RAG assistant for company-wide regulated documents with persistent Postgres audit trails, three-layer PII guards, and OpenTelemetry tracing.

SafeSuite #01 · Apache 2.0

Try Safe4wiki on your own repository today.

Star the repository, explore the bundled VS Code and Playwright demos locally, or reach out to bring SafeSuite and private AI into your organization.