Skip to main content

Module host_env

Module host_env 

Source
Expand description

Environment markers as the host that started this process sees them.

Some AI clients start MCP servers with an allowlisted environment: Codex passes only HOME, PATH, USER, LANG and a few more. A server started that way cannot see CI, DO_NOT_TRACK or LEAN_CTX_TELEMETRY, so a CI job reported as a local machine and an opt-out set in the shell did not reach the server. On Linux the nearest ancestor that sets one of the HOST_KEYS supplies it when this process has none. Only those keys are kept; the rest of an ancestor’s environment is never stored.

Functions§

stdin_is_terminal
Whether stdin is an interactive terminal, without ever blocking.
var
key from this process, else from the nearest ancestor for HOST_KEYS. A key this process sets, even to an empty value, is never overridden.