Gen Cmd
CLI command for generating code documentation.
logger
module-attribute
logger = getLogger(__name__)
PathArg
module-attribute
PathArg = Annotated[
Path,
Argument(
exists=True,
help="Path to the codebase to analyze",
show_default=True,
),
]
OutputOpt
module-attribute
OutputOpt = Annotated[
Path | None,
Option(
"--output",
"-o",
help="Output file path (overrides config)",
),
]
ConfigOpt
module-attribute
ConfigOpt = Annotated[
Path | None,
Option("--config", "-c", help="Path to config file"),
]
MaxContentLengthOpt
module-attribute
MaxContentLengthOpt = Annotated[
int | None,
Option(
"--max-content-length",
help="Maximum content length for file display (set to 0 for unlimited)",
),
]
TreeOpt
module-attribute
TreeOpt = Annotated[
bool | None,
Option(
"--tree/--no-tree",
"-t",
help="Include directory tree in output",
),
]
EntityGraphOpt
module-attribute
EntityGraphOpt = Annotated[
bool | None,
Option(
"--entity-graph/--no-entity-graph",
"-e",
help="Include entity relationship graph in output",
),
]
LODLevelOpt
module-attribute
LODLevelOpt = Annotated[
str,
Option(
"--lod",
help="Level of Detail for code analysis (e.g., 'full', 'docs', 'signatures')",
case_sensitive=False,
),
]
MermaidEntitiesOpt
module-attribute
MermaidEntitiesOpt = Annotated[
str | None,
Option(
"--mermaid-entities",
help="Comma-separated list of entity types to include in Mermaid graph (e.g., 'module,class,function')",
),
]
MermaidRelationshipsOpt
module-attribute
MermaidRelationshipsOpt = Annotated[
str | None,
Option(
"--mermaid-relationships",
help="Comma-separated list of relationship types to include in Mermaid graph (e.g., 'declares,imports,calls')",
),
]
MermaidLegendOpt
module-attribute
MermaidLegendOpt = Annotated[
bool | None,
Option(
"--mermaid-legend/--no-mermaid-legend",
help="Show/hide the legend in the Mermaid diagram",
),
]
MermaidUnconnectedOpt
module-attribute
MermaidUnconnectedOpt = Annotated[
bool | None,
Option(
"--mermaid-unconnected/--no-mermaid-unconnected",
help="Remove/keep nodes with no connections in the Mermaid diagram",
),
]
SemanticAnalysisOpt
module-attribute
SemanticAnalysisOpt = Annotated[
bool,
Option(
"--semantic/--no-semantic",
help="Enable/disable semantic analysis",
),
]
register_command
register_command(app: Typer) -> None
Register the gen command with the CLI app.
Source code in src/codemap/cli/gen_cmd.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|