knowflow turns raw note directories into:
- private wiki pages in
wiki/ - public post content in
content/posts - graph, audit, and cache artifacts in
data/
- Python 3.11+
- an OpenAI-compatible LLM endpoint
- optional: Hugo if you want to render the generated
content/layer
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtcp .env.example .env
python3 knowflow.py build
python3 knowflow.py lint
python3 knowflow.py query compilerThe default .env.example points to examples/minimal-kb, so the repository can be tried immediately after clone.
If your knowledge-base repository lives next to this repository, set:
KNOWLEDGE_BASE_DIR=../my-kbknowflow reads .env from the repository root.
Most users only need:
KNOWLEDGE_BASE_DIRLLM_BASE_URLMODEL_NAMELLM_API_KEY
Optional root overrides:
RAW_DIRCONTENT_DIRWIKI_DIRDATA_DIR
Everything else is derived automatically from those roots.
knowflow recursively scans every index.md under RAW_DIR.
Example:
RAW_DIR/
└── articles/
└── systems/
└── knowledge-compilers/
└── index.md
Generated outputs usually land in:
KNOWLEDGE_BASE_DIR/
├── _raw/
├── content/posts/
├── data/knowflow/
└── wiki/
├── concepts/
└── sources/
More details: docs/raw-format.md
python3 knowflow.py build
python3 knowflow.py build private
python3 knowflow.py build public
python3 knowflow.py build audit
python3 knowflow.py lint
python3 knowflow.py query <keyword>
python3 knowflow.py researchAvailable build stages:
privatepubliccleanindexsplittopicssourcescompileauditgraphlog
build runs the full default pipeline and, if needed, immediately ingests newly generated research drafts.
knowflow sends raw note content to the configured LLM endpoint during cleaning, topicing, splitting, compiling, and research-draft generation.
Before using it on sensitive notes, verify:
- where
LLM_BASE_URLpoints - whether
RAW_DESENSITIZE=trueis enough for your workflow - whether you should use a self-hosted model
The current desensitization is best-effort only.
python3 -m unittest discover -s testsMIT. See LICENSE.