Skip to content

prompts

Class info

🛈 DocStrings

list_prompts

list_prompts(
    config_path: str = config_file_opt,
    output_format: OutputFormat = output_format_opt,
    verbose: bool = verbose_opt,
)

List available prompts.

Source code in src/llmling/cli/prompts.py
@prompts_cli.command("list")
def list_prompts(
    config_path: str = config_file_opt,
    output_format: OutputFormat = output_format_opt,
    verbose: bool = verbose_opt,
):
    """List available prompts."""
    from llmling.config.runtime import RuntimeConfig

    with RuntimeConfig.open_sync(config_path) as runtime:
        format_output(runtime.get_prompts(), output_format)

show_prompt

show_prompt(
    config_path: str = config_file_opt,
    name: str = Argument(help=PROMPT_NAME_HELP),
    output_format: OutputFormat = output_format_opt,
    verbose: bool = verbose_opt,
)

Show prompt details.

Source code in src/llmling/cli/prompts.py
@prompts_cli.command("show")
def show_prompt(
    config_path: str = config_file_opt,
    name: str = t.Argument(help=PROMPT_NAME_HELP),
    output_format: OutputFormat = output_format_opt,
    verbose: bool = verbose_opt,
):
    """Show prompt details."""
    from llmling.config.runtime import RuntimeConfig

    with RuntimeConfig.open_sync(config_path) as runtime:
        format_output(runtime.get_prompt(name), output_format)