Installation
starting a wiki in a project
wiki-builder is one Python package, and its only command is wiki.[1] What each command does is
described on Commands, and checking a wiki on every push on
Continuous integration. An agent can take a project through every step
below from the Installation prompt.
Requirements
It needs Python 3.11 or newer, and one dependency pinned exactly, the markdown parser mistune.[1]
The wrapper script below also needs uv, whose uvx runs a release straight from its git address; a
project without uv installs a release with pip and runs wiki directly.[2]
Wrapper
A project commits one script that runs a pinned release, and passes --root so the tool finds the project
wherever the script is called from.[3]
#!/bin/sh
# scripts/dev-wiki.sh
set -eu
WIKI_VERSION=TAG
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
exec uvx --from "git+https://github.com/timothymarois/wiki-builder@$WIKI_VERSION" \
wiki "$@" --root "$ROOT"
The tool accepts --root after the command, which is what lets the script add it to whatever it is
handed.[3] TAG names a published wiki-builder release.[?]
First wiki
The tool reads a wiki from docs/wiki unless told otherwise.[4] That folder needs a wiki.toml
with a site name and at least one section, or the tool stops and says so.[5]
[site]
name = "Notes"
[[section]]
title = "Start"
pages = ["index", "goals"]
Every wiki needs a goals.md page to collect the intents onto, and every page needs a title and an
intent.[6] Every page a section lists must exist, so the example above also needs an
index.md.[7] A page about the wiki itself says goals = false.[8]
+++
title = "Goals"
status = "approved"
goals = false
intent = """
This page collects what each part of the project is for.
"""
+++
What each part is for.
wiki sync writes the skill for the project's agents and records the release, then wiki build records
each page's date.[9] The tool writes no ignore file, so a project adds docs/wiki/site/ to its own
.gitignore to keep the rendered site out of version control, as wiki-builder does.[10]
./scripts/dev-wiki.sh sync
./scripts/dev-wiki.sh build
./scripts/dev-wiki.sh check
Updates
An update is a new tag in the script, then wiki sync to rewrite the skill and record the release.[9]
wiki check fails until that release is recorded, and names every page a new rule breaks.[11]