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 "normal calls if the provider rejects them (default: enabled)",
309)
310@click.option(
311 "--update",
312 is_flag=True,
313 help="Incremental update: only regenerate modules affected by changes since last generation",
314)
315@click.option(
316 "--compare-to",
317 type=str,
318 default=None,
319 help="Commit hash to compare against for incremental updates (overrides stored commit in metadata.json)",
320)
321@click.pass_context
322def generate_command(
323 ctx,
324 output: str,
325 create_branch: bool,
326 github_pages: bool,
327 no_cache: bool,
328 include: Optional[str],
329 exclude: Optional[str],
330 focus: Optional[str],
331 doc_type: Optional[str],
332 instructions: Optional[str],
333 use_gitignore: Optional[bool],
334 verbose: bool,
335 max_tokens: Optional[int],
336 max_token_per_module: Optional[int],
337 max_token_per_leaf_module: Optional[int],
338 max_depth: Optional[int],
339 prompt_caching: Optional[bool],
340 update: bool = False,
341 compare_to: Optional[str] = None
342):
343 """
344 Generate comprehensive documentation for a code repository.
345
346 Analyzes the current repository and generates documentation using LLM-powered
347 analysis. Documentation is output to ./docs/ by default.
348
349 Examples:
350
351 \b
352 # Basic generation
353 $ codewiki generate
354
355 \b
356 # With git branch creation and GitHub Pages
357 $ codewiki generate --create-branch --github-pages
358
359 \b
360 # Force full regeneration
361 $ codewiki generate --no-cache
362
363 \b
364 # Analyze ignored files as well
365 $ codewiki generate --no-gitignore
366
367 \b

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