Environment Variables

In MiMo Code, environment variables are not a general fallback for the config file. They serve four distinct roles: locating resources, runtime switches, compatibility and skipping, and auth and endpoints. Config fields (such as model / permission / server.port) are not read automatically from same-named environment variables; they must be injected explicitly via MIMOCODE_CONFIG or MIMOCODE_CONFIG_CONTENT.

Boolean variables follow a consistent rule: true / 1 means on, false / 0 means off; any other value or unset uses the default.


Resource location

VariableTypeDefaultEffect
MIMOCODE_HOMEstringSingle profile root (holds config/, data/, state/, cache/), overrides all XDG base dirs, must be an absolute path
MIMOCODE_CONFIGstringCustom config file path
MIMOCODE_CONFIG_DIRstringCustom config directory (same structure as .mimocode/)
MIMOCODE_CONFIG_CONTENTstringInline JSON config content
MIMOCODE_TUI_CONFIGstringCustom TUI config file path
MIMOCODE_PERMISSIONstringInline JSON permission config
MIMOCODE_DBstringOverride the database file path
MIMOCODE_MODELS_URLstringCustom model manifest fetch URL
MIMOCODE_MODELS_PATHstringCustom model manifest local path
MIMOCODE_GIT_BASH_PATHstringPath to the Git Bash executable on Windows

Runtime switches

VariableTypeDefaultEffect
MIMOCODE_PUREbooleanfalsePure runtime mode, disables all plugins
MIMOCODE_AUTO_SHAREbooleanfalseAuto-share sessions
MIMOCODE_DISABLE_SHAREbooleanfalseFully disable sharing
MIMOCODE_DISABLE_AUTOUPDATEbooleantrueDisable auto-update checks; set false to enable
MIMOCODE_ALWAYS_NOTIFY_UPDATEbooleanfalseNotify of new versions even when auto-update is disabled
MIMOCODE_DISABLE_AUTOCOMPACTbooleanfalseDisable automatic context compaction
MIMOCODE_DISABLE_PRUNEbooleanfalseDisable pruning of old data
MIMOCODE_DISABLE_TERMINAL_TITLEbooleanfalseDisable automatic terminal title updates
MIMOCODE_DISABLE_MOUSEbooleanfalseDisable TUI mouse capture
MIMOCODE_DISABLE_DEFAULT_PLUGINSbooleanfalseDisable default plugins
MIMOCODE_DISABLE_LSP_DOWNLOADbooleanfalseDisable LSP server auto-download
MIMOCODE_DISABLE_MODELS_FETCHbooleanfalseDisable fetching the model manifest from remote
MIMOCODE_DISABLE_EMBEDDED_WEB_UIbooleanfalseDisable the built-in Web UI
MIMOCODE_ENABLE_ANALYSISbooleantrueTelemetry switch (model_call / tool_call / agent_request), set false to turn off
MIMOCODE_ENABLE_EXPERIMENTAL_MODELSbooleanfalseEnable experimental models
MIMOCODE_ENABLE_EXAbooleanfalseEnable the Exa web search tool
MIMOCODE_ENABLE_QUESTION_TOOLbooleanfalseEnable the question tool
MIMOCODE_DISABLE_PROJECT_CONFIGbooleanfalseForbid reading in-project .mimocode/ config
MIMOCODE_DISABLE_GITbooleanfalseSkip all git detection, treat the project as a non-git directory
MIMOCODE_DISABLE_CHANNEL_DBbooleantrueAll channels share one mimocode.db; set false to restore per-channel isolation

Compatibility and skipping

Control the mutual visibility between MiMo Code and the Claude Code ecosystem and third-party skills.

VariableTypeDefaultEffect
MIMOCODE_MIMO_ONLYbooleantrueMaster switch for pure-mimo mode: don't inherit .claude/, don't read provider env vars, default model falls back to mimo-auto
MIMOCODE_DISABLE_PROVIDER_ENVbooleanfalseDisable provider env vars separately (implicitly on in mimo-only mode)
MIMOCODE_DISABLE_CLAUDE_CODEbooleanfalseExplicitly disable .claude/ inheritance when mimo-only is off (prompt + skills, excluding MCP)
MIMOCODE_DISABLE_CLAUDE_CODE_PROMPTbooleanfalseDisable ~/.claude/CLAUDE.md separately
MIMOCODE_DISABLE_CLAUDE_CODE_SKILLSbooleanfalseDisable .claude/skills separately
MIMOCODE_DISABLE_CLAUDE_CODE_MCPbooleanfalseDisable Claude Code MCP compatibility (still on by default in mimo-only mode)
MIMOCODE_DISABLE_EXTERNAL_SKILLSbooleanfalseDisable all external skill sources at once
MIMOCODE_DISABLE_CODEX_SKILLSbooleanfalseDisable codex skills separately
MIMOCODE_DISABLE_OPENCODE_SKILLSbooleanfalseDisable opencode skills separately
MIMOCODE_DISABLE_COMPOSE_SKILLSbooleanfalseDisable compose skills separately

Auth and endpoints

VariableTypeDefaultEffect
MIMOCODE_SERVER_PASSWORDstringEnable basic auth for serve / web
MIMOCODE_SERVER_USERNAMEstringmimocodeBasic auth username
MIMOCODE_AUTH_CONTENTstringInline JSON credential content (for CI injection)
MIMOCODE_CONSOLE_TOKENstringConsole auth token
MIMOCODE_WORKSPACE_IDstringWorkspace identifier
MIMOCODE_CLIENTstringcliClient identifier (affects USER_AGENT and tool registration)

Experimental

The variables below enable features that may change or be removed without notice. MIMOCODE_EXPERIMENTAL=true turns on all experimental items at once.

VariableTypeDefaultEffect
MIMOCODE_EXPERIMENTALbooleanfalseEnable all experimental features
MIMOCODE_EXPERIMENTAL_ICON_DISCOVERYbooleanfalseEnable icon discovery
MIMOCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECTbooleantrue on WinDisable TUI copy-on-select
MIMOCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MSnumberDefault bash command timeout (ms)
MIMOCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAXnumberMax output tokens for LLM responses
MIMOCODE_EXPERIMENTAL_FILEWATCHERbooleanfalseEnable whole-directory file watching
MIMOCODE_EXPERIMENTAL_DISABLE_FILEWATCHERbooleanfalseDisable file watching
MIMOCODE_EXPERIMENTAL_OXFMTbooleanfalseEnable the oxfmt formatter
MIMOCODE_EXPERIMENTAL_LSP_TOOLbooleanfalseEnable the experimental LSP tool
MIMOCODE_EXPERIMENTAL_LSP_TYbooleanfalseEnable TY LSP (Python)
MIMOCODE_EXPERIMENTAL_PLAN_MODEbooleanfalseEnable Plan mode
MIMOCODE_EXPERIMENTAL_MARKDOWNbooleantrueMarkdown rendering; set false to turn off
MIMOCODE_EXPERIMENTAL_HTTPAPIbooleanfalseEnable the experimental HTTP API
MIMOCODE_EXPERIMENTAL_WORKSPACESbooleanfalseEnable workspace support

Diagnostics and internal

The variables below are mainly for performance diagnostics, build testing, and CI sandboxes, and are not recommended for regular use.

VariableTypeDefaultEffect
MIMOCODE_SHOW_TTFDbooleanfalseShow time-to-first-draw in the TUI
MIMOCODE_AUTO_HEAP_SNAPSHOTbooleanfalseAuto-write a heap snapshot on startup
MIMOCODE_SKIP_MIGRATIONSbooleanfalseSkip database migrations
MIMOCODE_STRICT_CONFIG_DEPSbooleanfalseStrict config dependency mode
MIMOCODE_FAST_BOOTbooleanfalseFast boot (skip some sync checks)
MIMOCODE_PLUGIN_META_FILEstringPlugin metadata output file
MIMOCODE_FAKE_VCSstringMock VCS provider, for testing only
MIMOCODE_OUTPUT_LENGTH_CONTINUATION_LIMITnumber3Max continuations when output is too long
MIMOCODE_INVALID_OUTPUT_CONTINUATION_LIMITnumber2Max continuations on invalid output

Typical scenarios

Switch the profile root for isolated testing.

MIMOCODE_HOME=/tmp/mimocode-test mimo

Temporarily enable auto-update (disabled by default).

MIMOCODE_DISABLE_AUTOUPDATE=false mimo

Turn off telemetry reporting.

MIMOCODE_ENABLE_ANALYSIS=false mimo

Inject config and credentials via inline JSON in CI.

MIMOCODE_CONFIG_CONTENT='{"model":"mimo/mimo-v2.5-pro","share":"disabled"}' \
MIMOCODE_AUTH_CONTENT='{"anthropic":{"apiKey":"sk-..."}}' \
  mimo run "Generate release notes"

Turn off mimo-only mode to inherit Claude Code prompts and skills.

MIMOCODE_MIMO_ONLY=false mimo

Enable basic auth for serve.

MIMOCODE_SERVER_USERNAME=alice MIMOCODE_SERVER_PASSWORD=s3cret \
  mimo serve --port 4096