Search the documentation
3 pages for claude_env_file.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Hooks reference
Claude Code CLI · in the page
hooks
…Persist environment variables SessionStart hooks have access to the `CLAUDE_ENV_FILE` environment variable, which provides a file path where you can persist environment variables for subsequent Bash…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…CLAUDE.md](/docs/en/memory) instead. For environment variables, see [`CLAUDE_ENV_FILE`](/docs/en/hooks#persist-environment-variables) in the reference. ### Audit configuration changes Track when set…
Tools reference
Claude Code CLI · in the page
tools-reference
…de. To make environment variables persist across Bash commands, set [`CLAUDE_ENV_FILE`](/docs/en/env-vars) to a shell script before launching Claude Code, or use a [SessionStart hook](/docs/en/hooks#p…