An open-source, local-first compiler for a source-traceable Markdown knowledge wiki.
It turns notes and optional documents, images, PDFs, audio, and video into reviewable Wiki pages while keeping the original source immutable. Khoj provides retrieval and chat, Obsidian provides the graph and backlinks, and Git provides history and review.
- The compiler, web console, schemas, prompts, deployment helpers, and tests.
- Public fixtures only. No private notes, uploaded documents, raw sources, credentials, caches, or runtime databases are required or included.
- A separate local knowledge repository configured through
config/wiki.local.toml.
The local overlay is ignored by Git. Start from config/wiki.toml, then override paths and provider settings locally without committing them.
local source -> compiler -> immutable Raw + Wiki pages -> Git review
|
Khoj retrieval
|
Obsidian graph / chat UI
The compiler uses an OpenAI-compatible LLM only for structured extraction, cleanup, and Wiki compilation. It does not store API keys. OCR, ASR, FFmpeg, Khoj, and MLflow are optional integrations and fail explicitly when unavailable.
Requirements: Python 3.11+, Git, and PowerShell on Windows. Linux and macOS users can invoke the Python module directly; the PowerShell wrapper is optional.
git clone https://github.com/<your-account>/personal-llm-wiki.git
cd personal-llm-wiki
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e .
Copy-Item .env.example .env
wiki doctor
wiki web --no-openThe console listens on http://127.0.0.1:8765 by default. Keep .env, config/wiki.local.toml, your knowledge repository, and all uploaded source files outside Git.
Copy the template overlay and edit only local paths:
Copy-Item config/wiki.local.toml.example config/wiki.local.tomlIf the example does not exist in your checkout, create config/wiki.local.toml with:
[paths]
knowledge_repo = "./knowledge-repo"
[obsidian]
vault_path = "./knowledge-repo"For this project, knowledge_repo must be a separate Git repository. Do not place personal notes, raw files, proposals, .obsidian/, or generated logs under the public source repository.
| Command | Purpose |
|---|---|
wiki doctor |
Check core runtime and optional integrations. |
wiki web |
Start the localhost visual console. |
wiki ingest FILE --no-pr |
Import one source locally without creating a PR. |
wiki ingest DIRECTORY --no-pr |
Import a batch of supported sources. |
wiki lint |
Validate schema, provenance, links, and index freshness. |
wiki generate-index |
Rebuild the generated Wiki index. |
wiki sync --reindex-only |
Re-index Markdown pages in Khoj without changing local source files. |
wiki eval compiler |
Run the offline compiler regression suite. |
wiki eval retrieval |
Evaluate configured Khoj retrieval. |
Configure credentials through environment variables only:
WIKI_LLM_BASE_URL,WIKI_LLM_API_KEY,WIKI_LLM_MODELKHOJ_BASE_URL,KHOJ_API_KEYWIKI_OCR_API_KEY,WIKI_ASR_API_KEYMLFLOW_TRACKING_URI
Never commit .env, API keys, provider responses, model caches, or local databases. .env.example contains names only.
python -m unittest discover -s tests -p "test_*.py"
git diff --checkThe test suite uses temporary repositories and public fixtures. It does not read or modify a user's private knowledge repository.
Use docs/SEARCH.md for the recommended search and query workflow. In short: import and lint trusted sources first, use wiki search for retrieval-only results, and use wiki query when you need a cited answer. Treat an ungrounded answer as a lead rather than a fact.
Add the license you want to use before publishing the repository. Until then, all rights are reserved.