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
| Variable | Purpose |
|---|---|
NVIDIA_API_KEY | NVIDIA NIM API key. Required for default authentication. |
M31A_AUTH_OVERRIDE | Internal auth-type handoff used during relaunch. |
M31A_DEFAULT_AUTH_TYPE | Default authentication type. |
M31A_PROVIDER | Provider id override. |
M31A_PROVIDER_API_KEY | API key for a custom provider. |
M31A_PROVIDER_BASE_URL | Base URL for a custom provider. |
M31A_PROVIDER_HEADERS | Extra headers for a custom provider. |
M31A_PROVIDER_MODEL | Model id for a custom provider. |
M31A_CUSTOM_HEADERS | JSON-encoded custom request headers. |
M31A_API_HEADERS_TIMEOUT_MS | Header timeout for API requests. |
M31A_MODEL | Model override used by some internal paths. |
Sandboxing
| Variable | Purpose |
|---|---|
M31A_SANDBOX | true, docker, podman, or a sandbox command. |
M31A_SANDBOX_PROXY_COMMAND | Command that starts a proxy on :::8877. |
M31A_SANDBOX_IMAGE | Override the sandbox container image. |
M31A_SANDBOX_IMAGE_TAG | Override the sandbox image tag. |
SEATBELT_PROFILE | macOS Seatbelt profile (default permissive-open). |
SANDBOX_MOUNTS | Additional container mounts. |
SANDBOX_PORTS | Additional exposed ports. |
SANDBOX_ENV | Additional environment variables for the container. |
BUILD_SANDBOX | Set to 1 to rebuild a custom sandbox. |
BUILD_SANDBOX_FLAGS | Extra flags for the sandbox build. |
Workspace and trust
| Variable | Purpose |
|---|---|
M31A_HOME | Override the per-user configuration home. |
M31A_CONFIG_DIR | Override the configuration directory. |
M31A_TRUST_WORKSPACE | true or false to force workspace trust state. |
M31A_SYSTEM_MD | Additional system context content. |
M31A_WRITE_SYSTEM_MD | Controls writing system context to disk. |
M31A_PLANS_DIR | Directory used for plan artifacts in hooks. |
M31A_AUTO_FORMAT | Disable automatic formatting when set to false. |
IDE and integration
| Variable | Purpose |
|---|---|
M31A_IDE_SERVER_PORT | Port of the IDE MCP bridge (set by the VS Code companion). |
M31A_IDE_WORKSPACE_PATH | Workspace path reported by the IDE. |
M31A_IDE_PID | IDE process id. |
M31A_HUB_DATA_DIR | Data directory for the hub daemon and schedules. |
M31A_EXTENSION_REGISTRY_URI | Override the extension registry URI. |
Telemetry and observability
| Variable | Purpose |
|---|---|
M31A_TELEMETRY_ENABLED | Enable telemetry. |
M31A_TELEMETRY_OUTFILE | Write telemetry to a file. |
M31A_TELEMETRY_TARGET | Telemetry target. |
M31A_TELEMETRY_OTLP_ENDPOINT | OTLP endpoint. |
M31A_TELEMETRY_OTLP_HEADERS | OTLP headers. |
M31A_TELEMETRY_OTLP_PROTOCOL | OTLP protocol. |
M31A_TELEMETRY_TRACES_ENABLED | Enable traces. |
M31A_TELEMETRY_LOG_PROMPTS | Log prompt content (avoid with sensitive data). |
M31A_DEBUG | Enable debug logging. |
M31A_DEBUG_LOG_FILE | Write debug logs to this file. |
M31A_ACTIVITY_LOG | Activity log output target. |
M31A_ACTIVITY_LOG_TARGET | Activity log destination. |
Terminal and rendering
| Variable | Purpose |
|---|---|
NO_COLOR | Disable color output. |
FORCE_COLOR | Force color output. |
TERM / COLORTERM | Terminal capability detection. |
DEBUG | General debug flag; excluded from project context by default. |
CI / GITHUB_ACTIONS | CI 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.