--redact -- claude -p
Runtime leak protection and log redaction for Claude print mode. Run Claude non-interactively with real secrets while redacting them from output and logs.
Usage
Runtime leak protection for Claude print mode: Claude receives the real environment variables, but log redaction replaces any matching values it prints with [REDACTED].
$ echo "SECRET=super-secret-value" > .env
$ dotenvx run --redact --quiet -- claude -p 'Print the value of $SECRET'
[REDACTED]