Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/commands
Section/Topic
Built-in /env command documentation, including how it applies to Bash and PowerShell tool commands
Current Documentation
The built-in commands reference says:
Type / in Claude Code to see all available commands, or type / followed by any letters to filter. Not all commands are visible to every user. Some depend on your platform, plan, or environment.
| /config | Open the Settings interface to adjust theme, model, output style, and other preferences. |
| /remote-env | Configure the default remote environment for web sessions started with --remote |
| /status | Open the Settings interface (Status tab) showing version, model, account, and connectivity. |
There is no /env entry anywhere in the built-in commands table.
The tools reference currently documents Bash-specific environment persistence and PowerShell tool setup separately:
Activate your virtualenv or conda environment before launching Claude Code. To make environment variables persist across Bash commands, set CLAUDE_ENV_FILE to a shell script before launching Claude Code, or use a SessionStart hook to populate it dynamically.
On Windows, Claude Code can run PowerShell commands natively instead of routing through Git Bash. This is an opt-in preview.
"defaultShell": "powershell" in settings.json: routes interactive ! commands through PowerShell. Requires the PowerShell tool to be enabled.
- Auto mode does not work with the PowerShell tool yet
- PowerShell profiles are not loaded
No page currently documents /env, and the PowerShell tool page does not mention that /env now applies to PowerShell commands.
What's Wrong or Missing?
Changelog v2.1.88 says:
/env now applies to PowerShell tool commands (previously only affected Bash)
That is user-visible behavior, but the current docs do not cover it.
Users reading the built-in commands reference cannot discover that /env exists. Users reading the PowerShell tool page cannot tell that /env works there now, or how it relates to Bash-only mechanisms like CLAUDE_ENV_FILE.
Suggested Improvement
Add a /env entry to the built-in commands reference that explains:
- what the command does
- whether its changes are session-scoped or persistent
- which tool commands it affects
Then add a short note in the PowerShell tool section that /env applies to PowerShell tool commands as of v2.1.88, with a cross-reference back to the command docs.
It would also help to clarify how /env differs from:
settings.json env
CLAUDE_ENV_FILE
- hook-based environment setup
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
Total scope: 2 pages affected
Source: Changelog v2.1.88
Changelog entry: /env now applies to PowerShell tool commands (previously only affected Bash)
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/commands
Section/Topic
Built-in
/envcommand documentation, including how it applies to Bash and PowerShell tool commandsCurrent Documentation
The built-in commands reference says:
There is no
/enventry anywhere in the built-in commands table.The tools reference currently documents Bash-specific environment persistence and PowerShell tool setup separately:
No page currently documents
/env, and the PowerShell tool page does not mention that/envnow applies to PowerShell commands.What's Wrong or Missing?
Changelog v2.1.88 says:
That is user-visible behavior, but the current docs do not cover it.
Users reading the built-in commands reference cannot discover that
/envexists. Users reading the PowerShell tool page cannot tell that/envworks there now, or how it relates to Bash-only mechanisms likeCLAUDE_ENV_FILE.Suggested Improvement
Add a
/enventry to the built-in commands reference that explains:Then add a short note in the PowerShell tool section that
/envapplies to PowerShell tool commands as of v2.1.88, with a cross-reference back to the command docs.It would also help to clarify how
/envdiffers from:settings.jsonenvCLAUDE_ENV_FILEImpact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
/env/envis not mentionedTotal scope: 2 pages affected
Source: Changelog v2.1.88
Changelog entry:
/envnow applies to PowerShell tool commands (previously only affected Bash)