From 8a509e590ab77aceb74aca74da4f71ded6586cd7 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Thu, 22 Jan 2026 17:47:59 +0530 Subject: [PATCH] tree using module instead of modules --- docforge/cli/commands.py | 13 ++++++------- docforge/cli/commands.pyi | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docforge/cli/commands.py b/docforge/cli/commands.py index 3dd65d2..335f818 100644 --- a/docforge/cli/commands.py +++ b/docforge/cli/commands.py @@ -127,28 +127,27 @@ def serve( @cli.command() @click.option( - "--modules", - multiple=True, + "--module", required=True, - help="Python module import paths to introspect", + help="Python module import path to introspect", ) @click.option( "--project-name", - help="Project name (defaults to first module)", + help="Project name (defaults to specified module)", ) def tree( - modules: Sequence[str], + module: str, project_name: Optional[str], ) -> None: """ Visualize the project structure in the terminal. Args: - modules: List of module import paths to recursively introspect. + module: The module import path to recursively introspect. project_name: Optional override for the project name shown at the root. """ loader = GriffeLoader() - project = loader.load_project(list(modules), project_name) + project = loader.load_project([module], project_name) click.echo(project.name) diff --git a/docforge/cli/commands.pyi b/docforge/cli/commands.pyi index f32426b..df4f535 100644 --- a/docforge/cli/commands.pyi +++ b/docforge/cli/commands.pyi @@ -26,7 +26,7 @@ def serve( ) -> None: ... def tree( - modules: Sequence[str], + module: str, project_name: Optional[str], ) -> None: ...