Skip to content

Config Schema (.yaml)

docsgen reads a single YAML file named config.docsgen.yaml. It is optional — everything can be passed on the CLI — but it’s the recommended way to pin a project’s settings.

  • With -c/--config <path>, docsgen loads exactly that file.
  • Otherwise it discovers config.docsgen.yaml, checking the current working directory first, then the input directory.
  • Paths in the config are relative to the config file’s directory, not your shell’s CWD.
  • CLI flags win over config values when both are set.
# --- Project metadata (used in llms.txt header) ---
name: net
description: Async non-blocking socket library
version: "1.0.0"
license: MIT
authors:
- CodeXX Team
# --- Paths (relative to this file) ---
input: "." # input directory of C++ headers
output: "./docs" # output directory for MDX
# --- File selection ---
extensions: # which file extensions to collect
- .hpp
- .h
include: # regex patterns to include
- ".*\\.hpp$"
exclude: # regex patterns to exclude
# --- Output shaping ---
exclude_namespaces: # drop these namespaces from output + llms.txt
- detail
- internal
hide_nested: false # hide non-top-level entities from the sidebar
api_base_url: / # URL prefix for cross-links
# --- External links (project metadata) ---
links:
homepage: https://example.com
github:
code: https://github.com/acme/net
issues: https://github.com/acme/net/issues
gitlab:
code: https://gitlab.com/acme/net
issues: https://gitlab.com/acme/net/issues
# --- llms.txt ---
llms_txt:
enabled: false
output: "./public" # for Astro projects (served at /llms.txt)
# --- Optional AI summaries ---
llm:
provider: ollama # anthropic | openai | ollama (default: openai)
model: gemma2:27b
api_key: "..." # for hosted providers
base_url: "http://localhost:11434"
system_prompt_append: "Prefer terse, factual summaries."
system_prompt_override: "..." # replace the built-in prompt entirely
max_concurrent: 2
max_tokens: 2048
KeyTypeMeaning
namestringProject name; the # title in llms.txt.
descriptionstringTagline; the > blockquote in llms.txt.
version, license, authorsstring / listMetadata line in the llms.txt header.
inputpathHeader directory (relative to config).
outputpathMDX output directory (relative to config).
extensionslistFile extensions to collect (default .hpp, .h).
include / excludelist of regexPath filters applied during collection.
exclude_namespaceslistNamespaces dropped from output and llms.txt.
hide_nestedboolHide type-nested symbols from the sidebar.
api_base_urlstringPrefix for generated cross-links (trailing / stripped).
links.*stringsProject links (homepage, GitHub/GitLab code + issues).
llms_txt.enabledboolEmit llms.txt.
llms_txt.outputpathDirectory for llms.txt (default: same as output).
llm.providerenumanthropic, ollama, or OpenAI (default/fallback).
llm.modelstringModel ID.
llm.api_keystringCredential for hosted providers.
llm.base_urlstringOverride provider host/port.
llm.system_prompt_appendstringText appended to the built-in system prompt.
llm.system_prompt_overridestringReplaces the built-in system prompt.
llm.max_concurrentintParallel provider calls.
llm.max_tokensintMax tokens per summary.

Only the keys you set take effect; everything else falls back to defaults. A malformed config emits a warning and docsgen proceeds as if it were absent. See LLM Summaries for the llm: block in depth.