No Value Exposure
Never displays actual environment variable values. Only key names and defined/empty status are shown.
env-safe lets you inspect .env files without
ever exposing the actual values of your environment
variables. It is designed for Claude Code and other
automated tools that need to work with environment
files without accidentally leaking secrets.
The safety-hooks
plugin blocks Claude Code from directly accessing
.env files — no reading, writing, or editing is
allowed. This prevents both accidental exposure of
API keys and unintended modifications.
env-safe is the only approved way for Claude
Code to inspect environment configuration safely.
Any modifications to .env files must be done
manually, outside of Claude Code.
List all environment variable keys defined in
the .env file:
env-safe listExample output:
DATABASE_URLAPI_KEYSECRET_TOKENDEBUG_MODEAdd the --status flag to see whether each
variable is defined or empty:
env-safe list --statusExample output:
DATABASE_URL: definedAPI_KEY: definedSECRET_TOKEN: emptyDEBUG_MODE: definedCheck whether a specific key exists in the
.env file:
env-safe check API_KEYReturns whether the key exists and whether it has a value assigned, without revealing the value itself.
Count the total, defined, and empty variables:
env-safe countExample output:
Total: 12Defined: 10Empty: 2Validate the syntax of your .env file:
env-safe validateChecks for common syntax issues like missing equals signs, invalid key names, or malformed lines. Reports any problems found without exposing values.
No Value Exposure
Never displays actual environment variable values. Only key names and defined/empty status are shown.
Safe Inspection
Check which keys exist and whether they have values, all without any security risk.
Syntax Validation
Verify that your .env file format is correct
before you deploy or run your application.
Claude Code Integration
Works hand-in-hand with the safety-hooks plugin
to provide a safe alternative to direct
.env access.
For all available options:
env-safe --help