All checks were successful
continuous-integration/drone/push Build is passing
1 line
55 KiB
JSON
1 line
55 KiB
JSON
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"docforge/","title":"Docforge","text":""},{"location":"docforge/#docforge","title":"docforge","text":""},{"location":"docforge/#docforge--doc-forge","title":"doc-forge","text":"<p><code>doc-forge</code> is a renderer-agnostic Python documentation compiler designed for speed, flexibility, and beautiful output. It decouples the introspection of your code from the rendering process, allowing you to generate documentation for various platforms (starting with MkDocs) from a single internal models.</p>"},{"location":"docforge/#docforge--available-commands","title":"Available Commands","text":"<ul> <li>build: Build documentation (MkDocs site or MCP resources).</li> <li>serve: Serve documentation (MkDocs or MCP).</li> <li>tree: Visualize the introspected project structure.</li> </ul>"},{"location":"docforge/#docforge--installation","title":"Installation","text":"<p>Install using <code>pip</code> with the optional <code>mkdocs</code> dependencies for a complete setup:</p> <pre><code>pip install doc-forge\n</code></pre>"},{"location":"docforge/#docforge--quick-start","title":"Quick Start","text":"<ol> <li> <p>Build Documentation: Introspect your package and generate documentation in one step: ```bash # Build MkDocs site doc-forge build --mkdocs --module my_package --site-name \"My Docs\"</p> </li> <li> <p>Define Navigation: Create a <code>docforge.nav.yml</code> to organize your documentation: <code>yaml home: my_package/index.md groups: Core API: - my_package/core/*.md Utilities: - my_package/utils.md</code></p> </li> <li> <p>Preview: ```bash # Serve MkDocs site doc-forge serve --mkdocs</p> </li> </ol>"},{"location":"docforge/#docforge--build-mcp-resources","title":"Build MCP resources","text":"<p>doc-forge build --mcp --module my_package ```</p>"},{"location":"docforge/#docforge--serve-mcp-documentation","title":"Serve MCP documentation","text":"<p>doc-forge serve --mcp ```</p>"},{"location":"docforge/#docforge--project-structure","title":"Project Structure","text":"<ul> <li><code>docforge.loaders</code>: Introspects source code using static analysis (<code>griffe</code>).</li> <li><code>docforge.models</code>: The internal representation of your project, modules, and objects.</li> <li><code>docforge.renderers</code>: Converters that turn the models into physical files.</li> <li><code>docforge.nav</code>: Managers for logical-to-physical path mapping and navigation.</li> </ul>"},{"location":"docforge/#docforge.GriffeLoader","title":"GriffeLoader","text":"<pre><code>GriffeLoader()\n</code></pre> <p>Loads Python modules and extracts documentation using the Griffe introspection engine.</p> <p>Initialize the GriffeLoader.</p>"},{"location":"docforge/#docforge.GriffeLoader.load_module","title":"load_module","text":"<pre><code>load_module(path: str) -> Module\n</code></pre> <p>Load a single module and convert its introspection data into the docforge models.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>str</code> <p>The dotted path of the module to load.</p> required <p>Returns:</p> Type Description <code>Module</code> <p>A Module instance.</p>"},{"location":"docforge/#docforge.GriffeLoader.load_project","title":"load_project","text":"<pre><code>load_project(module_paths: List[str], project_name: Optional[str] = None, skip_import_errors: bool = None) -> Project\n</code></pre> <p>Load multiple modules and combine them into a single Project models.</p> <p>Parameters:</p> Name Type Description Default <code>module_paths</code> <code>List[str]</code> <p>A list of dotted paths to the modules to load.</p> required <code>project_name</code> <code>Optional[str]</code> <p>Optional name for the project. Defaults to the first module name.</p> <code>None</code> <code>skip_import_errors</code> <code>bool</code> <p>If True, modules that fail to import will be skipped.</p> <code>None</code> <p>Returns:</p> Type Description <code>Project</code> <p>A Project instance containing the loaded modules.</p>"},{"location":"docforge/#docforge.MCPRenderer","title":"MCPRenderer","text":"<p>Renderer that emits MCP-native JSON resources from docforge models.</p>"},{"location":"docforge/#docforge.MCPRenderer.generate_sources","title":"generate_sources","text":"<pre><code>generate_sources(project: Project, out_dir: Path) -> None\n</code></pre> <p>Generate MCP-compatible JSON resources and navigation for the project.</p> <p>Parameters:</p> Name Type Description Default <code>project</code> <code>Project</code> <p>The project model to render.</p> required <code>out_dir</code> <code>Path</code> <p>Target directory for the generated JSON files.</p> required"},{"location":"docforge/#docforge.MkDocsRenderer","title":"MkDocsRenderer","text":"<p>Renderer that generates Markdown source files formatted for the MkDocs 'mkdocstrings' plugin.</p>"},{"location":"docforge/#docforge.MkDocsRenderer.generate_sources","title":"generate_sources","text":"<pre><code>generate_sources(project: Project, out_dir: Path) -> None\n</code></pre> <p>Produce a set of Markdown files in the output directory based on the provided Project models.</p> <p>Parameters:</p> Name Type Description Default <code>project</code> <code>Project</code> <p>The project models to render.</p> required <code>out_dir</code> <code>Path</code> <p>Target directory for documentation files.</p> required"},{"location":"docforge/#docforge.discover_module_paths","title":"discover_module_paths","text":"<pre><code>discover_module_paths(module_name: str, project_root: Path | None = None) -> List[str]\n</code></pre> <p>Discover all Python modules under a package via filesystem traversal.</p> <p>Rules: - Directory with init.py is treated as a package. - Any .py file is treated as a module. - All paths are converted to dotted module paths.</p> <p>Parameters:</p> Name Type Description Default <code>module_name</code> <code>str</code> <p>The name of the package to discover.</p> required <code>project_root</code> <code>Path | None</code> <p>The root directory of the project. Defaults to current working directory.</p> <code>None</code> <p>Returns:</p> Type Description <code>List[str]</code> <p>A sorted list of dotted module paths.</p>"},{"location":"docforge/cli/","title":"Cli","text":""},{"location":"docforge/cli/#docforge.cli","title":"docforge.cli","text":""},{"location":"docforge/cli/#docforge.cli--cli-layer","title":"CLI Layer","text":"<p>The <code>docforge.cli</code> package provides the command-line interface for interacting with doc-forge.</p>"},{"location":"docforge/cli/#docforge.cli--available-commands","title":"Available Commands","text":"<ul> <li>build: Build documentation (MkDocs site or MCP resources).</li> <li>serve: Serve documentation (MkDocs or MCP).</li> <li>tree: Visualize the introspected project structure.</li> </ul>"},{"location":"docforge/cli/commands/","title":"Commands","text":""},{"location":"docforge/cli/commands/#docforge.cli.commands","title":"docforge.cli.commands","text":""},{"location":"docforge/cli/commands/#docforge.cli.commands.build","title":"build","text":"<pre><code>build(mcp: bool, mkdocs: bool, module: Optional[str], project_name: Optional[str], site_name: Optional[str], docs_dir: Path, nav_file: Path, template: Optional[Path], mkdocs_yml: Path, out_dir: Path) -> None\n</code></pre> <p>Build documentation (MkDocs site or MCP resources).</p> <p>This command orchestrates the full build process: 1. Introspects the code (Griffe) 2. Renders sources (MkDocs Markdown or MCP JSON) 3. (MkDocs only) Generates config and runs the final site build.</p> <p>Parameters:</p> Name Type Description Default <code>mcp</code> <code>bool</code> <p>Use the MCP documentation builder.</p> required <code>mkdocs</code> <code>bool</code> <p>Use the MkDocs documentation builder.</p> required <code>module</code> <code>Optional[str]</code> <p>The dotted path of the module to document.</p> required <code>project_name</code> <code>Optional[str]</code> <p>Optional override for the project name.</p> required <code>site_name</code> <code>Optional[str]</code> <p>(MkDocs) The site display name. Defaults to module name.</p> required <code>docs_dir</code> <code>Path</code> <p>(MkDocs) Target directory for Markdown sources.</p> required <code>nav_file</code> <code>Path</code> <p>(MkDocs) Path to the docforge.nav.yml specification.</p> required <code>template</code> <code>Optional[Path]</code> <p>(MkDocs) Optional custom mkdocs.yml template.</p> required <code>mkdocs_yml</code> <code>Path</code> <p>(MkDocs) Target path for the generated mkdocs.yml.</p> required <code>out_dir</code> <code>Path</code> <p>(MCP) Target directory for MCP JSON resources.</p> required"},{"location":"docforge/cli/commands/#docforge.cli.commands.serve","title":"serve","text":"<pre><code>serve(mcp: bool, mkdocs: bool, mkdocs_yml: Path, out_dir: Path) -> None\n</code></pre> <p>Serve documentation (MkDocs or MCP).</p> <p>Parameters:</p> Name Type Description Default <code>mcp</code> <code>bool</code> <p>Serve MCP resources via an MCP server.</p> required <code>mkdocs</code> <code>bool</code> <p>Serve the MkDocs site using the built-in development server.</p> required <code>mkdocs_yml</code> <code>Path</code> <p>(MkDocs) Path to the mkdocs.yml configuration.</p> required <code>out_dir</code> <code>Path</code> <p>(MCP) Path to the mcp_docs/ directory.</p> required"},{"location":"docforge/cli/commands/#docforge.cli.commands.tree","title":"tree","text":"<pre><code>tree(modules: Sequence[str], project_name: Optional[str]) -> None\n</code></pre> <p>Visualize the project structure in the terminal.</p> <p>Parameters:</p> Name Type Description Default <code>modules</code> <code>Sequence[str]</code> <p>List of module import paths to recursively introspect.</p> required <code>project_name</code> <code>Optional[str]</code> <p>Optional override for the project name shown at the root.</p> required"},{"location":"docforge/cli/main/","title":"Main","text":""},{"location":"docforge/cli/main/#docforge.cli.main","title":"docforge.cli.main","text":"<p>Main entry point for the doc-forge CLI. This module delegates all command execution to docforge.cli.commands.</p>"},{"location":"docforge/cli/main/#docforge.cli.main.main","title":"main","text":"<pre><code>main() -> None\n</code></pre> <p>CLI Entry point. Boots the click application.</p>"},{"location":"docforge/cli/mcp_utils/","title":"Mcp Utils","text":""},{"location":"docforge/cli/mcp_utils/#docforge.cli.mcp_utils","title":"docforge.cli.mcp_utils","text":""},{"location":"docforge/cli/mcp_utils/#docforge.cli.mcp_utils.generate_resources","title":"generate_resources","text":"<pre><code>generate_resources(module: str, project_name: str | None, out_dir: Path) -> None\n</code></pre> <p>Generate MCP-compatible documentation resources.</p> <p>Parameters:</p> Name Type Description Default <code>module</code> <code>str</code> <p>The dotted path of the primary module to document.</p> required <code>project_name</code> <code>str | None</code> <p>Optional override for the project name.</p> required <code>out_dir</code> <code>Path</code> <p>Directory where the MCP JSON resources and nav will be written.</p> required"},{"location":"docforge/cli/mcp_utils/#docforge.cli.mcp_utils.serve","title":"serve","text":"<pre><code>serve(mcp_root: Path) -> None\n</code></pre> <p>Serve MCP documentation from a pre-built bundle.</p> <p>Parameters:</p> Name Type Description Default <code>mcp_root</code> <code>Path</code> <p>Path to the directory containing index.json, nav.json, and modules/.</p> required"},{"location":"docforge/cli/mkdocs_utils/","title":"Mkdocs Utils","text":""},{"location":"docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils","title":"docforge.cli.mkdocs_utils","text":""},{"location":"docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.build","title":"build","text":"<pre><code>build(mkdocs_yml: Path) -> None\n</code></pre> <p>Build the documentation site using MkDocs.</p> <p>Parameters:</p> Name Type Description Default <code>mkdocs_yml</code> <code>Path</code> <p>Path to the mkdocs.yml configuration file.</p> required"},{"location":"docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.generate_config","title":"generate_config","text":"<pre><code>generate_config(docs_dir: Path, nav_file: Path, template: Path | None, out: Path, site_name: str) -> None\n</code></pre> <p>Generate an mkdocs.yml configuration file.</p> <p>Parameters:</p> Name Type Description Default <code>docs_dir</code> <code>Path</code> <p>Path to the directory containing documentation Markdown files.</p> required <code>nav_file</code> <code>Path</code> <p>Path to the docforge.nav.yml specification.</p> required <code>template</code> <code>Path | None</code> <p>Optional path to an mkdocs.yml template (overrides built-in).</p> required <code>out</code> <code>Path</code> <p>Path where the final mkdocs.yml will be written.</p> required <code>site_name</code> <code>str</code> <p>The display name for the documentation site.</p> required"},{"location":"docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.generate_sources","title":"generate_sources","text":"<pre><code>generate_sources(module: str, project_name: str | None, docs_dir: Path) -> None\n</code></pre> <p>Generate Markdown source files for the specified module.</p> <p>Parameters:</p> Name Type Description Default <code>module</code> <code>str</code> <p>The dotted path of the primary module to document.</p> required <code>project_name</code> <code>str | None</code> <p>Optional override for the project name.</p> required <code>docs_dir</code> <code>Path</code> <p>Directory where the generated Markdown files will be written.</p> required"},{"location":"docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.serve","title":"serve","text":"<pre><code>serve(mkdocs_yml: Path) -> None\n</code></pre> <p>Serve the documentation site with live-reload using MkDocs.</p> <p>Parameters:</p> Name Type Description Default <code>mkdocs_yml</code> <code>Path</code> <p>Path to the mkdocs.yml configuration file.</p> required"},{"location":"docforge/loaders/","title":"Loaders","text":""},{"location":"docforge/loaders/#docforge.loaders","title":"docforge.loaders","text":""},{"location":"docforge/loaders/#docforge.loaders--loader-layer","title":"Loader Layer","text":"<p>The <code>docforge.loaders</code> package is responsible for discovering Python source files and extracting their documentation using static analysis.</p>"},{"location":"docforge/loaders/#docforge.loaders--core-features","title":"Core Features","text":"<ul> <li>Discovery: Automatically find all modules and packages in a project directory.</li> <li>Introspection: Uses <code>griffe</code> to parse docstrings, signatures, and hierarchical relationships without executing the code.</li> <li>Filtering: Automatically excludes private members (prefixed with <code>_</code>) to ensure clean public documentation.</li> </ul>"},{"location":"docforge/loaders/#docforge.loaders.GriffeLoader","title":"GriffeLoader","text":"<pre><code>GriffeLoader()\n</code></pre> <p>Loads Python modules and extracts documentation using the Griffe introspection engine.</p> <p>Initialize the GriffeLoader.</p>"},{"location":"docforge/loaders/#docforge.loaders.GriffeLoader.load_module","title":"load_module","text":"<pre><code>load_module(path: str) -> Module\n</code></pre> <p>Load a single module and convert its introspection data into the docforge models.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>str</code> <p>The dotted path of the module to load.</p> required <p>Returns:</p> Type Description <code>Module</code> <p>A Module instance.</p>"},{"location":"docforge/loaders/#docforge.loaders.GriffeLoader.load_project","title":"load_project","text":"<pre><code>load_project(module_paths: List[str], project_name: Optional[str] = None, skip_import_errors: bool = None) -> Project\n</code></pre> <p>Load multiple modules and combine them into a single Project models.</p> <p>Parameters:</p> Name Type Description Default <code>module_paths</code> <code>List[str]</code> <p>A list of dotted paths to the modules to load.</p> required <code>project_name</code> <code>Optional[str]</code> <p>Optional name for the project. Defaults to the first module name.</p> <code>None</code> <code>skip_import_errors</code> <code>bool</code> <p>If True, modules that fail to import will be skipped.</p> <code>None</code> <p>Returns:</p> Type Description <code>Project</code> <p>A Project instance containing the loaded modules.</p>"},{"location":"docforge/loaders/#docforge.loaders.discover_module_paths","title":"discover_module_paths","text":"<pre><code>discover_module_paths(module_name: str, project_root: Path | None = None) -> List[str]\n</code></pre> <p>Discover all Python modules under a package via filesystem traversal.</p> <p>Rules: - Directory with init.py is treated as a package. - Any .py file is treated as a module. - All paths are converted to dotted module paths.</p> <p>Parameters:</p> Name Type Description Default <code>module_name</code> <code>str</code> <p>The name of the package to discover.</p> required <code>project_root</code> <code>Path | None</code> <p>The root directory of the project. Defaults to current working directory.</p> <code>None</code> <p>Returns:</p> Type Description <code>List[str]</code> <p>A sorted list of dotted module paths.</p>"},{"location":"docforge/loaders/griffe_loader/","title":"Griffe Loader","text":""},{"location":"docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader","title":"docforge.loaders.griffe_loader","text":"<p>This module provides the GriffeLoader, which uses the 'griffe' library to introspect Python source code and populate the doc-forge Project models.</p>"},{"location":"docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader","title":"GriffeLoader","text":"<pre><code>GriffeLoader()\n</code></pre> <p>Loads Python modules and extracts documentation using the Griffe introspection engine.</p> <p>Initialize the GriffeLoader.</p>"},{"location":"docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader.load_module","title":"load_module","text":"<pre><code>load_module(path: str) -> Module\n</code></pre> <p>Load a single module and convert its introspection data into the docforge models.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>str</code> <p>The dotted path of the module to load.</p> required <p>Returns:</p> Type Description <code>Module</code> <p>A Module instance.</p>"},{"location":"docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader.load_project","title":"load_project","text":"<pre><code>load_project(module_paths: List[str], project_name: Optional[str] = None, skip_import_errors: bool = None) -> Project\n</code></pre> <p>Load multiple modules and combine them into a single Project models.</p> <p>Parameters:</p> Name Type Description Default <code>module_paths</code> <code>List[str]</code> <p>A list of dotted paths to the modules to load.</p> required <code>project_name</code> <code>Optional[str]</code> <p>Optional name for the project. Defaults to the first module name.</p> <code>None</code> <code>skip_import_errors</code> <code>bool</code> <p>If True, modules that fail to import will be skipped.</p> <code>None</code> <p>Returns:</p> Type Description <code>Project</code> <p>A Project instance containing the loaded modules.</p>"},{"location":"docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.discover_module_paths","title":"discover_module_paths","text":"<pre><code>discover_module_paths(module_name: str, project_root: Path | None = None) -> List[str]\n</code></pre> <p>Discover all Python modules under a package via filesystem traversal.</p> <p>Rules: - Directory with init.py is treated as a package. - Any .py file is treated as a module. - All paths are converted to dotted module paths.</p> <p>Parameters:</p> Name Type Description Default <code>module_name</code> <code>str</code> <p>The name of the package to discover.</p> required <code>project_root</code> <code>Path | None</code> <p>The root directory of the project. Defaults to current working directory.</p> <code>None</code> <p>Returns:</p> Type Description <code>List[str]</code> <p>A sorted list of dotted module paths.</p>"},{"location":"docforge/models/","title":"Models","text":""},{"location":"docforge/models/#docforge.models","title":"docforge.models","text":""},{"location":"docforge/models/#docforge.models--model-layer","title":"Model Layer","text":"<p>The <code>docforge.models</code> package provides the core data structures used to represent Python source code in a documentation-focused hierarchy.</p>"},{"location":"docforge/models/#docforge.models--key-components","title":"Key Components","text":"<ul> <li>Project: The root container for all documented modules.</li> <li>Module: Represents a Python module or package, containing members.</li> <li>DocObject: A recursive structure for classes, functions, and attributes.</li> </ul> <p>These classes are designed to be renderer-agnostic, allowing the same internal representation to be transformed into various output formats (currently MkDocs).</p>"},{"location":"docforge/models/#docforge.models.DocObject","title":"DocObject","text":"<pre><code>DocObject(name: str, kind: str, path: str, signature: Optional[str] = None, docstring: Optional[str] = None)\n</code></pre> <p>Represents a documented Python object (class, function, method, etc.).</p> <p>Attributes:</p> Name Type Description <code>name</code> <code>str</code> <p>Local name of the object.</p> <code>kind</code> <code>str</code> <p>Type of object (e.g., 'class', 'function', 'attribute').</p> <code>path</code> <code>str</code> <p>Full dotted import path to the object.</p> <code>signature</code> <code>Optional[str]</code> <p>Callable signature, if applicable.</p> <code>docstring</code> <code>Optional[str]</code> <p>Raw docstring content extracted from the source.</p> <code>members</code> <code>Dict[str, DocObject]</code> <p>Dictionary mapping member names to their DocObject representations.</p> <p>Initialize a new DocObject.</p> <p>Parameters:</p> Name Type Description Default <code>name</code> <code>str</code> <p>The local name of the object.</p> required <code>kind</code> <code>str</code> <p>The kind of object (e.g., 'class', 'function').</p> required <code>path</code> <code>str</code> <p>The full dotted path to the object.</p> required <code>signature</code> <code>Optional[str]</code> <p>The object's signature (for callable objects).</p> <code>None</code> <code>docstring</code> <code>Optional[str]</code> <p>The object's docstring, if any.</p> <code>None</code>"},{"location":"docforge/models/#docforge.models.DocObject.add_member","title":"add_member","text":"<pre><code>add_member(obj: DocObject) -> None\n</code></pre> <p>Add a child member to this object (e.g., a method to a class).</p> <p>Parameters:</p> Name Type Description Default <code>obj</code> <code>DocObject</code> <p>The child DocObject to add.</p> required"},{"location":"docforge/models/#docforge.models.DocObject.get_all_members","title":"get_all_members","text":"<pre><code>get_all_members() -> Iterable[DocObject]\n</code></pre> <p>Get all members of this object.</p> <p>Returns:</p> Type Description <code>Iterable[DocObject]</code> <p>An iterable of child DocObject instances.</p>"},{"location":"docforge/models/#docforge.models.DocObject.get_member","title":"get_member","text":"<pre><code>get_member(name: str) -> DocObject\n</code></pre> <p>Retrieve a child member by name.</p> <p>Parameters:</p> Name Type Description Default <code>name</code> <code>str</code> <p>The name of the member.</p> required <p>Returns:</p> Type Description <code>DocObject</code> <p>The requested DocObject.</p>"},{"location":"docforge/models/#docforge.models.Module","title":"Module","text":"<pre><code>Module(path: str, docstring: Optional[str] = None)\n</code></pre> <p>Represents a documented Python module or package.</p> <p>Attributes:</p> Name Type Description <code>path</code> <code>str</code> <p>Dotted import path of the module.</p> <code>docstring</code> <code>Optional[str]</code> <p>Module-level docstring content.</p> <code>members</code> <code>Dict[str, DocObject]</code> <p>Dictionary mapping object names to their DocObject representations.</p> <p>Initialize a new Module.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>str</code> <p>The dotted path of the module.</p> required <code>docstring</code> <code>Optional[str]</code> <p>The module's docstring, if any.</p> <code>None</code>"},{"location":"docforge/models/#docforge.models.Module.add_object","title":"add_object","text":"<pre><code>add_object(obj: DocObject) -> None\n</code></pre> <p>Add a documented object to the module.</p> <p>Parameters:</p> Name Type Description Default <code>obj</code> <code>DocObject</code> <p>The object to add.</p> required"},{"location":"docforge/models/#docforge.models.Module.get_all_objects","title":"get_all_objects","text":"<pre><code>get_all_objects() -> Iterable[DocObject]\n</code></pre> <p>Get all top-level objects in the module.</p> <p>Returns:</p> Type Description <code>Iterable[DocObject]</code> <p>An iterable of DocObject instances.</p>"},{"location":"docforge/models/#docforge.models.Module.get_object","title":"get_object","text":"<pre><code>get_object(name: str) -> DocObject\n</code></pre> <p>Retrieve a member object by name.</p> <p>Parameters:</p> Name Type Description Default <code>name</code> <code>str</code> <p>The name of the object.</p> required <p>Returns:</p> Type Description <code>DocObject</code> <p>The requested DocObject.</p>"},{"location":"docforge/models/#docforge.models.Project","title":"Project","text":"<pre><code>Project(name: str)\n</code></pre> <p>Represents a documentation project, serving as a container for modules.</p> <p>Attributes:</p> Name Type Description <code>name</code> <code>str</code> <p>Name of the project.</p> <code>modules</code> <code>Dict[str, Module]</code> <p>Dictionary mapping module paths to Module instances.</p> <p>Initialize a new Project.</p> <p>Parameters:</p> Name Type Description Default <code>name</code> <code>str</code> <p>The name of the project.</p> required"},{"location":"docforge/models/#docforge.models.Project.add_module","title":"add_module","text":"<pre><code>add_module(module: Module) -> None\n</code></pre> <p>Add a module to the project.</p> <p>Parameters:</p> Name Type Description Default <code>module</code> <code>Module</code> <p>The module to add.</p> required"},{"location":"docforge/models/#docforge.models.Project.get_all_modules","title":"get_all_modules","text":"<pre><code>get_all_modules() -> Iterable[Module]\n</code></pre> <p>Get all modules in the project.</p> <p>Returns:</p> Type Description <code>Iterable[Module]</code> <p>An iterable of Module objects.</p>"},{"location":"docforge/models/#docforge.models.Project.get_module","title":"get_module","text":"<pre><code>get_module(path: str) -> Module\n</code></pre> <p>Retrieve a module by its dotted path.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>str</code> <p>The dotted path of the module (e.g., 'pkg.mod').</p> required <p>Returns:</p> Type Description <code>Module</code> <p>The requested Module.</p>"},{"location":"docforge/models/#docforge.models.Project.get_module_list","title":"get_module_list","text":"<pre><code>get_module_list() -> list[str]\n</code></pre> <p>Get the list of all module dotted paths.</p> <p>Returns:</p> Type Description <code>list[str]</code> <p>A list of module paths.</p>"},{"location":"docforge/models/module/","title":"Module","text":""},{"location":"docforge/models/module/#docforge.models.module","title":"docforge.models.module","text":"<p>This module defines the Module class, which represents a Python module or package in the doc-forge documentation models. It acts as a container for top-level documented objects.</p>"},{"location":"docforge/models/module/#docforge.models.module.Module","title":"Module","text":"<pre><code>Module(path: str, docstring: Optional[str] = None)\n</code></pre> <p>Represents a documented Python module or package.</p> <p>Attributes:</p> Name Type Description <code>path</code> <code>str</code> <p>Dotted import path of the module.</p> <code>docstring</code> <code>Optional[str]</code> <p>Module-level docstring content.</p> <code>members</code> <code>Dict[str, DocObject]</code> <p>Dictionary mapping object names to their DocObject representations.</p> <p>Initialize a new Module.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>str</code> <p>The dotted path of the module.</p> required <code>docstring</code> <code>Optional[str]</code> <p>The module's docstring, if any.</p> <code>None</code>"},{"location":"docforge/models/module/#docforge.models.module.Module.add_object","title":"add_object","text":"<pre><code>add_object(obj: DocObject) -> None\n</code></pre> <p>Add a documented object to the module.</p> <p>Parameters:</p> Name Type Description Default <code>obj</code> <code>DocObject</code> <p>The object to add.</p> required"},{"location":"docforge/models/module/#docforge.models.module.Module.get_all_objects","title":"get_all_objects","text":"<pre><code>get_all_objects() -> Iterable[DocObject]\n</code></pre> <p>Get all top-level objects in the module.</p> <p>Returns:</p> Type Description <code>Iterable[DocObject]</code> <p>An iterable of DocObject instances.</p>"},{"location":"docforge/models/module/#docforge.models.module.Module.get_object","title":"get_object","text":"<pre><code>get_object(name: str) -> DocObject\n</code></pre> <p>Retrieve a member object by name.</p> <p>Parameters:</p> Name Type Description Default <code>name</code> <code>str</code> <p>The name of the object.</p> required <p>Returns:</p> Type Description <code>DocObject</code> <p>The requested DocObject.</p>"},{"location":"docforge/models/object/","title":"Object","text":""},{"location":"docforge/models/object/#docforge.models.object","title":"docforge.models.object","text":"<p>This module defines the DocObject class, the fundamental recursive unit of the doc-forge documentation models. A DocObject represents a single Python entity (class, function, method, or attribute) and its nested members.</p>"},{"location":"docforge/models/object/#docforge.models.object.DocObject","title":"DocObject","text":"<pre><code>DocObject(name: str, kind: str, path: str, signature: Optional[str] = None, docstring: Optional[str] = None)\n</code></pre> <p>Represents a documented Python object (class, function, method, etc.).</p> <p>Attributes:</p> Name Type Description <code>name</code> <code>str</code> <p>Local name of the object.</p> <code>kind</code> <code>str</code> <p>Type of object (e.g., 'class', 'function', 'attribute').</p> <code>path</code> <code>str</code> <p>Full dotted import path to the object.</p> <code>signature</code> <code>Optional[str]</code> <p>Callable signature, if applicable.</p> <code>docstring</code> <code>Optional[str]</code> <p>Raw docstring content extracted from the source.</p> <code>members</code> <code>Dict[str, DocObject]</code> <p>Dictionary mapping member names to their DocObject representations.</p> <p>Initialize a new DocObject.</p> <p>Parameters:</p> Name Type Description Default <code>name</code> <code>str</code> <p>The local name of the object.</p> required <code>kind</code> <code>str</code> <p>The kind of object (e.g., 'class', 'function').</p> required <code>path</code> <code>str</code> <p>The full dotted path to the object.</p> required <code>signature</code> <code>Optional[str]</code> <p>The object's signature (for callable objects).</p> <code>None</code> <code>docstring</code> <code>Optional[str]</code> <p>The object's docstring, if any.</p> <code>None</code>"},{"location":"docforge/models/object/#docforge.models.object.DocObject.add_member","title":"add_member","text":"<pre><code>add_member(obj: DocObject) -> None\n</code></pre> <p>Add a child member to this object (e.g., a method to a class).</p> <p>Parameters:</p> Name Type Description Default <code>obj</code> <code>DocObject</code> <p>The child DocObject to add.</p> required"},{"location":"docforge/models/object/#docforge.models.object.DocObject.get_all_members","title":"get_all_members","text":"<pre><code>get_all_members() -> Iterable[DocObject]\n</code></pre> <p>Get all members of this object.</p> <p>Returns:</p> Type Description <code>Iterable[DocObject]</code> <p>An iterable of child DocObject instances.</p>"},{"location":"docforge/models/object/#docforge.models.object.DocObject.get_member","title":"get_member","text":"<pre><code>get_member(name: str) -> DocObject\n</code></pre> <p>Retrieve a child member by name.</p> <p>Parameters:</p> Name Type Description Default <code>name</code> <code>str</code> <p>The name of the member.</p> required <p>Returns:</p> Type Description <code>DocObject</code> <p>The requested DocObject.</p>"},{"location":"docforge/models/project/","title":"Project","text":""},{"location":"docforge/models/project/#docforge.models.project","title":"docforge.models.project","text":"<p>This module defines the Project class, the top-level container for a documented project. It aggregates multiple Module instances into a single named entity.</p>"},{"location":"docforge/models/project/#docforge.models.project.Project","title":"Project","text":"<pre><code>Project(name: str)\n</code></pre> <p>Represents a documentation project, serving as a container for modules.</p> <p>Attributes:</p> Name Type Description <code>name</code> <code>str</code> <p>Name of the project.</p> <code>modules</code> <code>Dict[str, Module]</code> <p>Dictionary mapping module paths to Module instances.</p> <p>Initialize a new Project.</p> <p>Parameters:</p> Name Type Description Default <code>name</code> <code>str</code> <p>The name of the project.</p> required"},{"location":"docforge/models/project/#docforge.models.project.Project.add_module","title":"add_module","text":"<pre><code>add_module(module: Module) -> None\n</code></pre> <p>Add a module to the project.</p> <p>Parameters:</p> Name Type Description Default <code>module</code> <code>Module</code> <p>The module to add.</p> required"},{"location":"docforge/models/project/#docforge.models.project.Project.get_all_modules","title":"get_all_modules","text":"<pre><code>get_all_modules() -> Iterable[Module]\n</code></pre> <p>Get all modules in the project.</p> <p>Returns:</p> Type Description <code>Iterable[Module]</code> <p>An iterable of Module objects.</p>"},{"location":"docforge/models/project/#docforge.models.project.Project.get_module","title":"get_module","text":"<pre><code>get_module(path: str) -> Module\n</code></pre> <p>Retrieve a module by its dotted path.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>str</code> <p>The dotted path of the module (e.g., 'pkg.mod').</p> required <p>Returns:</p> Type Description <code>Module</code> <p>The requested Module.</p>"},{"location":"docforge/models/project/#docforge.models.project.Project.get_module_list","title":"get_module_list","text":"<pre><code>get_module_list() -> list[str]\n</code></pre> <p>Get the list of all module dotted paths.</p> <p>Returns:</p> Type Description <code>list[str]</code> <p>A list of module paths.</p>"},{"location":"docforge/nav/","title":"Nav","text":""},{"location":"docforge/nav/#docforge.nav","title":"docforge.nav","text":""},{"location":"docforge/nav/#docforge.nav--navigation-layer","title":"Navigation Layer","text":"<p>The <code>docforge.nav</code> package manages the mapping between the logical documentation structure and the physical files on disk.</p>"},{"location":"docforge/nav/#docforge.nav--workflow","title":"Workflow","text":"<ol> <li>Spec Definition: Users define navigation intent in <code>docforge.nav.yml</code>.</li> <li>Resolution: <code>resolve_nav</code> matches patterns in the spec to generated <code>.md</code> files.</li> <li>Emission: <code>MkDocsNavEmitter</code> produces the final YAML structure for <code>mkdocs.yml</code>.</li> </ol> <p>This abstraction allows doc-forge to support complex grouping and ordering independently of the source code's physical layout.</p>"},{"location":"docforge/nav/#docforge.nav.MkDocsNavEmitter","title":"MkDocsNavEmitter","text":"<p>Emitter responsible for transforming a ResolvedNav into an MkDocs-compatible navigation structure.</p>"},{"location":"docforge/nav/#docforge.nav.MkDocsNavEmitter.emit","title":"emit","text":"<pre><code>emit(nav: ResolvedNav) -> List[Dict[str, Any]]\n</code></pre> <p>Generate a list of navigation entries for mkdocs.yml.</p> <p>Parameters:</p> Name Type Description Default <code>nav</code> <code>ResolvedNav</code> <p>The resolved navigation data.</p> required <p>Returns:</p> Type Description <code>List[Dict[str, Any]]</code> <p>A list of dictionary mappings representing the MkDocs navigation.</p>"},{"location":"docforge/nav/#docforge.nav.NavSpec","title":"NavSpec","text":"<pre><code>NavSpec(home: Optional[str], groups: Dict[str, List[str]])\n</code></pre> <p>Parsed representation of the docforge navigation specification file.</p> <p>Attributes:</p> Name Type Description <code>home</code> <code>Optional[str]</code> <p>Path to the home document (e.g., 'index.md').</p> <code>groups</code> <code>Dict[str, List[str]]</code> <p>Mapping of group titles to lists of path patterns/globs.</p> <p>Initialize a NavSpec.</p> <p>Parameters:</p> Name Type Description Default <code>home</code> <code>Optional[str]</code> <p>The path to the home document.</p> required <code>groups</code> <code>Dict[str, List[str]]</code> <p>A mapping of group names to lists of path patterns (globs).</p> required"},{"location":"docforge/nav/#docforge.nav.NavSpec.all_patterns","title":"all_patterns","text":"<pre><code>all_patterns() -> List[str]\n</code></pre> <p>Get all path patterns referenced in the specification.</p> <p>Returns:</p> Type Description <code>List[str]</code> <p>A list of all patterns (home plus all groups).</p>"},{"location":"docforge/nav/#docforge.nav.NavSpec.load","title":"load <code>classmethod</code>","text":"<pre><code>load(path: Path) -> NavSpec\n</code></pre> <p>Load a NavSpec from a YAML file.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>Path</code> <p>The filesystem path to the YAML file.</p> required <p>Returns:</p> Type Description <code>NavSpec</code> <p>A NavSpec instance.</p> <p>Raises:</p> Type Description <code>FileNotFoundError</code> <p>If the path does not exist.</p> <code>ValueError</code> <p>If the file content is not a valid NavSpec mapping.</p>"},{"location":"docforge/nav/#docforge.nav.ResolvedNav","title":"ResolvedNav","text":"<pre><code>ResolvedNav(home: str | None, groups: Dict[str, List[Path]], docs_root: Path | None = None)\n</code></pre> <p>Represents a navigation structure where all patterns and paths have been resolved against the actual filesystem contents.</p> <p>Attributes:</p> Name Type Description <code>home</code> <code>Optional[str]</code> <p>Resolved relative path to the home page.</p> <code>groups</code> <code>Dict[str, List[Path]]</code> <p>Mapping of group titles to lists of absolute or relative Path objects.</p> <p>Initialize a ResolvedNav instance.</p> <p>Parameters:</p> Name Type Description Default <code>home</code> <code>str | None</code> <p>The relative path to the project home page.</p> required <code>groups</code> <code>Dict[str, List[Path]]</code> <p>A mapping of group names to their resolved filesystem paths.</p> required <code>docs_root</code> <code>Path | None</code> <p>The root documentation directory.</p> <code>None</code>"},{"location":"docforge/nav/#docforge.nav.ResolvedNav.all_files","title":"all_files","text":"<pre><code>all_files() -> Iterable[Path]\n</code></pre> <p>Get an iterable of all resolved files in the navigation structure.</p> <p>Returns:</p> Type Description <code>Iterable[Path]</code> <p>An iterable of Path objects.</p>"},{"location":"docforge/nav/#docforge.nav.load_nav_spec","title":"load_nav_spec","text":"<pre><code>load_nav_spec(path: Path) -> NavSpec\n</code></pre> <p>Utility function to load a NavSpec from a file.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>Path</code> <p>Path to the navigation specification file.</p> required <p>Returns:</p> Type Description <code>NavSpec</code> <p>A loaded NavSpec instance.</p>"},{"location":"docforge/nav/#docforge.nav.resolve_nav","title":"resolve_nav","text":"<pre><code>resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav\n</code></pre> <p>Create a ResolvedNav by processing a NavSpec against the filesystem. This expands globs and validates the existence of referenced files.</p> <p>Parameters:</p> Name Type Description Default <code>spec</code> <code>NavSpec</code> <p>The navigation specification to resolve.</p> required <code>docs_root</code> <code>Path</code> <p>The root directory for documentation files.</p> required <p>Returns:</p> Type Description <code>ResolvedNav</code> <p>A ResolvedNav instance.</p> <p>Raises:</p> Type Description <code>FileNotFoundError</code> <p>If a pattern doesn't match any files or the docs_root doesn't exist.</p>"},{"location":"docforge/nav/mkdocs/","title":"Mkdocs","text":""},{"location":"docforge/nav/mkdocs/#docforge.nav.mkdocs","title":"docforge.nav.mkdocs","text":"<p>This module provides the MkDocsNavEmitter, which converts a ResolvedNav instance into the specific YAML-ready list structure expected by the MkDocs 'nav' configuration.</p>"},{"location":"docforge/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter","title":"MkDocsNavEmitter","text":"<p>Emitter responsible for transforming a ResolvedNav into an MkDocs-compatible navigation structure.</p>"},{"location":"docforge/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter.emit","title":"emit","text":"<pre><code>emit(nav: ResolvedNav) -> List[Dict[str, Any]]\n</code></pre> <p>Generate a list of navigation entries for mkdocs.yml.</p> <p>Parameters:</p> Name Type Description Default <code>nav</code> <code>ResolvedNav</code> <p>The resolved navigation data.</p> required <p>Returns:</p> Type Description <code>List[Dict[str, Any]]</code> <p>A list of dictionary mappings representing the MkDocs navigation.</p>"},{"location":"docforge/nav/resolver/","title":"Resolver","text":""},{"location":"docforge/nav/resolver/#docforge.nav.resolver","title":"docforge.nav.resolver","text":"<p>This module contains the logic for resolving a NavSpec against the physical filesystem. It expands globs and validates that all referenced documents actually exist on disk.</p>"},{"location":"docforge/nav/resolver/#docforge.nav.resolver.ResolvedNav","title":"ResolvedNav","text":"<pre><code>ResolvedNav(home: str | None, groups: Dict[str, List[Path]], docs_root: Path | None = None)\n</code></pre> <p>Represents a navigation structure where all patterns and paths have been resolved against the actual filesystem contents.</p> <p>Attributes:</p> Name Type Description <code>home</code> <code>Optional[str]</code> <p>Resolved relative path to the home page.</p> <code>groups</code> <code>Dict[str, List[Path]]</code> <p>Mapping of group titles to lists of absolute or relative Path objects.</p> <p>Initialize a ResolvedNav instance.</p> <p>Parameters:</p> Name Type Description Default <code>home</code> <code>str | None</code> <p>The relative path to the project home page.</p> required <code>groups</code> <code>Dict[str, List[Path]]</code> <p>A mapping of group names to their resolved filesystem paths.</p> required <code>docs_root</code> <code>Path | None</code> <p>The root documentation directory.</p> <code>None</code>"},{"location":"docforge/nav/resolver/#docforge.nav.resolver.ResolvedNav.all_files","title":"all_files","text":"<pre><code>all_files() -> Iterable[Path]\n</code></pre> <p>Get an iterable of all resolved files in the navigation structure.</p> <p>Returns:</p> Type Description <code>Iterable[Path]</code> <p>An iterable of Path objects.</p>"},{"location":"docforge/nav/resolver/#docforge.nav.resolver.resolve_nav","title":"resolve_nav","text":"<pre><code>resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav\n</code></pre> <p>Create a ResolvedNav by processing a NavSpec against the filesystem. This expands globs and validates the existence of referenced files.</p> <p>Parameters:</p> Name Type Description Default <code>spec</code> <code>NavSpec</code> <p>The navigation specification to resolve.</p> required <code>docs_root</code> <code>Path</code> <p>The root directory for documentation files.</p> required <p>Returns:</p> Type Description <code>ResolvedNav</code> <p>A ResolvedNav instance.</p> <p>Raises:</p> Type Description <code>FileNotFoundError</code> <p>If a pattern doesn't match any files or the docs_root doesn't exist.</p>"},{"location":"docforge/nav/spec/","title":"Spec","text":""},{"location":"docforge/nav/spec/#docforge.nav.spec","title":"docforge.nav.spec","text":"<p>This module defines the NavSpec class, which represents the user's intent for documentation navigation as defined in a YAML specification (usually docforge.nav.yml).</p>"},{"location":"docforge/nav/spec/#docforge.nav.spec.NavSpec","title":"NavSpec","text":"<pre><code>NavSpec(home: Optional[str], groups: Dict[str, List[str]])\n</code></pre> <p>Parsed representation of the docforge navigation specification file.</p> <p>Attributes:</p> Name Type Description <code>home</code> <code>Optional[str]</code> <p>Path to the home document (e.g., 'index.md').</p> <code>groups</code> <code>Dict[str, List[str]]</code> <p>Mapping of group titles to lists of path patterns/globs.</p> <p>Initialize a NavSpec.</p> <p>Parameters:</p> Name Type Description Default <code>home</code> <code>Optional[str]</code> <p>The path to the home document.</p> required <code>groups</code> <code>Dict[str, List[str]]</code> <p>A mapping of group names to lists of path patterns (globs).</p> required"},{"location":"docforge/nav/spec/#docforge.nav.spec.NavSpec.all_patterns","title":"all_patterns","text":"<pre><code>all_patterns() -> List[str]\n</code></pre> <p>Get all path patterns referenced in the specification.</p> <p>Returns:</p> Type Description <code>List[str]</code> <p>A list of all patterns (home plus all groups).</p>"},{"location":"docforge/nav/spec/#docforge.nav.spec.NavSpec.load","title":"load <code>classmethod</code>","text":"<pre><code>load(path: Path) -> NavSpec\n</code></pre> <p>Load a NavSpec from a YAML file.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>Path</code> <p>The filesystem path to the YAML file.</p> required <p>Returns:</p> Type Description <code>NavSpec</code> <p>A NavSpec instance.</p> <p>Raises:</p> Type Description <code>FileNotFoundError</code> <p>If the path does not exist.</p> <code>ValueError</code> <p>If the file content is not a valid NavSpec mapping.</p>"},{"location":"docforge/nav/spec/#docforge.nav.spec.load_nav_spec","title":"load_nav_spec","text":"<pre><code>load_nav_spec(path: Path) -> NavSpec\n</code></pre> <p>Utility function to load a NavSpec from a file.</p> <p>Parameters:</p> Name Type Description Default <code>path</code> <code>Path</code> <p>Path to the navigation specification file.</p> required <p>Returns:</p> Type Description <code>NavSpec</code> <p>A loaded NavSpec instance.</p>"},{"location":"docforge/renderers/","title":"Renderers","text":""},{"location":"docforge/renderers/#docforge.renderers","title":"docforge.renderers","text":""},{"location":"docforge/renderers/#docforge.renderers--renderers-layer","title":"Renderers Layer","text":"<p>The <code>docforge.renderers</code> package handles the transformation of the internal documentation models into physical files formatted for specific documentation engines.</p>"},{"location":"docforge/renderers/#docforge.renderers--current-implementations","title":"Current Implementations","text":"<ul> <li>MkDocsRenderer: Generates Markdown files utilizing the <code>mkdocstrings</code> syntax. It automatically handles package/module hierarchy and generates <code>index.md</code> files for packages.</li> </ul>"},{"location":"docforge/renderers/#docforge.renderers--extending","title":"Extending","text":"<p>To add a new renderer, implement the <code>DocRenderer</code> protocol defined in <code>docforge.renderers.base</code>.</p>"},{"location":"docforge/renderers/#docforge.renderers.MCPRenderer","title":"MCPRenderer","text":"<p>Renderer that emits MCP-native JSON resources from docforge models.</p>"},{"location":"docforge/renderers/#docforge.renderers.MCPRenderer.generate_sources","title":"generate_sources","text":"<pre><code>generate_sources(project: Project, out_dir: Path) -> None\n</code></pre> <p>Generate MCP-compatible JSON resources and navigation for the project.</p> <p>Parameters:</p> Name Type Description Default <code>project</code> <code>Project</code> <p>The project model to render.</p> required <code>out_dir</code> <code>Path</code> <p>Target directory for the generated JSON files.</p> required"},{"location":"docforge/renderers/#docforge.renderers.MkDocsRenderer","title":"MkDocsRenderer","text":"<p>Renderer that generates Markdown source files formatted for the MkDocs 'mkdocstrings' plugin.</p>"},{"location":"docforge/renderers/#docforge.renderers.MkDocsRenderer.generate_sources","title":"generate_sources","text":"<pre><code>generate_sources(project: Project, out_dir: Path) -> None\n</code></pre> <p>Produce a set of Markdown files in the output directory based on the provided Project models.</p> <p>Parameters:</p> Name Type Description Default <code>project</code> <code>Project</code> <p>The project models to render.</p> required <code>out_dir</code> <code>Path</code> <p>Target directory for documentation files.</p> required"},{"location":"docforge/renderers/base/","title":"Base","text":""},{"location":"docforge/renderers/base/#docforge.renderers.base","title":"docforge.renderers.base","text":"<p>This module defines the base interfaces and configuration containers for doc-forge renderers. All renderer implementations should adhere to the DocRenderer protocol.</p>"},{"location":"docforge/renderers/base/#docforge.renderers.base.DocRenderer","title":"DocRenderer","text":"<p> Bases: <code>Protocol</code></p> <p>Protocol defining the interface for documentation renderers.</p>"},{"location":"docforge/renderers/base/#docforge.renderers.base.DocRenderer.generate_sources","title":"generate_sources","text":"<pre><code>generate_sources(project: Project, out_dir: Path) -> None\n</code></pre> <p>Generate renderer-specific source files for the given project.</p> <p>Parameters:</p> Name Type Description Default <code>project</code> <code>Project</code> <p>The project models containing modules and objects.</p> required <code>out_dir</code> <code>Path</code> <p>Target directory for the generated files.</p> required"},{"location":"docforge/renderers/base/#docforge.renderers.base.RendererConfig","title":"RendererConfig","text":"<pre><code>RendererConfig(out_dir: Path, project: Project)\n</code></pre> <p>Configuration container for documentation renderers.</p> <p>Parameters:</p> Name Type Description Default <code>out_dir</code> <code>Path</code> <p>The directory where documentation files should be written.</p> required <code>project</code> <code>Project</code> <p>The introspected project models to be rendered.</p> required"},{"location":"docforge/renderers/mcp_renderer/","title":"Mcp Renderer","text":""},{"location":"docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer","title":"docforge.renderers.mcp_renderer","text":""},{"location":"docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer","title":"MCPRenderer","text":"<p>Renderer that emits MCP-native JSON resources from docforge models.</p>"},{"location":"docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer.generate_sources","title":"generate_sources","text":"<pre><code>generate_sources(project: Project, out_dir: Path) -> None\n</code></pre> <p>Generate MCP-compatible JSON resources and navigation for the project.</p> <p>Parameters:</p> Name Type Description Default <code>project</code> <code>Project</code> <p>The project model to render.</p> required <code>out_dir</code> <code>Path</code> <p>Target directory for the generated JSON files.</p> required"},{"location":"docforge/renderers/mkdocs_renderer/","title":"Mkdocs Renderer","text":""},{"location":"docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer","title":"docforge.renderers.mkdocs_renderer","text":"<p>This module implements the MkDocsRenderer, which generates Markdown source files compatible with the MkDocs 'material' theme and 'mkdocstrings' extension.</p>"},{"location":"docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer","title":"MkDocsRenderer","text":"<p>Renderer that generates Markdown source files formatted for the MkDocs 'mkdocstrings' plugin.</p>"},{"location":"docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources","title":"generate_sources","text":"<pre><code>generate_sources(project: Project, out_dir: Path) -> None\n</code></pre> <p>Produce a set of Markdown files in the output directory based on the provided Project models.</p> <p>Parameters:</p> Name Type Description Default <code>project</code> <code>Project</code> <p>The project models to render.</p> required <code>out_dir</code> <code>Path</code> <p>Target directory for documentation files.</p> required"},{"location":"docforge/servers/","title":"Servers","text":""},{"location":"docforge/servers/#docforge.servers","title":"docforge.servers","text":""},{"location":"docforge/servers/#docforge.servers.MCPServer","title":"MCPServer","text":"<pre><code>MCPServer(mcp_root: Path, name: str)\n</code></pre> <p>MCP server for serving a pre-built MCP documentation bundle.</p> <p>Initialize the MCPServer.</p> <p>Parameters:</p> Name Type Description Default <code>mcp_root</code> <code>Path</code> <p>Path to the directory containing pre-built MCP JSON resources.</p> required <code>name</code> <code>str</code> <p>Name of the MCP server.</p> required"},{"location":"docforge/servers/#docforge.servers.MCPServer.run","title":"run","text":"<pre><code>run(transport: Literal['stdio', 'sse', 'streamable-http'] = 'streamable-http') -> None\n</code></pre> <p>Start the MCP server.</p> <p>Parameters:</p> Name Type Description Default <code>transport</code> <code>Literal['stdio', 'sse', 'streamable-http']</code> <p>MCP transport (default: streamable-http)</p> <code>'streamable-http'</code>"},{"location":"docforge/servers/mcp_server/","title":"Mcp Server","text":""},{"location":"docforge/servers/mcp_server/#docforge.servers.mcp_server","title":"docforge.servers.mcp_server","text":""},{"location":"docforge/servers/mcp_server/#docforge.servers.mcp_server.MCPServer","title":"MCPServer","text":"<pre><code>MCPServer(mcp_root: Path, name: str)\n</code></pre> <p>MCP server for serving a pre-built MCP documentation bundle.</p> <p>Initialize the MCPServer.</p> <p>Parameters:</p> Name Type Description Default <code>mcp_root</code> <code>Path</code> <p>Path to the directory containing pre-built MCP JSON resources.</p> required <code>name</code> <code>str</code> <p>Name of the MCP server.</p> required"},{"location":"docforge/servers/mcp_server/#docforge.servers.mcp_server.MCPServer.run","title":"run","text":"<pre><code>run(transport: Literal['stdio', 'sse', 'streamable-http'] = 'streamable-http') -> None\n</code></pre> <p>Start the MCP server.</p> <p>Parameters:</p> Name Type Description Default <code>transport</code> <code>Literal['stdio', 'sse', 'streamable-http']</code> <p>MCP transport (default: streamable-http)</p> <code>'streamable-http'</code>"}]} |