From f320de1b0cf7436191d78770413141c1bd3a17b9 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sat, 17 May 2025 22:38:15 -0400 Subject: [PATCH] LLM_TOOLS_DEBUG env var, closes #1045 --- docs/usage.md | 2 +- llm/cli.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index b3abfd6..6f995d1 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -132,7 +132,7 @@ def multiply(x: int, y: int) -> int: return x * y ' 'what is 34234 * 213345' ``` -Add `--td/--tools-debug` to see full details of the tools that are being executed: +Add `--td/--tools-debug` to see full details of the tools that are being executed. You can also set the `LLM_TOOLS_DEBUG` environment variable to `1` to enable this for all prompts. ```bash llm --functions ' def multiply(x: int, y: int) -> int: diff --git a/llm/cli.py b/llm/cli.py index 089c4c3..6ed5e16 100644 --- a/llm/cli.py +++ b/llm/cli.py @@ -354,6 +354,7 @@ def cli(): "--tools-debug", is_flag=True, help="Show full details of tool executions", + envvar="LLM_TOOLS_DEBUG", ) @click.option( "tools_approve",