{ "module": "docforge.cli", "content": { "path": "docforge.cli", "docstring": "# CLI Layer\n\nThe `docforge.cli` package provides the command-line interface for interacting\nwith doc-forge.\n\n## Available Commands\n\n- **tree**: Visualize the introspected project structure.\n- **generate**: Create Markdown source files from Python code.\n- **mkdocs**: Generate the primary `mkdocs.yml` configuration.\n- **build**: Build the final documentation site.\n- **serve**: Launch a local development server with live-reloading.", "objects": { "main": { "name": "main", "kind": "module", "path": "docforge.cli.main", "signature": null, "docstring": "Main entry point for the doc-forge CLI.", "members": { "cli": { "name": "cli", "kind": "function", "path": "docforge.cli.main.cli", "signature": "", "docstring": "doc-forge CLI: A tool for introspecting Python projects and generating\ndocumentation." }, "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." } } }, "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." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_config", "signature": "", "docstring": "Generate an mkdocs.yml configuration file." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.build", "signature": "", "docstring": "Build the documentation site using MkDocs." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.serve", "signature": "", "docstring": "Serve the documentation site with live-reload using MkDocs." } } }, "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." } } }, "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." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.mcp_utils.serve", "signature": "", "docstring": "Serve MCP documentation." } } }, "cli": { "name": "cli", "kind": "function", "path": "docforge.cli.commands.cli", "signature": "", "docstring": "doc-forge CLI: A tool for introspecting Python projects and generating\ndocumentation." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.commands.build", "signature": "", "docstring": "Build documentation (MkDocs site or MCP resources)." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", "signature": "", "docstring": "Serve documentation." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", "signature": "", "docstring": "Visualize the project structure." } } }, "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." } } }, "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." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", "signature": "", "docstring": "Serve MCP documentation." } } }, "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." } } }, "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." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", "signature": "", "docstring": "Generate an mkdocs.yml configuration file." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", "signature": "", "docstring": "Build the documentation site using MkDocs." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", "signature": "", "docstring": "Serve the documentation site with live-reload using MkDocs." } } } } } }