tree using module instead of modules

This commit is contained in:
2026-01-22 17:47:59 +05:30
parent cb68b0b93f
commit 8a509e590a
2 changed files with 7 additions and 8 deletions

View File

@@ -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)