{ "module": "docforge", "content": { "path": "docforge", "docstring": "Renderer-agnostic Python documentation compiler that converts docstrings into\nstructured documentation for both humans (MkDocs) and machines (MCP / AI agents).\n\n`doc-forge` statically analyzes your source code, builds a semantic model of\nmodules and objects, and renders that model into documentation outputs without\nexecuting your code.\n---\n\n## Core Philosophy\n\n`doc-forge` follows a compiler architecture:\n\n1. **Front-end (Introspection)**\n Static analysis of modules, classes, functions, signatures, and docstrings.\n\n2. **Middle-end (Semantic Model)**\n Renderer-neutral structured representation of your API.\n\n3. **Back-end (Renderers)**\n\n * MkDocs → human documentation\n * MCP JSON → AI-readable documentation\n\nThe atomic unit of documentation is the Python import path.\n\nExample:\n\n```python\nfrom my_package.foo import Bar\n```\n---\n\n## Docstring Writing Standard\n\nDocstrings are the single source of truth. `doc-forge` does not generate content.\nIt compiles and renders what you write.\n\nDocumentation follows the Python import hierarchy.\n---\n\n## Package docstring (`package/__init__.py`) — Full user guide\n\nThis is the landing page. A developer must be able to install and use the\npackage after reading only this docstring.\n\nExample:\n\n'''\nShort description of what this package provides.\n\n## Installation\n\n```bash\npip install my-package\n```\n\n## Quick start\n\n```python\nfrom my_package.foo import Bar\n\nbar = Bar()\nresult = bar.process(\"example\")\n```\n---\n\n## Core concepts\n\n### Bar\n- Primary object exposed by the package.\n\n### foo module\n- Provides core functionality.\n---\n\n## Typical workflow\n\n1. Import public objects\n2. Initialize objects\n3. Call methods\n---\n\n## Public API\n\nfoo.Bar\nfoo.helper_function\n'''\n---\n\n## Submodule docstring (`package/foo/__init__.py`) — Subsystem guide\n\nExplains a specific subsystem.\n\nExample:\n\n'''\nProvides core functionality.\n\n## Usage\n\n```python\nfrom my_package.foo import Bar\n\nbar = Bar()\nbar.process(\"example\")\n```\n'''\n---\n\n## Class docstring — Object contract\n\nDefines responsibility and behavior.\n\nExample:\n\n```python\nclass Bar:\n '''\n Performs processing on input data.\n\n Instances may be reused across multiple calls.\n '''\n```\n\nInclude:\n\n* Responsibility\n* Lifecycle expectations\n* Thread safety (if relevant)\n* Performance characteristics (if relevant)\n---\n\n## Function and method docstrings — API specification\n\nExample:\n\n```python\ndef process(self, value: str) -> str:\n '''\n Process an input value.\n\n Parameters\n ----------\n value : str\n value to be processed\n Example:\n 'string'\n\n Returns\n -------\n processed value : str\n result after processing value\n ---\n\n Behavior\n --------\n - behaviour 1\n - behaviour 2\n '''\n```\n---\n\n## Attribute docstrings (optional)\n\nExample:\n\n```python\nclass Class\n '''\n attribute1 : str\n required: True\n default: \"default value\"\n attribute description\n\n attribute2 : str\n required: False\n attribute description\n\n attribute2 : str\n required: False\n default: \"default value\"\n attribute description\n '''\n\n attribute1: str = \"default value\"\n attribute2: str | None = None\n attribute3: str | None = \"default value\"\n```\n---\n\n## Writing Rules\n\n**Required**\n\n* Use Markdown headings\n* Use Markdown line separator `---`\n* Line separator should be followed by a blank line\n* Provide real import examples\n* Document all public APIs\n* Keep descriptions precise and factual\n\n**Avoid**\n\n* Plain-text separators like `====`\n* Duplicate external documentation\n* Informal or conversational language\n---\n\n## How doc-forge uses these docstrings\n\n### Build MkDocs site:\n\n```bash\ndoc-forge build --mkdocs --module my_package\n```\n\nBuild MCP documentation:\n\n```bash\ndoc-forge build --mcp --module my_package\n```\n\nBoth outputs are generated directly from docstrings.", "objects": { "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.GriffeLoader", "signature": "", "docstring": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.discover_module_paths", "signature": "", "docstring": "Discover all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.MkDocsRenderer", "signature": "", "docstring": "Renderer that generates Markdown source files formatted for the MkDocs\n'mkdocstrings' plugin.", "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": "Produce a set of Markdown files in the output directory based on the\nprovided Project models.\n\nArgs:\n project: The project models to render.\n out_dir: Target directory for documentation files.\n module_is_source: Module is the source folder and to be treated as the root folder." } } }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.MCPRenderer", "signature": "", "docstring": "Renderer that emits MCP-native JSON resources from docforge models.", "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-compatible JSON resources and navigation for the project.\n\nArgs:\n project: The project model to render.\n out_dir: Target directory for the generated JSON files." } } }, "main": { "name": "main", "kind": "module", "path": "docforge.main", "signature": "", "docstring": "Main entry point for the doc-forge CLI. This module delegates all command\nexecution to 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": "CLI Entry point. Boots the click application." } } }, "cli": { "name": "cli", "kind": "module", "path": "docforge.cli", "signature": null, "docstring": "# CLI Layer\n\nThe `docforge.cli` package provides the command-line interface for interacting\nwith doc-forge.\n\n## Available Commands\n\n- **build**: Build documentation (MkDocs site or MCP resources).\n- **serve**: Serve documentation (MkDocs or MCP).\n- **tree**: Visualize the introspected project structure.", "members": { "main": { "name": "main", "kind": "module", "path": "docforge.cli.main", "signature": null, "docstring": "Main entry point for the doc-forge CLI. This module delegates all command\nexecution to 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": "CLI Entry point. Boots the click application." } } }, "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": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A 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": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", "signature": "", "docstring": "Discover all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", "signature": "", "docstring": "Renderer that generates Markdown source files formatted for the MkDocs\n'mkdocstrings' plugin.", "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": "Produce a set of Markdown files in the output directory based on the\nprovided Project models.\n\nArgs:\n project: The project models to render.\n out_dir: Target directory for documentation files.\n module_is_source: Module is the source folder and to be treated as the root folder." } } }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", "signature": "", "docstring": "Utility function to load a NavSpec from a file.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A loaded NavSpec instance." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", "signature": "", "docstring": "Create a ResolvedNav by processing a NavSpec against the filesystem.\nThis expands globs and validates the existence of referenced files.\n\nArgs:\n spec: The navigation specification to resolve.\n docs_root: The root directory for documentation files.\n\nReturns:\n A ResolvedNav instance.\n\nRaises:\n FileNotFoundError: If a pattern doesn't match any files or the docs_root doesn't exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", "signature": "", "docstring": "Emitter responsible for transforming a ResolvedNav into an MkDocs-compatible\nnavigation structure.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", "docstring": "Generate a list of navigation entries for mkdocs.yml.\n\nArgs:\n nav: The resolved navigation data.\n\nReturns:\n A list of dictionary mappings representing the MkDocs navigation." } } }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_sources", "signature": "", "docstring": "Generate Markdown source files for the specified module.\n\nArgs:\n module: The dotted path of the primary module to document.\n project_name: Optional override for the project name.\n docs_dir: Directory where the generated Markdown files will be written.\n module_is_source: Module is the source folder and to be treated as the root folder." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_config", "signature": "", "docstring": "Generate an mkdocs.yml configuration file.\n\nArgs:\n docs_dir: Path to the directory containing documentation Markdown files.\n nav_file: Path to the docforge.nav.yml specification.\n template: Optional path to an mkdocs.yml template (overrides built-in).\n out: Path where the final mkdocs.yml will be written.\n site_name: The display name for the documentation site." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.build", "signature": "", "docstring": "Build the documentation site using MkDocs.\n\nArgs:\n mkdocs_yml: Path to the mkdocs.yml configuration file." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.serve", "signature": "", "docstring": "Serve the documentation site with live-reload using MkDocs.\n\nArgs:\n mkdocs_yml: Path to the mkdocs.yml configuration file." } } }, "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": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.cli.commands.mcp_utils.discover_module_paths", "signature": "", "docstring": "Discover all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.cli.commands.mcp_utils.MCPRenderer", "signature": "", "docstring": "Renderer that emits MCP-native JSON resources from docforge models.", "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-compatible JSON resources and navigation for the project.\n\nArgs:\n project: The project model to render.\n out_dir: Target directory for the generated JSON files." } } }, "MCPServer": { "name": "MCPServer", "kind": "class", "path": "docforge.cli.commands.mcp_utils.MCPServer", "signature": "", "docstring": "MCP server for serving a pre-built MCP documentation bundle.", "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: MCP transport (default: streamable-http)" } } }, "generate_resources": { "name": "generate_resources", "kind": "function", "path": "docforge.cli.commands.mcp_utils.generate_resources", "signature": "", "docstring": "Generate MCP-compatible documentation resources.\n\nArgs:\n module: The dotted path of the primary module to document.\n project_name: Optional override for the project name.\n out_dir: Directory where the MCP JSON resources and nav will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.mcp_utils.serve", "signature": "", "docstring": "Serve MCP documentation from a pre-built bundle.\n\nArgs:\n module: The dotted path of the primary module to serve.\n mcp_root: Path to the directory containing index.json, nav.json, and modules/." } } }, "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 (MkDocs site or MCP resources).\n\nThis command orchestrates the full build process:\n1. Introspects the code (Griffe)\n2. Renders sources (MkDocs Markdown or MCP JSON)\n3. (MkDocs only) Generates config and runs the final site build.\n\nArgs:\n mcp: Use the MCP documentation builder.\n mkdocs: Use the MkDocs documentation builder.\n module_is_source: Module is the source folder and to be treated as the root folder.\n module: The dotted path of the module to the document.\n project_name: Optional override for the project name.\n site_name: (MkDocs) The site display name. Defaults to module name.\n docs_dir: (MkDocs) Target directory for Markdown sources.\n nav_file: (MkDocs) Path to the docforge.nav.yml specification.\n template: (MkDocs) Optional custom mkdocs.yml template.\n mkdocs_yml: (MkDocs) Target path for the generated mkdocs.yml.\n out_dir: (MCP) Target directory for MCP JSON resources." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", "signature": "", "docstring": "Serve documentation (MkDocs or MCP).\n\nArgs:\n mcp: Serve MCP resources via an MCP server.\n mkdocs: Serve the MkDocs site using the built-in development server.\n module: The dotted path of the module to serve.\n mkdocs_yml: (MkDocs) Path to the mkdocs.yml configuration.\n out_dir: (MCP) Path to the mcp_docs/ directory." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", "signature": "", "docstring": "Visualize the project structure in the terminal.\n\nArgs:\n module: The module import path to recursively introspect.\n project_name: Optional override for the project name shown at the 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": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.cli.mcp_utils.discover_module_paths", "signature": "", "docstring": "Discover all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.cli.mcp_utils.MCPRenderer", "signature": "", "docstring": "Renderer that emits MCP-native JSON resources from docforge models.", "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-compatible JSON resources and navigation for the project.\n\nArgs:\n project: The project model to render.\n out_dir: Target directory for the generated JSON files." } } }, "MCPServer": { "name": "MCPServer", "kind": "class", "path": "docforge.cli.mcp_utils.MCPServer", "signature": "", "docstring": "MCP server for serving a pre-built MCP documentation bundle.", "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: MCP transport (default: streamable-http)" } } }, "generate_resources": { "name": "generate_resources", "kind": "function", "path": "docforge.cli.mcp_utils.generate_resources", "signature": "", "docstring": "Generate MCP-compatible documentation resources.\n\nArgs:\n module: The dotted path of the primary module to document.\n project_name: Optional override for the project name.\n out_dir: Directory where the MCP JSON resources and nav will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", "signature": "", "docstring": "Serve MCP documentation from a pre-built bundle.\n\nArgs:\n module: The dotted path of the primary module to serve.\n mcp_root: Path to the directory containing index.json, nav.json, and modules/." } } }, "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": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.cli.mkdocs_utils.discover_module_paths", "signature": "", "docstring": "Discover all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer", "signature": "", "docstring": "Renderer that generates Markdown source files formatted for the MkDocs\n'mkdocstrings' plugin.", "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": "Produce a set of Markdown files in the output directory based on the\nprovided Project models.\n\nArgs:\n project: The project models to render.\n out_dir: Target directory for documentation files.\n module_is_source: Module is the source folder and to be treated as the root folder." } } }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.mkdocs_utils.load_nav_spec", "signature": "", "docstring": "Utility function to load a NavSpec from a file.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A loaded NavSpec instance." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.mkdocs_utils.resolve_nav", "signature": "", "docstring": "Create a ResolvedNav by processing a NavSpec against the filesystem.\nThis expands globs and validates the existence of referenced files.\n\nArgs:\n spec: The navigation specification to resolve.\n docs_root: The root directory for documentation files.\n\nReturns:\n A ResolvedNav instance.\n\nRaises:\n FileNotFoundError: If a pattern doesn't match any files or the docs_root doesn't exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", "signature": "", "docstring": "Emitter responsible for transforming a ResolvedNav into an MkDocs-compatible\nnavigation structure.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", "docstring": "Generate a list of navigation entries for mkdocs.yml.\n\nArgs:\n nav: The resolved navigation data.\n\nReturns:\n A list of dictionary mappings representing the MkDocs navigation." } } }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_sources", "signature": "", "docstring": "Generate Markdown source files for the specified module.\n\nArgs:\n module: The dotted path of the primary module to document.\n project_name: Optional override for the project name.\n docs_dir: Directory where the generated Markdown files will be written.\n module_is_source: Module is the source folder and to be treated as the root folder." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", "signature": "", "docstring": "Generate an mkdocs.yml configuration file.\n\nArgs:\n docs_dir: Path to the directory containing documentation Markdown files.\n nav_file: Path to the docforge.nav.yml specification.\n template: Optional path to an mkdocs.yml template (overrides built-in).\n out: Path where the final mkdocs.yml will be written.\n site_name: The display name for the documentation site." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", "signature": "", "docstring": "Build the documentation site using MkDocs.\n\nArgs:\n mkdocs_yml: Path to the mkdocs.yml configuration file." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", "signature": "", "docstring": "Serve the documentation site with live-reload using MkDocs.\n\nArgs:\n mkdocs_yml: Path to the mkdocs.yml configuration file." } } } } }, "loaders": { "name": "loaders", "kind": "module", "path": "docforge.loaders", "signature": null, "docstring": "# Loader Layer\n\nThe `docforge.loaders` package is responsible for discovering Python source files\nand extracting their documentation using static analysis.\n\n## Core Features\n\n- **Discovery**: Automatically find all modules and packages in a project\n directory.\n- **Introspection**: Uses `griffe` to parse docstrings, signatures, and\n hierarchical relationships without executing the code.\n- **Filtering**: Automatically excludes private members (prefixed with `_`) to\n ensure clean public documentation.", "members": { "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.GriffeLoader", "signature": "", "docstring": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.discover_module_paths", "signature": "", "docstring": "Discover all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "griffe_loader": { "name": "griffe_loader", "kind": "module", "path": "docforge.loaders.griffe_loader", "signature": null, "docstring": "This module provides the GriffeLoader, which uses the 'griffe' library to\nintrospect Python source code and populate the doc-forge Project 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": "Represents a documented Python module or package.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level docstring content.\n members: Dictionary mapping object names to their 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: The object to add." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.loaders.griffe_loader.Module.get_object", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: The name of the object.\n\nReturns:\n The requested DocObject." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.loaders.griffe_loader.Module.get_all_objects", "signature": "", "docstring": "Get all top-level objects in the module.\n\nReturns:\n An iterable of DocObject instances." } } }, "Project": { "name": "Project", "kind": "class", "path": "docforge.loaders.griffe_loader.Project", "signature": "", "docstring": "Represents a documentation project, serving as a container for modules.\n\nAttributes:\n name: Name of the project.\n modules: Dictionary mapping 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": "Add a module to the project.\n\nArgs:\n module: The module to add." }, "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: The dotted path of the module (e.g., 'pkg.mod').\n\nReturns:\n The requested Module." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.get_all_modules", "signature": "", "docstring": "Get all modules in the project.\n\nReturns:\n An iterable of Module objects." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.get_module_list", "signature": "", "docstring": "Get the list of all module dotted paths.\n\nReturns:\n A list of module paths." } } }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.loaders.griffe_loader.DocObject", "signature": "", "docstring": "Represents a documented Python object (class, function, method, etc.).\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (e.g., 'class', 'function', 'attribute').\n path: Full dotted import path to the object.\n signature: Callable signature, if applicable.\n docstring: Raw docstring content extracted from the source.\n members: Dictionary mapping member names to their DocObject representations.", "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 member to this object (e.g., a method to a class).\n\nArgs:\n obj: The child DocObject to add." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.get_member", "signature": "", "docstring": "Retrieve a child member by name.\n\nArgs:\n name: The name of the member.\n\nReturns:\n The requested DocObject." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", "signature": "", "docstring": "Get all members of this object.\n\nReturns:\n An iterable of child DocObject instances." } } }, "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 all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", "signature": "", "docstring": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } } } } } }, "models": { "name": "models", "kind": "module", "path": "docforge.models", "signature": null, "docstring": "# Model Layer\n\nThe `docforge.models` package provides the core data structures used to represent\nPython source code in a documentation-focused hierarchy.\n\n## Key Components\n\n- **Project**: The root container for all documented modules.\n- **Module**: Represents a Python module or package, containing members.\n- **DocObject**: A recursive structure for classes, functions, and attributes.\n\nThese classes are designed to be renderer-agnostic, allowing the same internal\nrepresentation to be transformed into various output formats (currently MkDocs).", "members": { "Project": { "name": "Project", "kind": "class", "path": "docforge.models.Project", "signature": "", "docstring": "Represents a documentation project, serving as a container for modules.\n\nAttributes:\n name: Name of the project.\n modules: Dictionary mapping 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": "Add a module to the project.\n\nArgs:\n module: The module to add." }, "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: The dotted path of the module (e.g., 'pkg.mod').\n\nReturns:\n The requested Module." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.models.Project.get_all_modules", "signature": "", "docstring": "Get all modules in the project.\n\nReturns:\n An iterable of Module objects." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.models.Project.get_module_list", "signature": "", "docstring": "Get the list of all module dotted paths.\n\nReturns:\n A list of module paths." } } }, "Module": { "name": "Module", "kind": "class", "path": "docforge.models.Module", "signature": "", "docstring": "Represents a documented Python module or package.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level docstring content.\n members: Dictionary mapping object names to their 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: The object to add." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.Module.get_object", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: The name of the object.\n\nReturns:\n The requested DocObject." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.Module.get_all_objects", "signature": "", "docstring": "Get all top-level objects in the module.\n\nReturns:\n An iterable of DocObject instances." } } }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.models.DocObject", "signature": "", "docstring": "Represents a documented Python object (class, function, method, etc.).\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (e.g., 'class', 'function', 'attribute').\n path: Full dotted import path to the object.\n signature: Callable signature, if applicable.\n docstring: Raw docstring content extracted from the source.\n members: Dictionary mapping member names to their DocObject representations.", "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 member to this object (e.g., a method to a class).\n\nArgs:\n obj: The child DocObject to add." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.DocObject.get_member", "signature": "", "docstring": "Retrieve a child member by name.\n\nArgs:\n name: The name of the member.\n\nReturns:\n The requested DocObject." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.DocObject.get_all_members", "signature": "", "docstring": "Get all members of this object.\n\nReturns:\n An iterable of child DocObject instances." } } }, "module": { "name": "module", "kind": "module", "path": "docforge.models.module", "signature": null, "docstring": "This module defines the Module class, which represents a Python module or package\nin the doc-forge documentation models. It acts as a container for top-level\ndocumented objects.", "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": "Represents a documented Python object (class, function, method, etc.).\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (e.g., 'class', 'function', 'attribute').\n path: Full dotted import path to the object.\n signature: Callable signature, if applicable.\n docstring: Raw docstring content extracted from the source.\n members: Dictionary mapping member names to their DocObject representations.", "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 member to this object (e.g., a method to a class).\n\nArgs:\n obj: The child DocObject to add." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.module.DocObject.get_member", "signature": "", "docstring": "Retrieve a child member by name.\n\nArgs:\n name: The name of the member.\n\nReturns:\n The requested DocObject." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.module.DocObject.get_all_members", "signature": "", "docstring": "Get all members of this object.\n\nReturns:\n An iterable of child DocObject instances." } } }, "Module": { "name": "Module", "kind": "class", "path": "docforge.models.module.Module", "signature": "", "docstring": "Represents a documented Python module or package.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level docstring content.\n members: Dictionary mapping object names to their 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: The object to add." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.module.Module.get_object", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: The name of the object.\n\nReturns:\n The requested DocObject." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.module.Module.get_all_objects", "signature": "", "docstring": "Get all top-level objects in the module.\n\nReturns:\n An iterable of DocObject instances." } } } } }, "object": { "name": "object", "kind": "module", "path": "docforge.models.object", "signature": null, "docstring": "This module defines the DocObject class, the fundamental recursive unit of the\ndoc-forge documentation models. A DocObject represents a single Python entity\n(class, function, method, or attribute) and its nested members.", "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": "Represents a documented Python object (class, function, method, etc.).\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (e.g., 'class', 'function', 'attribute').\n path: Full dotted import path to the object.\n signature: Callable signature, if applicable.\n docstring: Raw docstring content extracted from the source.\n members: Dictionary mapping member names to their DocObject representations.", "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 member to this object (e.g., a method to a class).\n\nArgs:\n obj: The child DocObject to add." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.object.DocObject.get_member", "signature": "", "docstring": "Retrieve a child member by name.\n\nArgs:\n name: The name of the member.\n\nReturns:\n The requested DocObject." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.object.DocObject.get_all_members", "signature": "", "docstring": "Get all members of this object.\n\nReturns:\n An iterable of child DocObject instances." } } } } }, "project": { "name": "project", "kind": "module", "path": "docforge.models.project", "signature": null, "docstring": "This module defines the Project class, the top-level container for a documented\nproject. It aggregates multiple Module instances into a single named entity.", "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": "Represents a documented Python module or package.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level docstring content.\n members: Dictionary mapping object names to their 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: The object to add." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.project.Module.get_object", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: The name of the object.\n\nReturns:\n The requested DocObject." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.project.Module.get_all_objects", "signature": "", "docstring": "Get all top-level objects in the module.\n\nReturns:\n An iterable of DocObject instances." } } }, "Project": { "name": "Project", "kind": "class", "path": "docforge.models.project.Project", "signature": "", "docstring": "Represents a documentation project, serving as a container for modules.\n\nAttributes:\n name: Name of the project.\n modules: Dictionary mapping 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": "Add a module to the project.\n\nArgs:\n module: The module to add." }, "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: The dotted path of the module (e.g., 'pkg.mod').\n\nReturns:\n The requested Module." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.models.project.Project.get_all_modules", "signature": "", "docstring": "Get all modules in the project.\n\nReturns:\n An iterable of Module objects." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.models.project.Project.get_module_list", "signature": "", "docstring": "Get the list of all module dotted paths.\n\nReturns:\n A list of module paths." } } } } } } }, "nav": { "name": "nav", "kind": "module", "path": "docforge.nav", "signature": null, "docstring": "# Navigation Layer\n\nThe `docforge.nav` package manages the mapping between the logical documentation\nstructure and the physical files on disk.\n\n## Workflow\n\n1. **Spec Definition**: Users define navigation intent in `docforge.nav.yml`.\n2. **Resolution**: `resolve_nav` matches patterns in the spec to generated `.md` files.\n3. **Emission**: `MkDocsNavEmitter` produces the final YAML structure for `mkdocs.yml`.\n\nThis abstraction allows doc-forge to support complex grouping and ordering\nindependently of the source code's physical layout.", "members": { "NavSpec": { "name": "NavSpec", "kind": "class", "path": "docforge.nav.NavSpec", "signature": "", "docstring": "Parsed representation of the docforge navigation specification file.\n\nAttributes:\n home: Path to the home document (e.g., 'index.md').\n groups: Mapping of group titles to lists of path patterns/globs.", "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 NavSpec from a YAML file.\n\nArgs:\n path: The filesystem path to the YAML file.\n\nReturns:\n A NavSpec instance.\n\nRaises:\n FileNotFoundError: If the path does not exist.\n ValueError: If the file content is not a valid NavSpec mapping." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.NavSpec.all_patterns", "signature": "", "docstring": "Get all path patterns referenced in the specification.\n\nReturns:\n A list of all patterns (home plus all groups)." } } }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.load_nav_spec", "signature": "", "docstring": "Utility function to load a NavSpec from a file.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A loaded NavSpec instance." }, "ResolvedNav": { "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.ResolvedNav", "signature": "", "docstring": "Represents a navigation structure where all patterns and paths have been\nresolved against the actual filesystem contents.\n\nAttributes:\n home: Resolved relative path to the home page.\n groups: Mapping of group titles to lists of absolute or relative Path objects.", "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": "Get an iterable of all resolved files in the navigation structure.\n\nReturns:\n An iterable of Path objects." } } }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolve_nav", "signature": "", "docstring": "Create a ResolvedNav by processing a NavSpec against the filesystem.\nThis expands globs and validates the existence of referenced files.\n\nArgs:\n spec: The navigation specification to resolve.\n docs_root: The root directory for documentation files.\n\nReturns:\n A ResolvedNav instance.\n\nRaises:\n FileNotFoundError: If a pattern doesn't match any files or the docs_root doesn't exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.nav.MkDocsNavEmitter", "signature": "", "docstring": "Emitter responsible for transforming a ResolvedNav into an MkDocs-compatible\nnavigation structure.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.nav.MkDocsNavEmitter.emit", "signature": "", "docstring": "Generate a list of navigation entries for mkdocs.yml.\n\nArgs:\n nav: The resolved navigation data.\n\nReturns:\n A list of dictionary mappings representing the MkDocs navigation." } } }, "mkdocs": { "name": "mkdocs", "kind": "module", "path": "docforge.nav.mkdocs", "signature": null, "docstring": "This module provides the MkDocsNavEmitter, which converts a ResolvedNav instance\ninto the specific YAML-ready list structure expected by the MkDocs 'nav'\nconfiguration.", "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": "Represents a navigation structure where all patterns and paths have been\nresolved against the actual filesystem contents.\n\nAttributes:\n home: Resolved relative path to the home page.\n groups: Mapping of group titles to lists of absolute or relative Path objects.", "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": "Get an iterable of all resolved files in the navigation structure.\n\nReturns:\n An iterable of Path objects." } } }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.nav.mkdocs.MkDocsNavEmitter", "signature": "", "docstring": "Emitter responsible for transforming a ResolvedNav into an MkDocs-compatible\nnavigation structure.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit", "signature": "", "docstring": "Generate a list of navigation entries for mkdocs.yml.\n\nArgs:\n nav: The resolved navigation data.\n\nReturns:\n A list of dictionary mappings representing the MkDocs navigation." } } } } }, "resolver": { "name": "resolver", "kind": "module", "path": "docforge.nav.resolver", "signature": null, "docstring": "This module contains the logic for resolving a NavSpec against the physical\nfilesystem. It expands globs and validates that all referenced documents\nactually exist on disk.", "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 the docforge navigation specification file.\n\nAttributes:\n home: Path to the home document (e.g., 'index.md').\n groups: Mapping of group titles to lists of path patterns/globs.", "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 NavSpec from a YAML file.\n\nArgs:\n path: The filesystem path to the YAML file.\n\nReturns:\n A NavSpec instance.\n\nRaises:\n FileNotFoundError: If the path does not exist.\n ValueError: If the file content is not a valid NavSpec mapping." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.resolver.NavSpec.all_patterns", "signature": "", "docstring": "Get all path patterns referenced in the specification.\n\nReturns:\n A list of all patterns (home plus all groups)." } } }, "ResolvedNav": { "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.resolver.ResolvedNav", "signature": "", "docstring": "Represents a navigation structure where all patterns and paths have been\nresolved against the actual filesystem contents.\n\nAttributes:\n home: Resolved relative path to the home page.\n groups: Mapping of group titles to lists of absolute or relative Path objects.", "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": "Get an iterable of all resolved files in the navigation structure.\n\nReturns:\n An iterable of Path objects." } } }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolver.resolve_nav", "signature": "", "docstring": "Create a ResolvedNav by processing a NavSpec against the filesystem.\nThis expands globs and validates the existence of referenced files.\n\nArgs:\n spec: The navigation specification to resolve.\n docs_root: The root directory for documentation files.\n\nReturns:\n A ResolvedNav instance.\n\nRaises:\n FileNotFoundError: If a pattern doesn't match any files or the docs_root doesn't exist." }, "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": "This module defines the NavSpec class, which represents the user's intent for\ndocumentation navigation as defined in a YAML specification (usually\ndocforge.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 the docforge navigation specification file.\n\nAttributes:\n home: Path to the home document (e.g., 'index.md').\n groups: Mapping of group titles to lists of path patterns/globs.", "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 NavSpec from a YAML file.\n\nArgs:\n path: The filesystem path to the YAML file.\n\nReturns:\n A NavSpec instance.\n\nRaises:\n FileNotFoundError: If the path does not exist.\n ValueError: If the file content is not a valid NavSpec mapping." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.spec.NavSpec.all_patterns", "signature": "", "docstring": "Get all path patterns referenced in the specification.\n\nReturns:\n A list of all patterns (home plus all groups)." } } }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.spec.load_nav_spec", "signature": "", "docstring": "Utility function to load a NavSpec from a file.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A loaded NavSpec instance." } } } } }, "renderers": { "name": "renderers", "kind": "module", "path": "docforge.renderers", "signature": null, "docstring": "# Renderers Layer\n\nThe `docforge.renderers` package handles the transformation of the internal\ndocumentation models into physical files formatted for specific documentation\nengines.\n\n## Current Implementations\n\n- **MkDocsRenderer**: Generates Markdown files utilizing the `mkdocstrings`\n syntax. It automatically handles package/module hierarchy and generates\n `index.md` files for packages.\n\n## Extending\n\nTo add a new renderer, implement the `DocRenderer` protocol defined in\n`docforge.renderers.base`.", "members": { "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.MkDocsRenderer", "signature": "", "docstring": "Renderer that generates Markdown source files formatted for the MkDocs\n'mkdocstrings' plugin.", "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": "Produce a set of Markdown files in the output directory based on the\nprovided Project models.\n\nArgs:\n project: The project models to render.\n out_dir: Target directory for documentation files.\n module_is_source: Module is the source folder and to be treated as the root folder." } } }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.renderers.MCPRenderer", "signature": "", "docstring": "Renderer that emits MCP-native JSON resources from docforge models.", "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-compatible JSON resources and navigation for the project.\n\nArgs:\n project: The project model to render.\n out_dir: Target directory for the generated JSON files." } } }, "base": { "name": "base", "kind": "module", "path": "docforge.renderers.base", "signature": null, "docstring": "This module defines the base interfaces and configuration containers for\ndoc-forge renderers. All renderer implementations should adhere to the\nDocRenderer 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": "Represents a documentation project, serving as a container for modules.\n\nAttributes:\n name: Name of the project.\n modules: Dictionary mapping 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": "Add a module to the project.\n\nArgs:\n module: The module to add." }, "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: The dotted path of the module (e.g., 'pkg.mod').\n\nReturns:\n The requested Module." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.renderers.base.Project.get_all_modules", "signature": "", "docstring": "Get all modules in the project.\n\nReturns:\n An iterable of Module objects." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.renderers.base.Project.get_module_list", "signature": "", "docstring": "Get the list of all module dotted paths.\n\nReturns:\n A list of module paths." } } }, "RendererConfig": { "name": "RendererConfig", "kind": "class", "path": "docforge.renderers.base.RendererConfig", "signature": "", "docstring": "Configuration container for documentation renderers.\n\nArgs:\n out_dir: The directory where documentation files should be written.\n project: The introspected project models 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.", "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 source files for the given project.\n\nArgs:\n project: The project models containing modules and objects.\n out_dir: Target directory for the generated files." } } } } }, "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": "Represents a documentation project, serving as a container for modules.\n\nAttributes:\n name: Name of the project.\n modules: Dictionary mapping 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": "Add a module to the project.\n\nArgs:\n module: The module to add." }, "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: The dotted path of the module (e.g., 'pkg.mod').\n\nReturns:\n The requested Module." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.renderers.mcp_renderer.Project.get_all_modules", "signature": "", "docstring": "Get all modules in the project.\n\nReturns:\n An iterable of Module objects." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.renderers.mcp_renderer.Project.get_module_list", "signature": "", "docstring": "Get the list of all module dotted paths.\n\nReturns:\n A list of module paths." } } }, "Module": { "name": "Module", "kind": "class", "path": "docforge.renderers.mcp_renderer.Module", "signature": "", "docstring": "Represents a documented Python module or package.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level docstring content.\n members: Dictionary mapping object names to their 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: The object to add." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.renderers.mcp_renderer.Module.get_object", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: The name of the object.\n\nReturns:\n The requested DocObject." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.renderers.mcp_renderer.Module.get_all_objects", "signature": "", "docstring": "Get all top-level objects in the module.\n\nReturns:\n An iterable of DocObject instances." } } }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.renderers.mcp_renderer.DocObject", "signature": "", "docstring": "Represents a documented Python object (class, function, method, etc.).\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (e.g., 'class', 'function', 'attribute').\n path: Full dotted import path to the object.\n signature: Callable signature, if applicable.\n docstring: Raw docstring content extracted from the source.\n members: Dictionary mapping member names to their DocObject representations.", "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 member to this object (e.g., a method to a class).\n\nArgs:\n obj: The child DocObject to add." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.renderers.mcp_renderer.DocObject.get_member", "signature": "", "docstring": "Retrieve a child member by name.\n\nArgs:\n name: The name of the member.\n\nReturns:\n The requested DocObject." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.renderers.mcp_renderer.DocObject.get_all_members", "signature": "", "docstring": "Get all members of this object.\n\nReturns:\n An iterable of child DocObject instances." } } }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.renderers.mcp_renderer.MCPRenderer", "signature": "", "docstring": "Renderer that emits MCP-native JSON resources from docforge models.", "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-compatible JSON resources and navigation for the project.\n\nArgs:\n project: The project model to render.\n out_dir: Target directory for the generated JSON files." } } } } }, "mkdocs_renderer": { "name": "mkdocs_renderer", "kind": "module", "path": "docforge.renderers.mkdocs_renderer", "signature": null, "docstring": "MkDocsRenderer\n\nGenerates Markdown source files compatible with MkDocs Material\nand mkdocstrings, ensuring:\n\n- Root index.md always exists\n- Parent package indexes are created automatically\n- Child modules are linked in parent index files", "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": "Represents a documentation project, serving as a container for modules.\n\nAttributes:\n name: Name of the project.\n modules: Dictionary mapping 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": "Add a module to the project.\n\nArgs:\n module: The module to add." }, "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: The dotted path of the module (e.g., 'pkg.mod').\n\nReturns:\n The requested Module." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", "signature": "", "docstring": "Get all modules in the project.\n\nReturns:\n An iterable of Module objects." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", "signature": "", "docstring": "Get the list of all module dotted paths.\n\nReturns:\n A list of module paths." } } }, "Module": { "name": "Module", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Module", "signature": "", "docstring": "Represents a documented Python module or package.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level docstring content.\n members: Dictionary mapping object names to their 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: The object to add." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Module.get_object", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: The name of the object.\n\nReturns:\n The requested DocObject." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.Module.get_all_objects", "signature": "", "docstring": "Get all top-level objects in the module.\n\nReturns:\n An iterable of DocObject instances." } } }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", "signature": "", "docstring": "Renderer that generates Markdown source files formatted for the MkDocs\n'mkdocstrings' plugin.", "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": "Produce a set of Markdown files in the output directory based on the\nprovided Project models.\n\nArgs:\n project: The project models to render.\n out_dir: Target directory for documentation files.\n module_is_source: Module is the source folder and to be treated as the root folder." } } } } } } }, "servers": { "name": "servers", "kind": "module", "path": "docforge.servers", "signature": null, "docstring": null, "members": { "MCPServer": { "name": "MCPServer", "kind": "class", "path": "docforge.servers.MCPServer", "signature": "", "docstring": "MCP server for serving a pre-built MCP documentation bundle.", "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: MCP transport (default: 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-built MCP documentation bundle.", "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: MCP transport (default: streamable-http)" } } } } } } } } } }