{ "module": "docforge", "content": { "path": "docforge", "docstring": "Renderer-agnostic Python documentation compiler that converts Python docstrings\ninto structured documentation for both humans (MkDocs) and machines (MCP / AI agents).\n\n`doc-forge` statically analyzes source code, builds a semantic model of modules,\nclasses, functions, and attributes, and renders that model into documentation\noutputs without executing user code.\n\n---\n\n# Installation\n\nInstall using pip:\n\n```bash\npip install doc-forge\n```\n\n---\n\n# CLI usage\n\n## Generate an MkDocs site from a Python package:\n\n```bash\ndoc-forge build --mkdocs --module my_package\n```\n\n## Generate MCP JSON documentation:\n\n```bash\ndoc-forge build --mcp --module my_package\n```\n\n\n## Generate MkDocs site and MCP JSON documentation:\n\n```bash\ndoc-forge build --mcp --mkdocs --module my_package\n```\n\n## Serve MkDocs locally:\n\n```bash\ndoc-forge serve --mkdocs --module my_package\n```\n\n## Serve MCP locally:\n\n```bash\ndoc-forge serve --mcp --module my_package\n```\n\n---\n\n# Core concepts\n\n## Loader\nExtracts symbols, signatures, and docstrings using static analysis.\n\n## Semantic model\nStructured, renderer-agnostic representation of the API.\n\n## Renderer\nConverts the semantic model into output formats such as MkDocs or MCP JSON.\n\n## Symbol\nAny documentable object\n\n- module\n- class\n- function\n- method\n- property\n- attribute\n\n---\n\n# Architecture\n\n`doc-forge` follows a compiler architecture:\n\n## Front-end:\n\nStatic analysis of modules, classes, functions, type hints, and docstrings.\n\n## Middle-end:\n\nBuilds a semantic model describing symbols and relationships.\n\n## Back-end:\n\nRenders documentation using interchangeable renderers.\n\nThis architecture ensures deterministic documentation generation.\n\n---\n\n# Rendering pipeline\n\nTypical flow:\n\n Python package\n ↓\n Loader (static analysis)\n ↓\n Semantic model\n ↓\n Renderer\n ↓\n MkDocs site or MCP JSON\n\n---\n\n# Google-Styled Doc-Forge Convention (GSDFC)\n\nGSDFC defines how docstrings must be written so they render correctly in MkDocs and remain machine-parsable by doc-forge and AI tooling.\n\n- Docstrings are the single source of truth.\n- doc-forge compiles docstrings but does not generate documentation content.\n- Documentation follows the Python import hierarchy.\n- Every public symbol should have a complete and accurate docstring.\n\n---\n\n## General rules\n\n- Use **Markdown headings** at package and module level.\n- Use **Google-style structured sections** at class, function, and method level.\n- Use type hints in signatures instead of duplicating types in prose.\n- Write summaries in imperative form.\n- Sections are separated by ```---```\n\n---\n\n## Notes subsection grouping\n\n- Group related information using labeled subsections.\n\nExample:\n Notes Example:\n\n Notes:\n **Guarantees:**\n\n - deterministic behavior\n\n **Lifecycle:**\n\n - created during initialization\n - reused across executions\n\n **Thread safety:**\n\n - safe for concurrent reads\n\n---\n\n## Example formatting\n\n- Use indentation for examples.\n- Use code blocks for example code.\n\nExample:\n Single example:\n\n Example:\n\n ```python\n foo = Foo(\"example\")\n process(foo, multiplier=2)\n ```\n\n Multiple examples:\n\n Example:\n Create foo:\n\n ```python\n foo = Foo(\"example\")\n ```\n\n Run engine:\n\n ```python\n engine = BarEngine([foo])\n engine.run()\n ```\n\nAvoid fenced code blocks inside structured sections.\n\n---\n\n## Separator rules\n\nUse horizontal separators only at docstring root level to separate sections:\n```markdown\n---\n```\n\nAllowed locations:\n\n- package docstrings\n- module docstrings\n- major documentation sections\n\nDo not use separators inside code sections.\n\n---\n\n## Package docstrings\n\n- Package docstrings act as the documentation home page.\n\nRecommended sections:\n\n # Summary\n # Installation\n # Quick start\n # CLI usage\n # Core concepts\n # Architecture\n # Rendering pipeline\n # Examples\n # Notes\n\nExample:\n Package Doc String:\n\n '''\n Foo-bar processing framework.\n\n Provides tools for defining Foo objects and executing Bar pipelines.\n\n ---\n\n # Installation\n\n ```bash\n pip install foo-bar\n ```\n\n ---\n\n # Quick start\n\n ```python\n from foobar import Foo, BarEngine\n\n foo = Foo(\"example\")\n engine = BarEngine([foo])\n\n result = engine.run()\n ```\n\n ---\n '''\n\n---\n\n## Module docstrings\n\n- Module docstrings describe a subsystem.\n\nRecommended sections:\n\n # Summary\n # Examples\n # Notes\n\nExample:\n Module Doc String:\n\n '''\n Foo execution subsystem.\n\n Provides utilities for executing Foo objects through Bar stages.\n\n ---\n\n Example:\n\n ```python\n from foobar.engine import BarEngine\n from foobar.foo import Foo\n\n foo = Foo(\"example\")\n\n engine = BarEngine([foo])\n engine.run()\n ```\n\n ---\n '''\n\n---\n\n## Class docstrings\n\n- Class docstrings define object responsibility, lifecycle, and attributes.\n\nRecommended sections:\n\n Attributes:\n Notes:\n Example:\n Raises:\n\nExample:\n Simple Foo:\n\n ```python\n class Foo:\n '''\n Represents a unit of work.\n\n Attributes:\n name (str):\n Identifier of the foo instance.\n\n value (int):\n Numeric value associated with foo.\n\n Notes:\n Guarantees:\n\n - instances are immutable after creation\n\n Lifecycle:\n\n - create instance\n - pass to processing engine\n\n Example:\n Create and inspect a Foo:\n\n ```python\n foo = Foo(\"example\", value=42)\n print(foo.name)\n ```\n '''\n ```\n\n Complex Bar:\n\n ```python\n class BarEngine:\n '''\n Executes Foo objects through Bar stages.\n\n Attributes:\n foos (tuple[Foo, ...]):\n Foo instances managed by the engine.\n\n Notes:\n Guarantees:\n\n - deterministic execution order\n\n Example:\n Run engine:\n\n ```python\n foo1 = Foo(\"a\")\n foo2 = Foo(\"b\")\n\n engine = BarEngine([foo1, foo2])\n engine.run()\n ```\n '''\n ```\n\n---\n\n## Function and method docstrings\n\n- Function docstrings define API contracts.\n\nRecommended sections:\n\n Args:\n Returns:\n Raises:\n Yields:\n Notes:\n Example:\n\nExample:\n Simple process method:\n\n ```python\n def process(foo: Foo, multiplier: int) -> int:\n '''\n Process a Foo instance.\n\n Args:\n foo (Foo):\n Foo instance to process.\n\n multiplier (int):\n Value used to scale foo.\n\n Returns:\n int:\n Processed result.\n\n Raises:\n ValueError:\n If multiplier is negative.\n\n Notes:\n Guarantees:\n\n - foo is not modified\n\n Example:\n Process foo:\n\n ```python\n foo = Foo(\"example\", value=10)\n\n result = process(foo, multiplier=2)\n print(result)\n ```\n '''\n ```\n\n Multiple Examples:\n\n ```python\n def combine(foo_a: Foo, foo_b: Foo) -> Foo:\n '''\n Combine two Foo instances.\n\n Args:\n foo_a (Foo):\n First foo.\n\n foo_b (Foo):\n Second foo.\n\n Returns:\n Foo:\n Combined foo.\n\n Example:\n Basic usage:\n\n ```python\n foo1 = Foo(\"a\")\n foo2 = Foo(\"b\")\n\n combined = combine(foo1, foo2)\n ```\n\n Pipeline usage:\n\n ```python\n engine = BarEngine([foo1, foo2])\n engine.run()\n ```\n '''\n ```\n\n---\n\n## Property docstrings\n\n- Properties must document return values.\n\nExample:\n Property Doc String:\n\n ```python\n @property\n def foos(self) -> tuple[Foo, ...]:\n '''\n Return contained Foo instances.\n\n Returns:\n tuple[Foo, ...]:\n Stored foo objects.\n\n Example:\n ```python\n container = FooContainer()\n\n foos = container.foos\n ```\n '''\n ```\n\n---\n\n## Attribute documentation\n\n- Document attributes in class docstrings using Attributes:.\n\nExample:\n Attribute Doc String:\n\n ```python\n '''\n Represents a processing stage.\n\n Attributes:\n id (str):\n Unique identifier.\n\n enabled (bool):\n Whether the stage is active.\n '''\n ```\n\n---\n\n## Parsing guarantees\n\nGSDFC ensures doc-forge can deterministically extract:\n\n- symbol kind (module, class, function, property, attribute)\n- symbol name\n- parameters\n- return values\n- attributes\n- examples\n- structured Notes subsections\n\nThis enables:\n\n- reliable MkDocs rendering\n- deterministic MCP export\n- accurate AI semantic interpretation\n\n---\n\nNotes:\n - doc-forge never executes analyzed modules.\n - Documentation is generated entirely through static analysis.", "objects": { "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.GriffeLoader", "signature": "", "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.GriffeLoader.load_module", "signature": "", "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.discover_module_paths", "signature": "", "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for ``.py`` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing ``__init__.py`` are treated as packages.\n- Each ``.py`` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name: Top-level package name to discover modules from.\n project_root: Root directory used to resolve module paths. If not\n provided, the current working directory is used.\n\nReturns:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError: If the specified package directory does not exist." }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.MkDocsRenderer", "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.MkDocsRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.MkDocsRenderer.generate_sources", "signature": "", "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project: Project model containing modules to document.\n out_dir: Directory where generated Markdown files will be written.\n module_is_source: If True, treat the specified module as the\n documentation root rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.MkDocsRenderer.generate_readme", "signature": "", "docstring": "Generate a ``README.md`` file from the root module docstring.\n\nBehavior:\n\n- If ``module_is_source`` is True, ``README.md`` is written to the\n project root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project: Project model containing documentation metadata.\n docs_dir: Directory containing generated documentation sources.\n module_is_source: Whether the module is treated as the project\n source root." } } }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.MCPRenderer", "signature": "", "docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.MCPRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.MCPRenderer.generate_sources", "signature": "", "docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as ``nav.json`` and ``index.json``.\n\nArgs:\n project: Documentation project model to render.\n out_dir: Directory where MCP resources will be written." } } }, "main": { "name": "main", "kind": "module", "path": "docforge.main", "signature": "", "docstring": "Command-line entry point for the doc-forge CLI.\n\nThis module exposes the executable entry point that initializes the\nClick command group defined in ``docforge.cli.commands``.", "members": { "cli": { "name": "cli", "kind": "attribute", "path": "docforge.main.cli", "signature": "", "docstring": null }, "main": { "name": "main", "kind": "function", "path": "docforge.main.main", "signature": "", "docstring": "Run the doc-forge command-line interface.\n\nThis function initializes and executes the Click CLI application.\nIt is used as the console entry point when invoking ``doc-forge``\nfrom the command line." } } }, "cli": { "name": "cli", "kind": "module", "path": "docforge.cli", "signature": null, "docstring": "Command line interface entry point for doc-forge.\n\nThis module exposes the primary CLI entry function used by the\n``doc-forge`` command. The actual command implementation resides in\n``docforge.cli.main``, while this module provides a stable import path\nfor external tools and the package entry point configuration.\n\nThe CLI is responsible for orchestrating documentation workflows such as\ngenerating renderer sources, building documentation sites, exporting\nmachine-readable documentation bundles, and starting development or MCP\nservers.\n\n---\n\nTypical usage\n-------------\n\nThe CLI is normally invoked through the installed command:\n\n doc-forge [options]\n\nProgrammatic invocation is also possible:\n\n from docforge.cli import main\n main()\n\n---", "members": { "main": { "name": "main", "kind": "module", "path": "docforge.cli.main", "signature": null, "docstring": "Command-line entry point for the doc-forge CLI.\n\nThis module exposes the executable entry point that initializes the\nClick command group defined in ``docforge.cli.commands``.", "members": { "cli": { "name": "cli", "kind": "attribute", "path": "docforge.cli.main.cli", "signature": "", "docstring": null }, "main": { "name": "main", "kind": "function", "path": "docforge.cli.main.main", "signature": "", "docstring": "Run the doc-forge command-line interface.\n\nThis function initializes and executes the Click CLI application.\nIt is used as the console entry point when invoking ``doc-forge``\nfrom the command line." } } }, "commands": { "name": "commands", "kind": "module", "path": "docforge.cli.commands", "signature": null, "docstring": null, "members": { "click": { "name": "click", "kind": "alias", "path": "docforge.cli.commands.click", "signature": "", "docstring": null }, "Path": { "name": "Path", "kind": "alias", "path": "docforge.cli.commands.Path", "signature": "", "docstring": null }, "Sequence": { "name": "Sequence", "kind": "alias", "path": "docforge.cli.commands.Sequence", "signature": "", "docstring": null }, "Optional": { "name": "Optional", "kind": "alias", "path": "docforge.cli.commands.Optional", "signature": "", "docstring": null }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.cli.commands.GriffeLoader", "signature": "", "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_module", "signature": "", "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance." } } }, "mkdocs_utils": { "name": "mkdocs_utils", "kind": "module", "path": "docforge.cli.commands.mkdocs_utils", "signature": "", "docstring": null, "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.cli.commands.mkdocs_utils.Path", "signature": "", "docstring": null }, "resources": { "name": "resources", "kind": "alias", "path": "docforge.cli.commands.mkdocs_utils.resources", "signature": "", "docstring": null }, "click": { "name": "click", "kind": "alias", "path": "docforge.cli.commands.mkdocs_utils.click", "signature": "", "docstring": null }, "yaml": { "name": "yaml", "kind": "alias", "path": "docforge.cli.commands.mkdocs_utils.yaml", "signature": "", "docstring": null }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", "signature": "", "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", "signature": "", "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", "signature": "", "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for ``.py`` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing ``__init__.py`` are treated as packages.\n- Each ``.py`` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name: Top-level package name to discover modules from.\n project_root: Root directory used to resolve module paths. If not\n provided, the current working directory is used.\n\nReturns:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError: If the specified package directory does not exist." }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", "signature": "", "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project: Project model containing modules to document.\n out_dir: Directory where generated Markdown files will be written.\n module_is_source: If True, treat the specified module as the\n documentation root rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", "docstring": "Generate a ``README.md`` file from the root module docstring.\n\nBehavior:\n\n- If ``module_is_source`` is True, ``README.md`` is written to the\n project root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project: Project model containing documentation metadata.\n docs_dir: Directory containing generated documentation sources.\n module_is_source: Whether the module is treated as the project\n source root." } } }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", "signature": "", "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", "signature": "", "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", "signature": "", "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_sources", "signature": "", "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module: Python module import path used as the entry point for\n documentation generation.\n docs_dir: Directory where the generated Markdown files will be written.\n project_name: Optional override for the project name used in\n documentation metadata.\n module_is_source: If True, treat the specified module directory as\n the project root rather than a nested module." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_config", "signature": "", "docstring": "Generate an ``mkdocs.yml`` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir: Directory containing generated documentation Markdown files.\n nav_file: Path to the ``docforge.nav.yml`` navigation specification.\n template: Optional path to a custom MkDocs configuration template.\n If not provided, a built-in template will be used.\n out: Destination path where the generated ``mkdocs.yml`` file\n will be written.\n site_name: Display name for the generated documentation site.\n\nRaises:\n click.FileError: If the navigation specification or template\n file cannot be found." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.build", "signature": "", "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\n\nArgs:\n mkdocs_yml: Path to the ``mkdocs.yml`` configuration file.\n\nRaises:\n click.ClickException: If the configuration file does not exist." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.serve", "signature": "", "docstring": "Start an MkDocs development server with live reload.\n\nThe server watches documentation files and automatically reloads\nthe site when changes are detected.\n\nArgs:\n mkdocs_yml: Path to the ``mkdocs.yml`` configuration file.\n\nRaises:\n click.ClickException: If the configuration file does not exist." } } }, "mcp_utils": { "name": "mcp_utils", "kind": "module", "path": "docforge.cli.commands.mcp_utils", "signature": "", "docstring": null, "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.cli.commands.mcp_utils.Path", "signature": "", "docstring": null }, "click": { "name": "click", "kind": "alias", "path": "docforge.cli.commands.mcp_utils.click", "signature": "", "docstring": null }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.cli.commands.mcp_utils.GriffeLoader", "signature": "", "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_module", "signature": "", "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.cli.commands.mcp_utils.discover_module_paths", "signature": "", "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for ``.py`` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing ``__init__.py`` are treated as packages.\n- Each ``.py`` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name: Top-level package name to discover modules from.\n project_root: Root directory used to resolve module paths. If not\n provided, the current working directory is used.\n\nReturns:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError: If the specified package directory does not exist." }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.cli.commands.mcp_utils.MCPRenderer", "signature": "", "docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.cli.commands.mcp_utils.MCPRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.commands.mcp_utils.MCPRenderer.generate_sources", "signature": "", "docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as ``nav.json`` and ``index.json``.\n\nArgs:\n project: Documentation project model to render.\n out_dir: Directory where MCP resources will be written." } } }, "MCPServer": { "name": "MCPServer", "kind": "class", "path": "docforge.cli.commands.mcp_utils.MCPServer", "signature": "", "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", "members": { "mcp_root": { "name": "mcp_root", "kind": "attribute", "path": "docforge.cli.commands.mcp_utils.MCPServer.mcp_root", "signature": "", "docstring": null }, "app": { "name": "app", "kind": "attribute", "path": "docforge.cli.commands.mcp_utils.MCPServer.app", "signature": "", "docstring": null }, "run": { "name": "run", "kind": "function", "path": "docforge.cli.commands.mcp_utils.MCPServer.run", "signature": "", "docstring": "Start the MCP server.\n\nArgs:\n transport: Transport mechanism used by the MCP server. Supported\n options include ``stdio``, ``sse``, and ``streamable-http``." } } }, "generate_resources": { "name": "generate_resources", "kind": "function", "path": "docforge.cli.commands.mcp_utils.generate_resources", "signature": "", "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module: Python module import path used as the entry point for\n documentation generation.\n project_name: Optional override for the project name used in\n generated documentation metadata.\n out_dir: Directory where MCP resources (index.json, nav.json,\n and module data) will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.mcp_utils.serve", "signature": "", "docstring": "Start an MCP server for a pre-generated documentation bundle.\n\nThe server exposes documentation resources such as project metadata,\nnavigation structure, and module documentation through MCP endpoints.\n\nArgs:\n module: Python module import path used to identify the served\n documentation instance.\n mcp_root: Path to the directory containing the MCP documentation\n bundle (index.json, nav.json, and modules/).\n\nRaises:\n click.ClickException: If the MCP documentation bundle is missing\n required files or directories." } } }, "cli": { "name": "cli", "kind": "attribute", "path": "docforge.cli.commands.cli", "signature": null, "docstring": null }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.commands.build", "signature": "", "docstring": "Build documentation artifacts.\n\nThis command performs the full documentation build pipeline:\n\n1. Introspects the Python project using Griffe\n2. Generates renderer-specific documentation sources\n3. Optionally builds the final documentation output\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites\n- MCP structured documentation resources\n\nArgs:\n mcp: Enable MCP documentation generation.\n mkdocs: Enable MkDocs documentation generation.\n module_is_source: Treat the specified module directory as the\n project root.\n module: Python module import path to document.\n project_name: Optional override for the project name.\n site_name: Display name for the MkDocs site.\n docs_dir: Directory where Markdown documentation sources\n will be generated.\n nav_file: Path to the navigation specification file.\n template: Optional custom MkDocs configuration template.\n mkdocs_yml: Output path for the generated MkDocs configuration.\n out_dir: Output directory for generated MCP resources.\n\nRaises:\n click.UsageError: If required options are missing or conflicting." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", "signature": "", "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp: Serve documentation using the MCP server.\n mkdocs: Serve the MkDocs development site.\n module: Python module import path to serve via MCP.\n mkdocs_yml: Path to the MkDocs configuration file.\n out_dir: Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError: If invalid or conflicting options are provided." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", "signature": "", "docstring": "Display the documentation object tree for a module.\n\nThis command introspects the specified module and prints a\nhierarchical representation of the discovered documentation\nobjects, including modules, classes, functions, and members.\n\nArgs:\n module: Python module import path to introspect.\n project_name: Optional name to display as the project root." }, "Group": { "name": "Group", "kind": "alias", "path": "docforge.cli.commands.Group", "signature": "", "docstring": null }, "Any": { "name": "Any", "kind": "alias", "path": "docforge.cli.commands.Any", "signature": "", "docstring": null } } }, "mcp_utils": { "name": "mcp_utils", "kind": "module", "path": "docforge.cli.mcp_utils", "signature": null, "docstring": null, "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.cli.mcp_utils.Path", "signature": "", "docstring": null }, "click": { "name": "click", "kind": "alias", "path": "docforge.cli.mcp_utils.click", "signature": "", "docstring": null }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.cli.mcp_utils.GriffeLoader", "signature": "", "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_module", "signature": "", "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.cli.mcp_utils.discover_module_paths", "signature": "", "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for ``.py`` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing ``__init__.py`` are treated as packages.\n- Each ``.py`` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name: Top-level package name to discover modules from.\n project_root: Root directory used to resolve module paths. If not\n provided, the current working directory is used.\n\nReturns:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError: If the specified package directory does not exist." }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.cli.mcp_utils.MCPRenderer", "signature": "", "docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.cli.mcp_utils.MCPRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.mcp_utils.MCPRenderer.generate_sources", "signature": "", "docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as ``nav.json`` and ``index.json``.\n\nArgs:\n project: Documentation project model to render.\n out_dir: Directory where MCP resources will be written." } } }, "MCPServer": { "name": "MCPServer", "kind": "class", "path": "docforge.cli.mcp_utils.MCPServer", "signature": "", "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", "members": { "mcp_root": { "name": "mcp_root", "kind": "attribute", "path": "docforge.cli.mcp_utils.MCPServer.mcp_root", "signature": "", "docstring": null }, "app": { "name": "app", "kind": "attribute", "path": "docforge.cli.mcp_utils.MCPServer.app", "signature": "", "docstring": null }, "run": { "name": "run", "kind": "function", "path": "docforge.cli.mcp_utils.MCPServer.run", "signature": "", "docstring": "Start the MCP server.\n\nArgs:\n transport: Transport mechanism used by the MCP server. Supported\n options include ``stdio``, ``sse``, and ``streamable-http``." } } }, "generate_resources": { "name": "generate_resources", "kind": "function", "path": "docforge.cli.mcp_utils.generate_resources", "signature": "", "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module: Python module import path used as the entry point for\n documentation generation.\n project_name: Optional override for the project name used in\n generated documentation metadata.\n out_dir: Directory where MCP resources (index.json, nav.json,\n and module data) will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", "signature": "", "docstring": "Start an MCP server for a pre-generated documentation bundle.\n\nThe server exposes documentation resources such as project metadata,\nnavigation structure, and module documentation through MCP endpoints.\n\nArgs:\n module: Python module import path used to identify the served\n documentation instance.\n mcp_root: Path to the directory containing the MCP documentation\n bundle (index.json, nav.json, and modules/).\n\nRaises:\n click.ClickException: If the MCP documentation bundle is missing\n required files or directories." } } }, "mkdocs_utils": { "name": "mkdocs_utils", "kind": "module", "path": "docforge.cli.mkdocs_utils", "signature": null, "docstring": null, "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.cli.mkdocs_utils.Path", "signature": "", "docstring": null }, "resources": { "name": "resources", "kind": "alias", "path": "docforge.cli.mkdocs_utils.resources", "signature": "", "docstring": null }, "click": { "name": "click", "kind": "alias", "path": "docforge.cli.mkdocs_utils.click", "signature": "", "docstring": null }, "yaml": { "name": "yaml", "kind": "alias", "path": "docforge.cli.mkdocs_utils.yaml", "signature": "", "docstring": null }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.cli.mkdocs_utils.GriffeLoader", "signature": "", "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_module", "signature": "", "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.cli.mkdocs_utils.discover_module_paths", "signature": "", "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for ``.py`` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing ``__init__.py`` are treated as packages.\n- Each ``.py`` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name: Top-level package name to discover modules from.\n project_root: Root directory used to resolve module paths. If not\n provided, the current working directory is used.\n\nReturns:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError: If the specified package directory does not exist." }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer", "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_sources", "signature": "", "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project: Project model containing modules to document.\n out_dir: Directory where generated Markdown files will be written.\n module_is_source: If True, treat the specified module as the\n documentation root rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", "docstring": "Generate a ``README.md`` file from the root module docstring.\n\nBehavior:\n\n- If ``module_is_source`` is True, ``README.md`` is written to the\n project root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project: Project model containing documentation metadata.\n docs_dir: Directory containing generated documentation sources.\n module_is_source: Whether the module is treated as the project\n source root." } } }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.mkdocs_utils.load_nav_spec", "signature": "", "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.mkdocs_utils.resolve_nav", "signature": "", "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", "signature": "", "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_sources", "signature": "", "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module: Python module import path used as the entry point for\n documentation generation.\n docs_dir: Directory where the generated Markdown files will be written.\n project_name: Optional override for the project name used in\n documentation metadata.\n module_is_source: If True, treat the specified module directory as\n the project root rather than a nested module." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", "signature": "", "docstring": "Generate an ``mkdocs.yml`` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir: Directory containing generated documentation Markdown files.\n nav_file: Path to the ``docforge.nav.yml`` navigation specification.\n template: Optional path to a custom MkDocs configuration template.\n If not provided, a built-in template will be used.\n out: Destination path where the generated ``mkdocs.yml`` file\n will be written.\n site_name: Display name for the generated documentation site.\n\nRaises:\n click.FileError: If the navigation specification or template\n file cannot be found." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", "signature": "", "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\n\nArgs:\n mkdocs_yml: Path to the ``mkdocs.yml`` configuration file.\n\nRaises:\n click.ClickException: If the configuration file does not exist." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", "signature": "", "docstring": "Start an MkDocs development server with live reload.\n\nThe server watches documentation files and automatically reloads\nthe site when changes are detected.\n\nArgs:\n mkdocs_yml: Path to the ``mkdocs.yml`` configuration file.\n\nRaises:\n click.ClickException: If the configuration file does not exist." } } } } }, "loaders": { "name": "loaders", "kind": "module", "path": "docforge.loaders", "signature": null, "docstring": "Loader layer for doc-forge.\n\nThe ``docforge.loaders`` package is responsible for discovering Python modules\nand extracting documentation data using static analysis.\n\n---\n\nOverview\n--------\n\nThis layer converts Python source code into an intermediate documentation\nmodel used by doc-forge. It performs module discovery, introspection, and\ninitial filtering before the data is passed to the core documentation models.\n\nCore capabilities include:\n\n- **Module discovery** – Locate Python modules and packages within a project.\n- **Static introspection** – Parse docstrings, signatures, and object\n hierarchies using the ``griffe`` library without executing the code.\n- **Public API filtering** – Exclude private members (names prefixed with\n ``_``) to produce clean public documentation structures.\n\n---", "members": { "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.GriffeLoader", "signature": "", "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_module", "signature": "", "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.discover_module_paths", "signature": "", "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for ``.py`` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing ``__init__.py`` are treated as packages.\n- Each ``.py`` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name: Top-level package name to discover modules from.\n project_root: Root directory used to resolve module paths. If not\n provided, the current working directory is used.\n\nReturns:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError: If the specified package directory does not exist." }, "griffe_loader": { "name": "griffe_loader", "kind": "module", "path": "docforge.loaders.griffe_loader", "signature": null, "docstring": "Utilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the ``GriffeLoader`` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.", "members": { "logging": { "name": "logging", "kind": "alias", "path": "docforge.loaders.griffe_loader.logging", "signature": "", "docstring": null }, "Path": { "name": "Path", "kind": "alias", "path": "docforge.loaders.griffe_loader.Path", "signature": "", "docstring": null }, "List": { "name": "List", "kind": "alias", "path": "docforge.loaders.griffe_loader.List", "signature": "", "docstring": null }, "Optional": { "name": "Optional", "kind": "alias", "path": "docforge.loaders.griffe_loader.Optional", "signature": "", "docstring": null }, "ModulesCollection": { "name": "ModulesCollection", "kind": "alias", "path": "docforge.loaders.griffe_loader.ModulesCollection", "signature": "", "docstring": null }, "LinesCollection": { "name": "LinesCollection", "kind": "alias", "path": "docforge.loaders.griffe_loader.LinesCollection", "signature": "", "docstring": null }, "Object": { "name": "Object", "kind": "alias", "path": "docforge.loaders.griffe_loader.Object", "signature": "", "docstring": null }, "AliasResolutionError": { "name": "AliasResolutionError", "kind": "alias", "path": "docforge.loaders.griffe_loader.AliasResolutionError", "signature": "", "docstring": null }, "Module": { "name": "Module", "kind": "class", "path": "docforge.loaders.griffe_loader.Module", "signature": "", "docstring": "Representation of a documented Python module or package.\n\nA ``Module`` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level documentation string, if present.\n members: Mapping of object names to their corresponding\n ``DocObject`` representations.", "members": { "path": { "name": "path", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Module.path", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Module.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Module.members", "signature": "", "docstring": null }, "add_object": { "name": "add_object", "kind": "function", "path": "docforge.loaders.griffe_loader.Module.add_object", "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj: Documentation object to register as a top-level\n member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.loaders.griffe_loader.Module.get_object", "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name: Name of the object to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.loaders.griffe_loader.Module.get_all_objects", "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n An iterable of ``DocObject`` instances representing the\n module's public members." } } }, "Project": { "name": "Project", "kind": "class", "path": "docforge.loaders.griffe_loader.Project", "signature": "", "docstring": "Representation of a documentation project.\n\nA ``Project`` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name: Name of the project.\n modules: Mapping of module paths to ``Module`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Project.name", "signature": "", "docstring": null }, "modules": { "name": "modules", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Project.modules", "signature": "", "docstring": null }, "add_module": { "name": "add_module", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.add_module", "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module: Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.get_module", "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path: Fully qualified dotted module path (for example ``pkg.module``).\n\nReturns:\n The corresponding ``Module`` instance.\n\nRaises:\n KeyError: If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.get_all_modules", "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n An iterable of ``Module`` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.get_module_list", "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n A list containing the dotted paths of all modules in the project." } } }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.loaders.griffe_loader.DocObject", "signature": "", "docstring": "Representation of a documented Python object.\n\nA ``DocObject`` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (for example ``class``, ``function``,\n ``method``, or ``attribute``).\n path: Fully qualified dotted path to the object.\n signature: Callable signature if the object represents a callable.\n docstring: Raw docstring text extracted from the source code.\n members: Mapping of member names to child ``DocObject`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.loaders.griffe_loader.DocObject.name", "signature": "", "docstring": null }, "kind": { "name": "kind", "kind": "attribute", "path": "docforge.loaders.griffe_loader.DocObject.kind", "signature": "", "docstring": null }, "path": { "name": "path", "kind": "attribute", "path": "docforge.loaders.griffe_loader.DocObject.path", "signature": "", "docstring": null }, "signature": { "name": "signature", "kind": "attribute", "path": "docforge.loaders.griffe_loader.DocObject.signature", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.loaders.griffe_loader.DocObject.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.loaders.griffe_loader.DocObject.members", "signature": "", "docstring": null }, "add_member": { "name": "add_member", "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.add_member", "signature": "", "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.get_member", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: Name of the member to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If the member does not exist." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", "signature": "", "docstring": "Return all child members of the object.\n\nReturns:\n An iterable of ``DocObject`` instances representing nested members." } } }, "logger": { "name": "logger", "kind": "attribute", "path": "docforge.loaders.griffe_loader.logger", "signature": null, "docstring": null }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.griffe_loader.discover_module_paths", "signature": "", "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for ``.py`` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing ``__init__.py`` are treated as packages.\n- Each ``.py`` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name: Top-level package name to discover modules from.\n project_root: Root directory used to resolve module paths. If not\n provided, the current working directory is used.\n\nReturns:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError: If the specified package directory does not exist." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", "signature": "", "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into ``Project``, ``Module``,\nand ``DocObject`` instances used by doc-forge.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a ``Module``\ninstance. All modules are then aggregated into a single ``Project``\nobject.\n\nArgs:\n module_paths: List of dotted module import paths to load.\n project_name: Optional override for the project name. Defaults\n to the top-level name of the first module.\n skip_import_errors: If True, modules that fail to load will be\n skipped instead of raising an error.\n\nReturns:\n A populated ``Project`` instance containing the loaded modules.\n\nRaises:\n ValueError: If no module paths are provided.\n ImportError: If a module fails to load and\n ``skip_import_errors`` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", "signature": "", "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge ``Module`` model.\n\nArgs:\n path: Dotted import path of the module.\n\nReturns:\n A populated ``Module`` instance." } } } } } } }, "models": { "name": "models", "kind": "module", "path": "docforge.models", "signature": null, "docstring": "Model layer for doc-forge.\n\nThe ``docforge.models`` package defines the core data structures used to\nrepresent Python source code as a structured documentation model.\n\n---\n\nOverview\n--------\n\nThe model layer forms the central intermediate representation used throughout\ndoc-forge. Python modules and objects discovered during introspection are\nconverted into a hierarchy of documentation models that can later be rendered\ninto different documentation formats.\n\nKey components:\n\n- **Project** – Root container representing an entire documented codebase.\n- **Module** – Representation of a Python module or package containing\n documented members.\n- **DocObject** – Recursive structure representing Python objects such as\n classes, functions, methods, and attributes.\n\nThese models are intentionally **renderer-agnostic**, allowing the same\ndocumentation structure to be transformed into multiple output formats\n(e.g., MkDocs, MCP, or other renderers).\n\n---", "members": { "Project": { "name": "Project", "kind": "class", "path": "docforge.models.Project", "signature": "", "docstring": "Representation of a documentation project.\n\nA ``Project`` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name: Name of the project.\n modules: Mapping of module paths to ``Module`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.models.Project.name", "signature": "", "docstring": null }, "modules": { "name": "modules", "kind": "attribute", "path": "docforge.models.Project.modules", "signature": "", "docstring": null }, "add_module": { "name": "add_module", "kind": "function", "path": "docforge.models.Project.add_module", "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module: Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.models.Project.get_module", "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path: Fully qualified dotted module path (for example ``pkg.module``).\n\nReturns:\n The corresponding ``Module`` instance.\n\nRaises:\n KeyError: If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.models.Project.get_all_modules", "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n An iterable of ``Module`` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.models.Project.get_module_list", "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n A list containing the dotted paths of all modules in the project." } } }, "Module": { "name": "Module", "kind": "class", "path": "docforge.models.Module", "signature": "", "docstring": "Representation of a documented Python module or package.\n\nA ``Module`` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level documentation string, if present.\n members: Mapping of object names to their corresponding\n ``DocObject`` representations.", "members": { "path": { "name": "path", "kind": "attribute", "path": "docforge.models.Module.path", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.models.Module.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.models.Module.members", "signature": "", "docstring": null }, "add_object": { "name": "add_object", "kind": "function", "path": "docforge.models.Module.add_object", "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj: Documentation object to register as a top-level\n member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.Module.get_object", "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name: Name of the object to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.Module.get_all_objects", "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n An iterable of ``DocObject`` instances representing the\n module's public members." } } }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.models.DocObject", "signature": "", "docstring": "Representation of a documented Python object.\n\nA ``DocObject`` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (for example ``class``, ``function``,\n ``method``, or ``attribute``).\n path: Fully qualified dotted path to the object.\n signature: Callable signature if the object represents a callable.\n docstring: Raw docstring text extracted from the source code.\n members: Mapping of member names to child ``DocObject`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.models.DocObject.name", "signature": "", "docstring": null }, "kind": { "name": "kind", "kind": "attribute", "path": "docforge.models.DocObject.kind", "signature": "", "docstring": null }, "path": { "name": "path", "kind": "attribute", "path": "docforge.models.DocObject.path", "signature": "", "docstring": null }, "signature": { "name": "signature", "kind": "attribute", "path": "docforge.models.DocObject.signature", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.models.DocObject.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.models.DocObject.members", "signature": "", "docstring": null }, "add_member": { "name": "add_member", "kind": "function", "path": "docforge.models.DocObject.add_member", "signature": "", "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.DocObject.get_member", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: Name of the member to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If the member does not exist." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.DocObject.get_all_members", "signature": "", "docstring": "Return all child members of the object.\n\nReturns:\n An iterable of ``DocObject`` instances representing nested members." } } }, "module": { "name": "module", "kind": "module", "path": "docforge.models.module", "signature": null, "docstring": "Documentation model representing a Python module or package.\n\nThis module defines the ``Module`` class used in the doc-forge documentation\nmodel. A ``Module`` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.", "members": { "Dict": { "name": "Dict", "kind": "alias", "path": "docforge.models.module.Dict", "signature": "", "docstring": null }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.module.Iterable", "signature": "", "docstring": null }, "Optional": { "name": "Optional", "kind": "alias", "path": "docforge.models.module.Optional", "signature": "", "docstring": null }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.models.module.DocObject", "signature": "", "docstring": "Representation of a documented Python object.\n\nA ``DocObject`` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (for example ``class``, ``function``,\n ``method``, or ``attribute``).\n path: Fully qualified dotted path to the object.\n signature: Callable signature if the object represents a callable.\n docstring: Raw docstring text extracted from the source code.\n members: Mapping of member names to child ``DocObject`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.models.module.DocObject.name", "signature": "", "docstring": null }, "kind": { "name": "kind", "kind": "attribute", "path": "docforge.models.module.DocObject.kind", "signature": "", "docstring": null }, "path": { "name": "path", "kind": "attribute", "path": "docforge.models.module.DocObject.path", "signature": "", "docstring": null }, "signature": { "name": "signature", "kind": "attribute", "path": "docforge.models.module.DocObject.signature", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.models.module.DocObject.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.models.module.DocObject.members", "signature": "", "docstring": null }, "add_member": { "name": "add_member", "kind": "function", "path": "docforge.models.module.DocObject.add_member", "signature": "", "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.module.DocObject.get_member", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: Name of the member to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If the member does not exist." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.module.DocObject.get_all_members", "signature": "", "docstring": "Return all child members of the object.\n\nReturns:\n An iterable of ``DocObject`` instances representing nested members." } } }, "Module": { "name": "Module", "kind": "class", "path": "docforge.models.module.Module", "signature": "", "docstring": "Representation of a documented Python module or package.\n\nA ``Module`` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level documentation string, if present.\n members: Mapping of object names to their corresponding\n ``DocObject`` representations.", "members": { "path": { "name": "path", "kind": "attribute", "path": "docforge.models.module.Module.path", "signature": null, "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.models.module.Module.docstring", "signature": null, "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.models.module.Module.members", "signature": null, "docstring": null }, "add_object": { "name": "add_object", "kind": "function", "path": "docforge.models.module.Module.add_object", "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj: Documentation object to register as a top-level\n member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.module.Module.get_object", "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name: Name of the object to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.module.Module.get_all_objects", "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n An iterable of ``DocObject`` instances representing the\n module's public members." } } } } }, "object": { "name": "object", "kind": "module", "path": "docforge.models.object", "signature": null, "docstring": "Documentation model representing individual Python objects.\n\nThis module defines the ``DocObject`` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each ``DocObject`` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.", "members": { "Dict": { "name": "Dict", "kind": "alias", "path": "docforge.models.object.Dict", "signature": "", "docstring": null }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.object.Iterable", "signature": "", "docstring": null }, "Optional": { "name": "Optional", "kind": "alias", "path": "docforge.models.object.Optional", "signature": "", "docstring": null }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.models.object.DocObject", "signature": "", "docstring": "Representation of a documented Python object.\n\nA ``DocObject`` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (for example ``class``, ``function``,\n ``method``, or ``attribute``).\n path: Fully qualified dotted path to the object.\n signature: Callable signature if the object represents a callable.\n docstring: Raw docstring text extracted from the source code.\n members: Mapping of member names to child ``DocObject`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.models.object.DocObject.name", "signature": null, "docstring": null }, "kind": { "name": "kind", "kind": "attribute", "path": "docforge.models.object.DocObject.kind", "signature": null, "docstring": null }, "path": { "name": "path", "kind": "attribute", "path": "docforge.models.object.DocObject.path", "signature": null, "docstring": null }, "signature": { "name": "signature", "kind": "attribute", "path": "docforge.models.object.DocObject.signature", "signature": null, "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.models.object.DocObject.docstring", "signature": null, "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.models.object.DocObject.members", "signature": null, "docstring": null }, "add_member": { "name": "add_member", "kind": "function", "path": "docforge.models.object.DocObject.add_member", "signature": "", "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.object.DocObject.get_member", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: Name of the member to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If the member does not exist." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.object.DocObject.get_all_members", "signature": "", "docstring": "Return all child members of the object.\n\nReturns:\n An iterable of ``DocObject`` instances representing nested members." } } } } }, "project": { "name": "project", "kind": "module", "path": "docforge.models.project", "signature": null, "docstring": "Documentation model representing a project.\n\nThis module defines the ``Project`` class, the top-level container used by\ndoc-forge to represent a documented codebase. A ``Project`` aggregates multiple\nmodules and provides access to them through a unified interface.", "members": { "Dict": { "name": "Dict", "kind": "alias", "path": "docforge.models.project.Dict", "signature": "", "docstring": null }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.project.Iterable", "signature": "", "docstring": null }, "Module": { "name": "Module", "kind": "class", "path": "docforge.models.project.Module", "signature": "", "docstring": "Representation of a documented Python module or package.\n\nA ``Module`` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level documentation string, if present.\n members: Mapping of object names to their corresponding\n ``DocObject`` representations.", "members": { "path": { "name": "path", "kind": "attribute", "path": "docforge.models.project.Module.path", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.models.project.Module.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.models.project.Module.members", "signature": "", "docstring": null }, "add_object": { "name": "add_object", "kind": "function", "path": "docforge.models.project.Module.add_object", "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj: Documentation object to register as a top-level\n member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.project.Module.get_object", "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name: Name of the object to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.project.Module.get_all_objects", "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n An iterable of ``DocObject`` instances representing the\n module's public members." } } }, "Project": { "name": "Project", "kind": "class", "path": "docforge.models.project.Project", "signature": "", "docstring": "Representation of a documentation project.\n\nA ``Project`` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name: Name of the project.\n modules: Mapping of module paths to ``Module`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.models.project.Project.name", "signature": null, "docstring": null }, "modules": { "name": "modules", "kind": "attribute", "path": "docforge.models.project.Project.modules", "signature": null, "docstring": null }, "add_module": { "name": "add_module", "kind": "function", "path": "docforge.models.project.Project.add_module", "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module: Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.models.project.Project.get_module", "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path: Fully qualified dotted module path (for example ``pkg.module``).\n\nReturns:\n The corresponding ``Module`` instance.\n\nRaises:\n KeyError: If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.models.project.Project.get_all_modules", "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n An iterable of ``Module`` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.models.project.Project.get_module_list", "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n A list containing the dotted paths of all modules in the project." } } } } } } }, "nav": { "name": "nav", "kind": "module", "path": "docforge.nav", "signature": null, "docstring": "Navigation layer for doc-forge.\n\nThe ``docforge.nav`` package manages the relationship between the logical\ndocumentation structure defined by the user and the physical documentation\nfiles generated on disk.\n\n---\n\nWorkflow\n--------\n\n1. **Specification** – Users define navigation intent in ``docforge.nav.yml``.\n2. **Resolution** – ``resolve_nav`` expands patterns and matches them against\n generated Markdown files.\n3. **Emission** – ``MkDocsNavEmitter`` converts the resolved structure into\n the YAML navigation format required by ``mkdocs.yml``.\n\nThis layer separates documentation organization from the underlying source\ncode layout, enabling flexible grouping, ordering, and navigation structures\nindependent of module hierarchy.\n\n---", "members": { "NavSpec": { "name": "NavSpec", "kind": "class", "path": "docforge.nav.NavSpec", "signature": "", "docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.", "members": { "home": { "name": "home", "kind": "attribute", "path": "docforge.nav.NavSpec.home", "signature": "", "docstring": null }, "groups": { "name": "groups", "kind": "attribute", "path": "docforge.nav.NavSpec.groups", "signature": "", "docstring": null }, "load": { "name": "load", "kind": "function", "path": "docforge.nav.NavSpec.load", "signature": "", "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.NavSpec.all_patterns", "signature": "", "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.load_nav_spec", "signature": "", "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "ResolvedNav": { "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.ResolvedNav", "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { "name": "home", "kind": "attribute", "path": "docforge.nav.ResolvedNav.home", "signature": "", "docstring": null }, "groups": { "name": "groups", "kind": "attribute", "path": "docforge.nav.ResolvedNav.groups", "signature": "", "docstring": null }, "all_files": { "name": "all_files", "kind": "function", "path": "docforge.nav.ResolvedNav.all_files", "signature": "", "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolve_nav", "signature": "", "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.nav.MkDocsNavEmitter", "signature": "", "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.nav.MkDocsNavEmitter.emit", "signature": "", "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, "mkdocs": { "name": "mkdocs", "kind": "module", "path": "docforge.nav.mkdocs", "signature": null, "docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.", "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.nav.mkdocs.Path", "signature": "", "docstring": null }, "List": { "name": "List", "kind": "alias", "path": "docforge.nav.mkdocs.List", "signature": "", "docstring": null }, "Dict": { "name": "Dict", "kind": "alias", "path": "docforge.nav.mkdocs.Dict", "signature": "", "docstring": null }, "Any": { "name": "Any", "kind": "alias", "path": "docforge.nav.mkdocs.Any", "signature": "", "docstring": null }, "ResolvedNav": { "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.mkdocs.ResolvedNav", "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { "name": "home", "kind": "attribute", "path": "docforge.nav.mkdocs.ResolvedNav.home", "signature": "", "docstring": null }, "groups": { "name": "groups", "kind": "attribute", "path": "docforge.nav.mkdocs.ResolvedNav.groups", "signature": "", "docstring": null }, "all_files": { "name": "all_files", "kind": "function", "path": "docforge.nav.mkdocs.ResolvedNav.all_files", "signature": "", "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.nav.mkdocs.MkDocsNavEmitter", "signature": "", "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit", "signature": "", "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } } } }, "resolver": { "name": "resolver", "kind": "module", "path": "docforge.nav.resolver", "signature": null, "docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.", "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.nav.resolver.Path", "signature": "", "docstring": null }, "Dict": { "name": "Dict", "kind": "alias", "path": "docforge.nav.resolver.Dict", "signature": "", "docstring": null }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.nav.resolver.Iterable", "signature": "", "docstring": null }, "List": { "name": "List", "kind": "alias", "path": "docforge.nav.resolver.List", "signature": "", "docstring": null }, "glob": { "name": "glob", "kind": "alias", "path": "docforge.nav.resolver.glob", "signature": "", "docstring": null }, "NavSpec": { "name": "NavSpec", "kind": "class", "path": "docforge.nav.resolver.NavSpec", "signature": "", "docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.", "members": { "home": { "name": "home", "kind": "attribute", "path": "docforge.nav.resolver.NavSpec.home", "signature": "", "docstring": null }, "groups": { "name": "groups", "kind": "attribute", "path": "docforge.nav.resolver.NavSpec.groups", "signature": "", "docstring": null }, "load": { "name": "load", "kind": "function", "path": "docforge.nav.resolver.NavSpec.load", "signature": "", "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.resolver.NavSpec.all_patterns", "signature": "", "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, "ResolvedNav": { "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.resolver.ResolvedNav", "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { "name": "home", "kind": "attribute", "path": "docforge.nav.resolver.ResolvedNav.home", "signature": null, "docstring": null }, "groups": { "name": "groups", "kind": "attribute", "path": "docforge.nav.resolver.ResolvedNav.groups", "signature": null, "docstring": null }, "all_files": { "name": "all_files", "kind": "function", "path": "docforge.nav.resolver.ResolvedNav.all_files", "signature": "", "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolver.resolve_nav", "signature": "", "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "Optional": { "name": "Optional", "kind": "alias", "path": "docforge.nav.resolver.Optional", "signature": "", "docstring": null } } }, "spec": { "name": "spec", "kind": "module", "path": "docforge.nav.spec", "signature": null, "docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).", "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.nav.spec.Path", "signature": "", "docstring": null }, "Dict": { "name": "Dict", "kind": "alias", "path": "docforge.nav.spec.Dict", "signature": "", "docstring": null }, "List": { "name": "List", "kind": "alias", "path": "docforge.nav.spec.List", "signature": "", "docstring": null }, "Optional": { "name": "Optional", "kind": "alias", "path": "docforge.nav.spec.Optional", "signature": "", "docstring": null }, "yaml": { "name": "yaml", "kind": "alias", "path": "docforge.nav.spec.yaml", "signature": "", "docstring": null }, "NavSpec": { "name": "NavSpec", "kind": "class", "path": "docforge.nav.spec.NavSpec", "signature": "", "docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.", "members": { "home": { "name": "home", "kind": "attribute", "path": "docforge.nav.spec.NavSpec.home", "signature": null, "docstring": null }, "groups": { "name": "groups", "kind": "attribute", "path": "docforge.nav.spec.NavSpec.groups", "signature": null, "docstring": null }, "load": { "name": "load", "kind": "function", "path": "docforge.nav.spec.NavSpec.load", "signature": "", "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.spec.NavSpec.all_patterns", "signature": "", "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.spec.load_nav_spec", "signature": "", "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." } } } } }, "renderers": { "name": "renderers", "kind": "module", "path": "docforge.renderers", "signature": null, "docstring": "Renderers layer for doc-forge.\n\nThe ``docforge.renderers`` package transforms the internal documentation\nmodels into files formatted for specific documentation systems.\n\n---\n\nOverview\n--------\n\nRenderers consume the doc-forge project model and generate output suitable\nfor documentation tools or machine interfaces.\n\nCurrent implementations:\n\n- **MkDocsRenderer** – Produces Markdown files compatible with MkDocs and\n the ``mkdocstrings`` plugin. It automatically handles package hierarchy\n and generates ``index.md`` files for packages.\n- **MCPRenderer** – Emits structured JSON resources designed for consumption\n by Model Context Protocol (MCP) clients.\n\n---\n\nExtending\n---------\n\nNew renderers can be added by implementing the ``DocRenderer`` protocol\ndefined in ``docforge.renderers.base``.\n\n---", "members": { "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.MkDocsRenderer", "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.MkDocsRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.renderers.MkDocsRenderer.generate_sources", "signature": "", "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project: Project model containing modules to document.\n out_dir: Directory where generated Markdown files will be written.\n module_is_source: If True, treat the specified module as the\n documentation root rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.MkDocsRenderer.generate_readme", "signature": "", "docstring": "Generate a ``README.md`` file from the root module docstring.\n\nBehavior:\n\n- If ``module_is_source`` is True, ``README.md`` is written to the\n project root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project: Project model containing documentation metadata.\n docs_dir: Directory containing generated documentation sources.\n module_is_source: Whether the module is treated as the project\n source root." } } }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.renderers.MCPRenderer", "signature": "", "docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.MCPRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.renderers.MCPRenderer.generate_sources", "signature": "", "docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as ``nav.json`` and ``index.json``.\n\nArgs:\n project: Documentation project model to render.\n out_dir: Directory where MCP resources will be written." } } }, "base": { "name": "base", "kind": "module", "path": "docforge.renderers.base", "signature": null, "docstring": "Renderer base interfaces and configuration models.\n\nThis module defines the base protocol and configuration container used by\ndoc-forge renderers. Concrete renderer implementations should implement the\n``DocRenderer`` protocol.", "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.renderers.base.Path", "signature": "", "docstring": null }, "Protocol": { "name": "Protocol", "kind": "alias", "path": "docforge.renderers.base.Protocol", "signature": "", "docstring": null }, "Project": { "name": "Project", "kind": "class", "path": "docforge.renderers.base.Project", "signature": "", "docstring": "Representation of a documentation project.\n\nA ``Project`` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name: Name of the project.\n modules: Mapping of module paths to ``Module`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.base.Project.name", "signature": "", "docstring": null }, "modules": { "name": "modules", "kind": "attribute", "path": "docforge.renderers.base.Project.modules", "signature": "", "docstring": null }, "add_module": { "name": "add_module", "kind": "function", "path": "docforge.renderers.base.Project.add_module", "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module: Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.renderers.base.Project.get_module", "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path: Fully qualified dotted module path (for example ``pkg.module``).\n\nReturns:\n The corresponding ``Module`` instance.\n\nRaises:\n KeyError: If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.renderers.base.Project.get_all_modules", "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n An iterable of ``Module`` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.renderers.base.Project.get_module_list", "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n A list containing the dotted paths of all modules in the project." } } }, "RendererConfig": { "name": "RendererConfig", "kind": "class", "path": "docforge.renderers.base.RendererConfig", "signature": "", "docstring": "Configuration container for documentation renderers.\n\nA ``RendererConfig`` instance groups together the project model and the\noutput directory used during rendering.\n\nAttributes:\n out_dir: Directory where generated documentation files will be written.\n project: Documentation project model to be rendered.", "members": { "out_dir": { "name": "out_dir", "kind": "attribute", "path": "docforge.renderers.base.RendererConfig.out_dir", "signature": null, "docstring": null }, "project": { "name": "project", "kind": "attribute", "path": "docforge.renderers.base.RendererConfig.project", "signature": null, "docstring": null } } }, "DocRenderer": { "name": "DocRenderer", "kind": "class", "path": "docforge.renderers.base.DocRenderer", "signature": "", "docstring": "Protocol defining the interface for documentation renderers.\n\nImplementations of this protocol are responsible for transforming a\n``Project`` model into renderer-specific documentation sources.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.base.DocRenderer.name", "signature": null, "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.renderers.base.DocRenderer.generate_sources", "signature": "", "docstring": "Generate renderer-specific documentation sources.\n\nArgs:\n project: Project model containing modules and documentation objects.\n out_dir: Directory where generated documentation sources\n should be written." } } } } }, "mcp_renderer": { "name": "mcp_renderer", "kind": "module", "path": "docforge.renderers.mcp_renderer", "signature": null, "docstring": null, "members": { "json": { "name": "json", "kind": "alias", "path": "docforge.renderers.mcp_renderer.json", "signature": "", "docstring": null }, "Path": { "name": "Path", "kind": "alias", "path": "docforge.renderers.mcp_renderer.Path", "signature": "", "docstring": null }, "Dict": { "name": "Dict", "kind": "alias", "path": "docforge.renderers.mcp_renderer.Dict", "signature": "", "docstring": null }, "List": { "name": "List", "kind": "alias", "path": "docforge.renderers.mcp_renderer.List", "signature": "", "docstring": null }, "Project": { "name": "Project", "kind": "class", "path": "docforge.renderers.mcp_renderer.Project", "signature": "", "docstring": "Representation of a documentation project.\n\nA ``Project`` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name: Name of the project.\n modules: Mapping of module paths to ``Module`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.Project.name", "signature": "", "docstring": null }, "modules": { "name": "modules", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.Project.modules", "signature": "", "docstring": null }, "add_module": { "name": "add_module", "kind": "function", "path": "docforge.renderers.mcp_renderer.Project.add_module", "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module: Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.renderers.mcp_renderer.Project.get_module", "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path: Fully qualified dotted module path (for example ``pkg.module``).\n\nReturns:\n The corresponding ``Module`` instance.\n\nRaises:\n KeyError: If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.renderers.mcp_renderer.Project.get_all_modules", "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n An iterable of ``Module`` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.renderers.mcp_renderer.Project.get_module_list", "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n A list containing the dotted paths of all modules in the project." } } }, "Module": { "name": "Module", "kind": "class", "path": "docforge.renderers.mcp_renderer.Module", "signature": "", "docstring": "Representation of a documented Python module or package.\n\nA ``Module`` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level documentation string, if present.\n members: Mapping of object names to their corresponding\n ``DocObject`` representations.", "members": { "path": { "name": "path", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.Module.path", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.Module.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.Module.members", "signature": "", "docstring": null }, "add_object": { "name": "add_object", "kind": "function", "path": "docforge.renderers.mcp_renderer.Module.add_object", "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj: Documentation object to register as a top-level\n member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.renderers.mcp_renderer.Module.get_object", "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name: Name of the object to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.renderers.mcp_renderer.Module.get_all_objects", "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n An iterable of ``DocObject`` instances representing the\n module's public members." } } }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.renderers.mcp_renderer.DocObject", "signature": "", "docstring": "Representation of a documented Python object.\n\nA ``DocObject`` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (for example ``class``, ``function``,\n ``method``, or ``attribute``).\n path: Fully qualified dotted path to the object.\n signature: Callable signature if the object represents a callable.\n docstring: Raw docstring text extracted from the source code.\n members: Mapping of member names to child ``DocObject`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.DocObject.name", "signature": "", "docstring": null }, "kind": { "name": "kind", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.DocObject.kind", "signature": "", "docstring": null }, "path": { "name": "path", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.DocObject.path", "signature": "", "docstring": null }, "signature": { "name": "signature", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.DocObject.signature", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.DocObject.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.DocObject.members", "signature": "", "docstring": null }, "add_member": { "name": "add_member", "kind": "function", "path": "docforge.renderers.mcp_renderer.DocObject.add_member", "signature": "", "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.renderers.mcp_renderer.DocObject.get_member", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: Name of the member to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If the member does not exist." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.renderers.mcp_renderer.DocObject.get_all_members", "signature": "", "docstring": "Return all child members of the object.\n\nReturns:\n An iterable of ``DocObject`` instances representing nested members." } } }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.renderers.mcp_renderer.MCPRenderer", "signature": "", "docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.mcp_renderer.MCPRenderer.name", "signature": null, "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.renderers.mcp_renderer.MCPRenderer.generate_sources", "signature": "", "docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as ``nav.json`` and ``index.json``.\n\nArgs:\n project: Documentation project model to render.\n out_dir: Directory where MCP resources will be written." } } } } }, "mkdocs_renderer": { "name": "mkdocs_renderer", "kind": "module", "path": "docforge.renderers.mkdocs_renderer", "signature": null, "docstring": "MkDocs renderer implementation.\n\nThis module defines the ``MkDocsRenderer`` class, which generates Markdown\ndocumentation sources compatible with MkDocs Material and the mkdocstrings\nplugin.\n\nThe renderer ensures a consistent documentation structure by:\n\n- Creating a root ``index.md`` if one does not exist\n- Generating package index pages automatically\n- Linking child modules within parent package pages\n- Optionally generating ``README.md`` from the root package docstring", "members": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.renderers.mkdocs_renderer.Path", "signature": "", "docstring": null }, "Project": { "name": "Project", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Project", "signature": "", "docstring": "Representation of a documentation project.\n\nA ``Project`` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name: Name of the project.\n modules: Mapping of module paths to ``Module`` instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.mkdocs_renderer.Project.name", "signature": "", "docstring": null }, "modules": { "name": "modules", "kind": "attribute", "path": "docforge.renderers.mkdocs_renderer.Project.modules", "signature": "", "docstring": null }, "add_module": { "name": "add_module", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Project.add_module", "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module: Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Project.get_module", "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path: Fully qualified dotted module path (for example ``pkg.module``).\n\nReturns:\n The corresponding ``Module`` instance.\n\nRaises:\n KeyError: If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n An iterable of ``Module`` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n A list containing the dotted paths of all modules in the project." } } }, "Module": { "name": "Module", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Module", "signature": "", "docstring": "Representation of a documented Python module or package.\n\nA ``Module`` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level documentation string, if present.\n members: Mapping of object names to their corresponding\n ``DocObject`` representations.", "members": { "path": { "name": "path", "kind": "attribute", "path": "docforge.renderers.mkdocs_renderer.Module.path", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.renderers.mkdocs_renderer.Module.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.renderers.mkdocs_renderer.Module.members", "signature": "", "docstring": null }, "add_object": { "name": "add_object", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Module.add_object", "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj: Documentation object to register as a top-level\n member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Module.get_object", "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name: Name of the object to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Module.get_all_objects", "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n An iterable of ``DocObject`` instances representing the\n module's public members." } } }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.name", "signature": null, "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", "signature": "", "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project: Project model containing modules to document.\n out_dir: Directory where generated Markdown files will be written.\n module_is_source: If True, treat the specified module as the\n documentation root rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", "signature": "", "docstring": "Generate a ``README.md`` file from the root module docstring.\n\nBehavior:\n\n- If ``module_is_source`` is True, ``README.md`` is written to the\n project root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project: Project model containing documentation metadata.\n docs_dir: Directory containing generated documentation sources.\n module_is_source: Whether the module is treated as the project\n source root." } } } } } } }, "servers": { "name": "servers", "kind": "module", "path": "docforge.servers", "signature": null, "docstring": "Server layer for doc-forge.\n\nThis module exposes server implementations used to provide live access\nto generated documentation resources. Currently, it includes the MCP\ndocumentation server.\n\n---", "members": { "MCPServer": { "name": "MCPServer", "kind": "class", "path": "docforge.servers.MCPServer", "signature": "", "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", "members": { "mcp_root": { "name": "mcp_root", "kind": "attribute", "path": "docforge.servers.MCPServer.mcp_root", "signature": "", "docstring": null }, "app": { "name": "app", "kind": "attribute", "path": "docforge.servers.MCPServer.app", "signature": "", "docstring": null }, "run": { "name": "run", "kind": "function", "path": "docforge.servers.MCPServer.run", "signature": "", "docstring": "Start the MCP server.\n\nArgs:\n transport: Transport mechanism used by the MCP server. Supported\n options include ``stdio``, ``sse``, and ``streamable-http``." } } }, "mcp_server": { "name": "mcp_server", "kind": "module", "path": "docforge.servers.mcp_server", "signature": null, "docstring": null, "members": { "annotations": { "name": "annotations", "kind": "alias", "path": "docforge.servers.mcp_server.annotations", "signature": "", "docstring": null }, "json": { "name": "json", "kind": "alias", "path": "docforge.servers.mcp_server.json", "signature": "", "docstring": null }, "Path": { "name": "Path", "kind": "alias", "path": "docforge.servers.mcp_server.Path", "signature": "", "docstring": null }, "Any": { "name": "Any", "kind": "alias", "path": "docforge.servers.mcp_server.Any", "signature": "", "docstring": null }, "Literal": { "name": "Literal", "kind": "alias", "path": "docforge.servers.mcp_server.Literal", "signature": "", "docstring": null }, "FastMCP": { "name": "FastMCP", "kind": "alias", "path": "docforge.servers.mcp_server.FastMCP", "signature": "", "docstring": null }, "MCPServer": { "name": "MCPServer", "kind": "class", "path": "docforge.servers.mcp_server.MCPServer", "signature": "", "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", "members": { "mcp_root": { "name": "mcp_root", "kind": "attribute", "path": "docforge.servers.mcp_server.MCPServer.mcp_root", "signature": null, "docstring": null }, "app": { "name": "app", "kind": "attribute", "path": "docforge.servers.mcp_server.MCPServer.app", "signature": null, "docstring": null }, "run": { "name": "run", "kind": "function", "path": "docforge.servers.mcp_server.MCPServer.run", "signature": "", "docstring": "Start the MCP server.\n\nArgs:\n transport: Transport mechanism used by the MCP server. Supported\n options include ``stdio``, ``sse``, and ``streamable-http``." } } } } } } } } } }