Skip to content

__main__

Class info

🛈 DocStrings

CLI interface for LLMling agents.

get_command_help

get_command_help(base_help: str) -> str

Get command help text with active config information.

Source code in src/llmling_agent/__main__.py
23
24
25
26
27
def get_command_help(base_help: str) -> str:
    """Get command help text with active config information."""
    if active := config_store.get_active():
        return f"{base_help}\n\n(Using config: {active})"
    return f"{base_help}\n\n(No active config set)"

main

main(
    ctx: Context,
    log_level: LogLevel = Option("info", "--log-level", "-l", help="Log level"),
)

🤖 LLMling Agent CLI - Run and manage LLM agents.

Source code in src/llmling_agent/__main__.py
30
31
32
33
34
35
36
37
38
39
40
def main(
    ctx: t.Context,
    log_level: LogLevel = t.Option("info", "--log-level", "-l", help="Log level"),  # noqa: B008
):
    """🤖 LLMling Agent CLI - Run and manage LLM agents."""
    # Configure logging globally
    log.configure_logging(level=log_level.upper())

    # Store log level in context for commands that might need it
    ctx.ensure_object(dict)
    ctx.obj["log_level"] = log_level