Skip to content

M31A reads environment variables directly and through .env files. The list below is a curated set of user-facing variables found in the source; additional internal and test-only variables exist. Project .env files can be ignored with advanced.ignoreLocalEnv.

Authentication and model ​

VariablePurpose
NVIDIA_API_KEYNVIDIA NIM API key. Required for default authentication.
M31A_AUTH_OVERRIDEInternal auth-type handoff used during relaunch.
M31A_DEFAULT_AUTH_TYPEDefault authentication type.
M31A_PROVIDERProvider id override.
M31A_PROVIDER_API_KEYAPI key for a custom provider.
M31A_PROVIDER_BASE_URLBase URL for a custom provider.
M31A_PROVIDER_HEADERSExtra headers for a custom provider.
M31A_PROVIDER_MODELModel id for a custom provider.
M31A_CUSTOM_HEADERSJSON-encoded custom request headers.
M31A_API_HEADERS_TIMEOUT_MSHeader timeout for API requests.
M31A_MODELModel override used by some internal paths.

Sandboxing ​

VariablePurpose
M31A_SANDBOXtrue, docker, podman, or a sandbox command.
M31A_SANDBOX_PROXY_COMMANDCommand that starts a proxy on :::8877.
M31A_SANDBOX_IMAGEOverride the sandbox container image.
M31A_SANDBOX_IMAGE_TAGOverride the sandbox image tag.
SEATBELT_PROFILEmacOS Seatbelt profile (default permissive-open).
SANDBOX_MOUNTSAdditional container mounts.
SANDBOX_PORTSAdditional exposed ports.
SANDBOX_ENVAdditional environment variables for the container.
BUILD_SANDBOXSet to 1 to rebuild a custom sandbox.
BUILD_SANDBOX_FLAGSExtra flags for the sandbox build.

Workspace and trust ​

VariablePurpose
M31A_HOMEOverride the per-user configuration home.
M31A_CONFIG_DIROverride the configuration directory.
M31A_TRUST_WORKSPACEtrue or false to force workspace trust state.
M31A_SYSTEM_MDAdditional system context content.
M31A_WRITE_SYSTEM_MDControls writing system context to disk.
M31A_PLANS_DIRDirectory used for plan artifacts in hooks.
M31A_AUTO_FORMATDisable automatic formatting when set to false.

IDE and integration ​

VariablePurpose
M31A_IDE_SERVER_PORTPort of the IDE MCP bridge (set by the VS Code companion).
M31A_IDE_WORKSPACE_PATHWorkspace path reported by the IDE.
M31A_IDE_PIDIDE process id.
M31A_HUB_DATA_DIRData directory for the hub daemon and schedules.
M31A_EXTENSION_REGISTRY_URIOverride the extension registry URI.

Telemetry and observability ​

VariablePurpose
M31A_TELEMETRY_ENABLEDEnable telemetry.
M31A_TELEMETRY_OUTFILEWrite telemetry to a file.
M31A_TELEMETRY_TARGETTelemetry target.
M31A_TELEMETRY_OTLP_ENDPOINTOTLP endpoint.
M31A_TELEMETRY_OTLP_HEADERSOTLP headers.
M31A_TELEMETRY_OTLP_PROTOCOLOTLP protocol.
M31A_TELEMETRY_TRACES_ENABLEDEnable traces.
M31A_TELEMETRY_LOG_PROMPTSLog prompt content (avoid with sensitive data).
M31A_DEBUGEnable debug logging.
M31A_DEBUG_LOG_FILEWrite debug logs to this file.
M31A_ACTIVITY_LOGActivity log output target.
M31A_ACTIVITY_LOG_TARGETActivity log destination.

Terminal and rendering ​

VariablePurpose
NO_COLORDisable color output.
FORCE_COLORForce color output.
TERM / COLORTERMTerminal capability detection.
DEBUGGeneral debug flag; excluded from project context by default.
CI / GITHUB_ACTIONSCI environment detection.

Precedence ​

Environment variables generally override file settings, and command-line flags override environment variables. For example, --skip-trust sets M31A_TRUST_WORKSPACE=true for the current process.

Next steps ​

See Sandboxing and Configuration for the corresponding settings.

Built with VitePress. Powered by NVIDIA NIM.