docsgen turns a directory of annotated C++ headers into a browsable MDX API reference and an llms.txt bundle for AI agents. It parses your real source with the codex C++ frontend — namespaces, templates, member access, enumerators, /// doc comments — and emits one MDX page per public symbol, cross-linked and catalogued.
It ships as a single binary. The core generator calls nothing home. It runs the same on every machine. It is free to use.
How docsgen is built
Section titled “How docsgen is built”docsgen is a terminal stage on top of the codex parsing pipeline:
- Parsing — handled by codex. Your headers are collected, preprocessed, parsed, and analysed into a symbol database with full qualified names, access, comments, and relationships.
- Generation — handled by docsgen. It walks the public API surface, parses each symbol’s doc comment, resolves cross-links, and renders deterministic MDX (plus optional catalog pages and
llms.txt).
You don’t write templates or scripts. You write good /// comments in your headers, and docsgen publishes them.
Core capabilities
Section titled “Core capabilities”Same headers ⇒ same MDX. Always. Symbols are sorted by qualified name and rendered by a pure pass over the codex symbol database, so diffs are meaningful and docs are reproducible across machines and CI.
docsgen documents what your users can actually call. Private and protected
members, forward declarations, and excluded namespaces (detail, impl)
never reach the output.
Reads the tags you already know — @brief, @param, @tparam,
@return, @note, @see — and the first sentence of a plain comment
becomes the summary. No new comment dialect to learn.
Type references in signatures, parameters, and @see entries resolve to
links between generated pages. Your reference reads like a connected graph,
not a flat dump.
Alongside per-symbol pages, docsgen emits catalogs — namespaces, types, functions, files — so readers (and search) have an index into the surface.
Point llm: at Anthropic, OpenAI, or a local Ollama model and docsgen adds
an :::note[AI Summary] block per symbol. Cached and deterministic on
warm runs (temperature 0). Off by default — the core generator stays local.
Emit a single plain-text bundle of your whole API for AI agents. Mark
symbols @llms-only to ship them to agents without cluttering the rendered
site.
Output is MDX with frontmatter, cross-link URLs, and :::note directives —
drop it straight into an Astro docs site (this one is built that way).
Free to use
Section titled “Free to use”docsgen has no tiers, no licence keys, and no paywalled features. Install it, point it at your headers, and publish. See Installation to get started.