yaakdoc

Introduction

yaakdoc turns a Yaak workspace into a fast, themable and LLM-friendly API documentation site.

Yaak allows you to test and document your application's API: you can define requests, folders, environments, auth, and descriptions. yaakdoc turns that workspace into a documentation site, so you don't have to write the API reference twice.

npx yaakdoc

Run it next to a Yaak export and your docs are served at http://localhost:4000. npx yaakdoc build writes a static site that you can host anywhere.

What you get

  • Rendered on the server. Every page is prerendered HTML, so the docs are readable without JavaScript. Only small interactive islands (tabs, copy buttons, the color mode toggle, search) hydrate in the browser.
  • Zero config. The export is detected automatically, and the title, description and environment come from Yaak. Add a yaakdoc.config.json only when you want to change something.
  • Code examples. Every request gets examples in cURL, JavaScript, Python, Go, grpcurl and wscat. The generators are pluggable.
  • Environments without leaking secrets. Readers can switch between environments, and variables defined with secure(...) or with secret-looking names are never inlined. See Environments and variables.
  • Custom pages. Go beyond API docs. Write guides, a quickstart or a changelog in Markdown, next to the generated reference. See Custom pages.
  • LLM-friendly. llms.txt, llms-full.txt, and a Markdown version of every page, plus "Copy page" and "Open in ChatGPT/Claude" actions. See LLM-friendly output.
  • Themable. The default theme, Kiseki, uses Tailwind CSS v4 and shadcn/ui. You can restyle it with config, eject it, or write your own theme using yaakdoc's unstyled React components.
  • Fits into your app. Serve the docs at /docs of a Next.js, Vite or Node app.

Three ways to run it

Best forNeeds
Yaak pluginBuilding the docs straight from YaakYaak (+ Node.js if you want to use a different theme)
CLILocal previews, CI, and static hostingNode.js ≥ 20.19
IntegrationsServing the docs from an app you already haveNext.js, a Vite-based framework or a Node server

How it works

yaak.json ─▶ normalize ─▶ prepareDocument ─▶ PreparedDocument ─┬─▶ theme (React SSR) ─▶ HTML
                           + Markdown, Shiki,                   ├─▶ Markdown, llms.txt
                           + code examples                      └─▶ islands ─▶ client JS
  1. Load. yaakdoc reads the config (optional), the Yaak export and the theme.
  2. Normalize. The export, from any Yaak schema version, becomes one documentation model: a tree of folders and requests with inherited headers and auth, path and query parameters, and environments.
  3. Prepare. Variables are resolved (with secrets redacted), descriptions are rendered from Markdown, code is highlighted with Shiki, and code examples and example responses are generated.
  4. Render. The theme renders every page on the server with React. The islands hydrate on the client.
  5. Write. build writes the HTML, the Markdown files, llms.txt, a search index, the sitemap and, if enabled, a sanitized export for Run in Yaak.

Not affiliated with Yaak

yaakdoc is an independent project. It isn't affiliated with, endorsed by or sponsored by Yaak or Mountain Loop.

On this page