MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / generate_command

Function generate_command

codewiki/cli/commands/generate.py:310–621  ·  view source on GitHub ↗

Generate comprehensive documentation for a code repository. Analyzes the current repository and generates documentation using LLM-powered analysis. Documentation is output to ./docs/ by default. Examples: \b # Basic generation $ codewiki generate

(
    ctx,
    output: str,
    create_branch: bool,
    github_pages: bool,
    no_cache: bool,
    include: Optional[str],
    exclude: Optional[str],
    focus: Optional[str],
    doc_type: Optional[str],
    instructions: Optional[str],
    verbose: bool,
    max_tokens: Optional[int],
    max_token_per_module: Optional[int],
    max_token_per_leaf_module: Optional[int],
    max_depth: Optional[int],
    update: bool = False,
    compare_to: Optional[str] = None
)

Source from the content-addressed store, hash-verified

308 "-l",
309 type=str,
310 default=None,
311 help="Language of the generated documentation, as a code or name (e.g. 'ja', 'Japanese', 'vi'). "
312 "Filenames and module names stay ASCII. Default: English, or the language stored in "
313 "metadata.json when used with --update",
314)
315@click.option(
316 "--use-gitignore/--no-gitignore",
317 default=None,
318 help="Apply Git ignore rules during analysis (default: enabled)",
319)
320@click.option(
321 "--verbose",
322 "-v",
323 is_flag=True,
324 help="Show detailed progress and debug information",
325)
326@click.option(
327 "--max-tokens",
328 type=int,
329 default=None,
330 help="Maximum tokens for LLM response (overrides config)",
331)
332@click.option(
333 "--min-token-per-module",
334 type=click.IntRange(min=1),
335 default=None,
336 help="Minimum code tokens per standalone module (default: 1000)",
337)
338@click.option(
339 "--max-token-per-module",
340 type=int,
341 default=None,
342 help="Maximum tokens per module for clustering (overrides config)",
343)
344@click.option(
345 "--max-token-per-leaf-module",
346 type=int,
347 default=None,
348 help="Base code-token threshold to allow delegation (overrides config)",
349)
350@click.option(
351 "--max-depth",
352 type=int,
353 default=None,
354 help="Maximum depth for hierarchical decomposition (overrides config)",
355)
356@click.option(
357 "--request-limit",
358 type=click.IntRange(min=1),
359 default=None,
360 help="Maximum model requests per agent run (overrides config)",
361)
362@click.option(
363 "--agent-retries",
364 type=click.IntRange(min=0),
365 default=None,
366 help="Retries for a failing agent tool call (overrides config)",
367)

Callers

nothing calls this directly

Calls 15

loadMethod · 0.95
is_configuredMethod · 0.95
get_configMethod · 0.95
get_api_keyMethod · 0.95
is_emptyMethod · 0.95
to_dictMethod · 0.95
generateMethod · 0.95
create_loggerFunction · 0.90
ConfigManagerClass · 0.90
ConfigurationErrorClass · 0.90

Tested by

no test coverage detected