{ "module": "docforge.cli.main", "content": { "path": "docforge.cli.main", "docstring": "Main entry point for the doc-forge CLI. This module defines the core command\ngroup and the 'tree', 'generate', 'build', and 'serve' commands.", "objects": { "Path": { "name": "Path", "kind": "alias", "path": "docforge.cli.main.Path", "signature": "", "docstring": null }, "Sequence": { "name": "Sequence", "kind": "alias", "path": "docforge.cli.main.Sequence", "signature": "", "docstring": null }, "Optional": { "name": "Optional", "kind": "alias", "path": "docforge.cli.main.Optional", "signature": "", "docstring": null }, "click": { "name": "click", "kind": "alias", "path": "docforge.cli.main.click", "signature": "", "docstring": null }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.cli.main.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.main.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.main.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.main.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.main.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.main.MkDocsRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.main.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." } } }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.cli.main.MCPRenderer", "signature": "", "docstring": "Renderer that emits MCP-native JSON resources from docforge models.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.cli.main.MCPRenderer.name", "signature": "", "docstring": null }, "generate_sources": { "name": "generate_sources", "kind": "function", "path": "docforge.cli.main.MCPRenderer.generate_sources", "signature": "", "docstring": "Generate MCP-compatible JSON resources and navigation for the project." } } }, "mkdocs_cmd": { "name": "mkdocs_cmd", "kind": "function", "path": "docforge.cli.main.mkdocs_cmd", "signature": "", "docstring": "Generate an mkdocs.yml configuration file by combining a template with\nthe navigation structure resolved from a docforge.nav.yml 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.\n out: Path where the final mkdocs.yml will be written.\n site_name: The name of the documentation site." }, "cli": { "name": "cli", "kind": "function", "path": "docforge.cli.main.cli", "signature": "", "docstring": "doc-forge CLI: A tool for introspecting Python projects and generating\ndocumentation." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.main.tree", "signature": "", "docstring": "Visualize the project structure including modules and their members.\n\nArgs:\n modules: List of module paths to introspect.\n project_name: Optional project name override." }, "generate": { "name": "generate", "kind": "function", "path": "docforge.cli.main.generate", "signature": "", "docstring": "Generate Markdown source files for the specified module.\n\nArgs:\n module: The primary module path to document.\n project_name: Optional project name override.\n docs_dir: Directory where documentation sources will be written." }, "generate_mcp": { "name": "generate_mcp", "kind": "function", "path": "docforge.cli.main.generate_mcp", "signature": "", "docstring": "Generate MCP-compatible documentation resources for the specified module.\n\nArgs:\n module: The primary module path to document.\n project_name: Optional project name override.\n out_dir: Directory where MCP resources will be written." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.main.build", "signature": "", "docstring": "Build the documentation site using MkDocs.\n\nArgs:\n mkdocs_yml: Path to the mkdocs.yml configuration file." }, "serve_mcp": { "name": "serve_mcp", "kind": "function", "path": "docforge.cli.main.serve_mcp", "signature": "", "docstring": "Serve MCP documentation from the local mcp_docs directory." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.main.serve", "signature": "", "docstring": "Serve the documentation site with live-reload using MkDocs.\n\nArgs:\n mkdocs_yml: Path to the mkdocs.yml configuration file." }, "main": { "name": "main", "kind": "function", "path": "docforge.cli.main.main", "signature": "", "docstring": "CLI Entry point." } } } }