Kingdom.md
Kingdom.md is a small, self-hosted web app that turns a folder of Markdown files into a clean website you can actually read — and one you own outright, because it's free, open-source, and runs on your own machine.
You're using it right now. This page isn't a landing page I hand-built in HTML — it's just a Markdown file sitting in a folder, and Kingdom.md is rendering it. What you're looking at is what the app does.
That's most of the pitch, honestly. Point it at a directory of .md files and it serves them as a tidy, navigable site. No database to feed, no account to make, no cloud to rent.
Why I built it
Two itches, mostly.
The first: I wanted authentication for my documentation. Most of the lightweight ways to publish Markdown assume the whole world should see it — drop the files on a static host and hand out the link. But a lot of what I write isn't for everyone. I wanted a viewer where I decide who gets to open which folder — the way you'd lock a filing cabinet rather than leave it out on the curb.
The second is stranger, and I care about it more: I wanted to de-black-box AI agents. When an AI agent keeps notes — what it remembers, what it's figured out, the plans it's working through — that material usually lives buried in a database or a vendor's dashboard, if it's visible at all. But there's no law that says an agent's memory has to be opaque. If it writes that memory as plain Markdown, then a viewer like this one lets me simply read its mind — in prose, the same way I'd read anyone's notes. Less magic, more transparency.
Neither of those is finished yet (more on that at the end). But they're why the project has the shape it does.
What a "kingdom" is
A kingdom is just a folder of Markdown that Kingdom.md serves. You tell it where the folder lives; it builds a navigable tree from what's inside and renders each file when you open it.
That's the whole mental model. A kingdom could be your personal notes, a project's docs, a wiki, a campaign journal — anything that's already a pile of .md files. Today it's read-only, login-less, and fast, because the calmest version of a thing is usually the one that does less.
Ideas for how it could be used
A few of the shapes I keep imagining for it:
- A personal knowledge base you host yourself, instead of trusting a note-taking startup to still exist next year.
- Team or project documentation, served straight from the repository it lives beside.
- A tabletop campaign vault — worlds, NPCs, session logs — read like a real in-world archive.
- A window into an AI agent's memory, so the notes it keeps about its own work are something you can sit down and actually read.
Same little engine underneath each one. The content is what makes it whatever it is.
Where it's headed
The two itches that started this are also where it's going. The way I think about it, Markdown wants to be three things here:
- Readable — which is what it already does: turn plain files into a comfortable, paper-like read. This is the foundation, and it works today.
- Governable — the access-control idea: multiple people, per-kingdom roles, so a folder can be shared with exactly the right readers and no one else. (The "auth for documentation" itch, grown up.)
- Agent-usable — Markdown as the substrate an AI agent keeps its memory in, with Kingdom.md as the plain-language window into it. (The "de-black-box agents" itch, grown up.)
Nothing grand — just the same small tool, pointed at a couple of problems I actually have.
Where it actually is today
Honesty, since you're standing inside the current version: it's minimal. Read-only. No logins, no roles, no agents — none of the governable or agent-usable parts above are built yet. What works is the part that matters most first: it takes a folder of Markdown and makes it a genuinely nice thing to read.
And that part is doing its job right now. This page you're reading is the proof — it's free, open-source, self-hosted, and it's just Markdown, rendered by the very thing it describes.