cli-cleanup (#2)
Some checks reported errors
continuous-integration/drone/tag Build was killed

Reviewed-on: #2
Co-authored-by: Vishesh 'ironeagle' Bangotra <aetoskia@gmail.com>
Co-committed-by: Vishesh 'ironeagle' Bangotra <aetoskia@gmail.com>
This commit is contained in:
2026-01-21 13:25:57 +00:00
committed by aetos
parent 94c1818103
commit ff92906720
13 changed files with 242 additions and 122 deletions

View File

@@ -7,6 +7,11 @@ from docforge.servers import MCPServer
def generate_resources(module: str, project_name: str | None, out_dir: Path) -> None:
"""
Generate MCP-compatible documentation resources.
Args:
module: The dotted path of the primary module to document.
project_name: Optional override for the project name.
out_dir: Directory where the MCP JSON resources and nav will be written.
"""
loader = GriffeLoader()
discovered_paths = discover_module_paths(module)
@@ -17,7 +22,10 @@ def generate_resources(module: str, project_name: str | None, out_dir: Path) ->
def serve(mcp_root: Path) -> None:
"""
Serve MCP documentation.
Serve MCP documentation from a pre-built bundle.
Args:
mcp_root: Path to the directory containing index.json, nav.json, and modules/.
"""
if not mcp_root.exists():
raise click.ClickException(f"mcp_docs directory not found: {mcp_root}")