Publish living docs and catch stale sections
Guides in your repository can show the screens of your accepted runs instead of pasted screenshots, so their pictures never go stale. When a screen changes after the text was written, Kaloko tells you which section to check. The pages you are reading now are made this way: kaloko.app/p/sinfin/kaloko/docs.
Set up the folder
npx kaloko init --docs=full
It creates docs/ with the four Diátaxis folders, each with a template:
| Folder | The reader wants |
|---|---|
tutorials/ | to learn by doing, start to finish |
how-to/ | to get one task done |
reference/ | to look a fact up |
explanation/ | to understand why |
index.md is the start page. Front matter is optional: title (else the first heading) and order (the position in the sidebar). Link pages with relative .md links.
Write a page
Pictures are step references, as in the changelog:
1. Choose **Sign in** in the top bar.

A translation sits next to its original: pay.cs.md beside pay.md, with the languages listed in the config (docs.languages: [en, cs], originals first). Pictures follow the language of the text.
One action per list item with its picture right under it also makes the page a walkthrough: readers choose Walk through it step by step and see one step at a time, and can tick I tried it.
Publish
npx kaloko docs publish # the docs of latest
npx kaloko docs publish --version 2.4.0 # the docs of a release (Business)
Readers get a version selector, language and screen switches and search, and every picture opens its step on the canvas. kaloko release publishes the docs folder for its version on its own unless you pass --no-docs. Who reads the docs follows the same rules as the changelog: see Publish a changelog with pictures.
Catch stale sections
When you publish, Kaloko remembers the screen behind every reference. When a later accepted run shows a different screen, the section says "The screen changed in 2.4 — check the text." to the people who write the docs (Business).
npx kaloko docs check # against the published docs; needs a token
npx kaloko docs check --offline # only the local files
Errors: broken references, steps the scenario files do not have, references without an accepted picture and stale sections. Warnings: missing or outdated translations and changelog items that people will see but that have no picture. The command exits with 1 on errors; --strict also on warnings, which suits CI.
For each stale section, open the step, compare it with the text and rewrite what no longer fits; the note clears at the next kaloko docs publish. If the text still fits, kaloko docs publish --reviewed clears the notes without a change. Use it only after you have read them.
To get the docs out as files for another site, see Export docs and the changelog.