Quick Start
This walks you from a folder of headers to a generated MDX reference in about a minute. It assumes docsgen is on your PATH — see Installation if not.
1. Point docsgen at your headers
Section titled “1. Point docsgen at your headers”The minimal invocation takes an input directory and an output directory:
docsgen --input ./include --output ./docsdocsgen collects every .hpp / .h under ./include (recursively), parses them with the codex C++ frontend, and writes one MDX file per public symbol into ./docs, plus catalog pages. The final line reports how many files were written:
wrote 27 MDX files to './docs'Short flags work too: docsgen -i ./include -o ./docs. Run docsgen --help for the full list, or see the CLI Reference.
2. Look at what came out
Section titled “2. Look at what came out”Each public class, struct, enum, function, alias, concept, operator, and macro becomes its own page. A class page carries the symbol’s doc comment, its constructors, methods, operators, and a See Also section — with types in signatures already linked to their own pages:
---title: "Socket"description: "Async, non-blocking socket with an RAII lifetime."---
`Socket` wraps a single OS socket file descriptor ...
## Public Methods
### connect
```cpp[[nodiscard]] AsyncHandle connect(const Endpoint& endpoint, IoCallback onConnect);```
**Returns:** [AsyncHandle](/net_asynchandle) - Handle that can be passed to `cancel()`.docsgen also emits catalog pages — catalog_types, catalog_functions, catalog_namespaces, catalog_files — that index the whole surface. See What It Generates and Catalog Pages.
3. Add a config file (recommended)
Section titled “3. Add a config file (recommended)”Re-typing flags gets old. Drop a config.docsgen.yaml next to your project and docsgen discovers it automatically (from the current directory, then the input directory):
name: netdescription: Async non-blocking socket libraryversion: "1.0.0"license: MIT
input: "./include" # relative to this config fileoutput: "./docs"
extensions: - .hpp - .h
# Hide implementation namespaces from the output.exclude_namespaces: - detail - internalNow generation is just:
docsgenCLI flags still win over config values when both are present. The full set of keys is in the Config Schema.
4. (Optional) Emit llms.txt
Section titled “4. (Optional) Emit llms.txt”Add --llms-txt (or set llms_txt.enabled: true) to also emit a single plain-text bundle of your API for AI agents:
docsgen --llms-txtSee llms.txt for what goes in the bundle and the @llms-only escape hatch.
Next steps
Section titled “Next steps”- Your First Docs — annotate a header and watch the page change.
- How It Works — the pipeline from headers to MDX.
- Doc Comments & Tags — every tag docsgen understands.