[DOCS] env vars documentation related to claude hooks; is CLAUDE_FILE_PATHS a support var?
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/hooks
Section/Topic
hooks
Current Documentation
Is CLAUDE_FILE_PATHS an official environment variable that Claude uses?
I see various mentions of it like here and here, but I can't find this listed on claude docs page (I asked the AI assistant that's baked into the claude docs, and it didn't link me to anything mentioning that environment variable).
ChatGPT says it's not an officially support env var, and it's unset for me when my Claude hook is triggering. Maybe I'm running into this issue.
Is there some official Claude page that documents all the env vars that are available to me? I'm running a hook in response to Claude editing a file (PostToolUse) and need to figure out what file was changed.
A statement like this seems to help, but hoping there's a more standard way of getting this, like through an env var:
FILE_PATH="$(powershell -NoProfile -Command \
'$json=[Console]::In.ReadToEnd(); if (-not $json) { ""; exit 0 }; ($json | ConvertFrom-Json).tool_input.file_path' \
<<<"$INPUT" 2>&1)"
I guess the docs to mention:
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
So maybe this is the official way? Though users might not have jq installed so would prefer a different approach. Curious about the env var situation.
What's Wrong or Missing?
where are env vars listed?
Suggested Improvement
clarify if those env vars are supported (or list whatever is supported).
Impact
Medium - Makes feature difficult to understand
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗