Skip to main content
Reference

Settings, Environment Variables, and File Paths

The full table of Qoder CLI CN settings, defaults, environment variables, and file paths

This page lists all settings.json configuration groups, key fields, defaults, and whether a restart is required, plus the supported environment variables. For settings file layering and merge rules, see Settings Files and Precedence. Settings file locations:
LayerPath
User~/.qoder-cn/settings.json
Project<project>/.qoder/settings.json
Local<project>/.qoder/settings.local.json
A JSON Schema is available for editor autocompletion at schemas/settings.schema.json in the project.

Top-level settings

SettingTypeDefaultRestartDescription
mcpServersobject{}YesMCP server configuration. See MCP Reference.
outputStylestringnoneYesName of the active output style. The general.outputStyle form is also accepted; top level wins.
languagestringnoneYesPreferred language for AI responses (e.g. "Chinese").
vpcInstanceNamestringnoneYesVPC private deployment instance name (CN edition only).
agentstringnoneYesName of the Agent used for the main thread.
enabledPluginsobject{}YesPlugin enablement map (plugin ID → true/false). See Plugins.
hooksobject{}NoHooks configured per event. See Hooks Reference.

spellcheck

Underlines misspelled words in the prompt input as you type, using an aspell, hunspell, or ispell installation found on PATH. Off by default; no process starts until spellcheck.enabled is true, and nothing happens if no checker is installed. Read from user-level settings and the --settings flag only. The whole block from the highest-precedence of those two applies — the block is taken as a unit rather than merged field by field, so the block that wins must carry every value it needs. A spellcheck block in project-level or local-level settings is ignored, because these values decide which program is run.
SettingTypeDefaultRestartDescription
spellcheck.enabledbooleanfalseNoTurn on spell checking of the prompt input.
spellcheck.checkerenumautoNoWhich checker to run: auto/aspell/hunspell/ispell. auto takes the first one found on PATH.
spellcheck.languagestringnoneNoDictionary passed to the checker as-is (aspell --lang, hunspell -d, ispell -d), e.g. en_GB. Must be a plain dictionary name; otherwise the checker's own default dictionary applies.
spellcheck.colorstringTheme error colorNoColor of misspelled words, which are also underlined: a color name such as red, #rrggbb, rgb(r,g,b), ansi256(n), or ansi:<name>.
Words are checked conservatively: text inside backticks, paths, URLs, flags, email addresses, words containing an interior capital, and words in scripts a Latin dictionary cannot judge are all skipped, as is the word the cursor is currently in. Spell checking applies to the interactive prompt input only.

general

SettingTypeDefaultRestartDescription
general.preferredEditorstringnoneNoPreferred editor for opening files.
general.vimModebooleanfalseNoEnable Vim keybindings.
general.defaultPermissionModeenumdefaultNoDefault permission mode: default/accept_edits/plan/auto/bypass_permissions/dont_ask.
general.enableAutoUpdatebooleantrueNoEnable auto-update.
general.enableNotificationsbooleanfalseNoEnable run-event notifications.
general.maxAttemptsnumber10NoMaximum attempts for main-conversation model requests (capped at 10).
general.retryFetchErrorsbooleantrueNoAutomatically retry on fetch failed-style network request errors.
general.fileCheckpointing.enabledbooleantrueYesEnable file checkpointing (code rewind).
general.plan.enabledbooleantrueYesEnable Plan mode.
general.plan.directorystringsystem temp dirYesDirectory where plan artifacts are stored.
general.plan.modelRoutingbooleantrueNoAutomatically switch models between the Plan and implementation phases.
general.sessionRetention.enabledbooleantrueNoEnable automatic session cleanup.
general.sessionRetention.maxAgestring30dNoAutomatically delete sessions older than this duration.
general.sessionRetention.minRetentionstring1dNoMinimum retention period (safety floor).

output

SettingTypeDefaultDescription
output.formatenumtextCLI output format: text or json.

ui

SettingTypeDefaultRestartDescription
ui.themestringnoneNoColor theme name.
ui.autoThemeSwitchingbooleantrueNoAutomatically switch light/dark themes based on the terminal background.
ui.terminalBackgroundPollingIntervalnumber60NoTerminal background color polling interval (seconds).
ui.customThemesobject{}NoCustom theme definitions.
ui.inlineThinkingModeenumfullNoInline thinking display: off/full.
ui.dynamicWindowTitlebooleantrueNoUpdate the window title with status icons.
ui.hideBannerbooleanfalseNoHide the startup banner.
ui.hideFooterbooleanfalseNoHide the footer.
ui.hideTipsbooleanfalseNoHide tips.
ui.showLineNumbersbooleantrueNoShow line numbers in the conversation.
ui.compactToolOutputbooleantrueNoDisplay tool output compactly.
ui.copyFullResponsebooleanfalseNo/copy always copies the full response.
ui.loadingPhrasesenumoffNoLoading display: tips/witty/all/off.
ui.errorVerbosityenumlowNoRecoverable error verbosity: low/full.
ui.customWittyPhrasesstring[][]NoCustom loading phrases.
ui.footer.*object{}NoFooter item configuration (items/showLabels/hideCWD/hideModelInfo, etc.).
ui.rotatingInfoLine.enabledbooleantrueNoRotating info line above the input box.
ui.rotatingInfoLine.intervalMsnumber4000NoRotation interval in milliseconds.
ui.useAlternateBufferbooleanfalseYesUse the alternate screen buffer.
ui.accessibility.screenReaderbooleanfalseYesScreen reader mode, outputting plain text.
ui.showMemoryUsagebooleanfalseNoShow memory usage information in the interface.
ui.showSpinnerbooleantrueNoShow a loading animation during operations.
ui.terminalBufferbooleantrueYesUse the new terminal buffer architecture for rendering.
ui.renderProcessbooleantrueYesEnable the Ink render process.
ui.incrementalRenderingbooleantrueYesIncremental rendering — less flicker but possible rendering artifacts; supported only with ui.useAlternateBuffer enabled.

model / modelConfigs

SettingTypeDefaultRestartDescription
model.namestringnoneNoThe conversation model.
model.reasoningEffortenumnoneNoReasoning effort: disabled/off/none/low/medium/high/xhigh/max.
model.contextWindownumbernoneNoExplicit context window (tokens).
model.maxSessionTurnsnumber-1NoMaximum turns retained per session; -1 for unlimited.
model.summarizeToolOutputobjectnoneNoPer-tool output summarization token budgets.
modelConfigs.aliasesobjectbuilt-inNoModel configuration alias presets.
modelConfigs.customAliasesobject{}NoCustom aliases, merged over the built-ins.
modelConfigs.overridesarray[]NoConfiguration overrides applied by match conditions (keyed by model or alias); the most specific match wins.
modelConfigs.customOverridesarray[]NoCustom overrides, appended to the built-in overrides.

context

SettingTypeDefaultRestartDescription
context.fileNamestring/string[]AGENTS.mdNoContext file name(s) loaded into memory.
context.importFormatenumnoneNoMemory import format: tree/flat.
context.discoveryMaxDirsnumber200NoMaximum directories for memory discovery.
context.memoryBoundaryMarkersstring[]['.git']YesBoundary markers for upward memory discovery.
context.loadMemoryFromIncludeDirectoriesbooleanfalseNoLoad memory from additional trusted directories.
context.fileFiltering.respectGitIgnorebooleantrueYesRespect .gitignore when searching.
context.fileFiltering.enableRecursiveFileSearchbooleantrueYesSearch recursively for @ reference completion.
agentsMdExcludesstring[][]YesExclude project/local memory files by glob. A top-level key, manual configuration only.

tools

SettingTypeDefaultRestartDescription
tools.sandboxboolean/string/objectnoneYesSandboxed execution environment.
tools.sandboxAllowedPathsstring[][]YesAdditional paths accessible in the sandbox.
tools.sandboxNetworkAccessbooleanfalseYesWhether the sandbox allows network access.
tools.shell.pagerstringcatNoPager command for shell output.
tools.shell.inactivityTimeoutnumber300NoTimeout in seconds for shell commands with no output.
tools.corestring[]noneYesBuilt-in tool allowlist.
tools.excludestring[]noneYesTool names excluded from discovery.
tools.useRipgrepbooleantrueNoUse ripgrep for content search.
tools.disableLLMCorrectionbooleantrueYesDisable LLM correction in editing tools.

mcp

SettingTypeDefaultRestartDescription
mcp.allowedstring[]noneYesAllowed MCP server list.
mcp.excludedstring[]noneYesExcluded MCP server list.
mcp.enableAllProjectMcpServersbooleanfalseYesAuto-approve all project-level MCP servers.
mcp.enabledProjectMcpServersstring[][]YesList of individually approved project-level MCP server names.
mcp.lazyLoadbooleanfalseYesLazily load MCP tools (exposes meta tools).

security

SettingTypeDefaultRestartDescription
security.folderTrust.enabledbooleantrueYesEnable folder trust.
security.toolSandboxingbooleanfalseYesTool-level sandbox isolation.
security.disableYoloModebooleanfalseYesDisable the bypass_permissions (YOLO) permission mode.
security.blockGitExtensionsbooleanfalseYesBlock installing/loading extensions from Git.
security.allowedExtensionsstring[][]YesRegex allowlist of extension sources.
security.environmentVariableRedaction.enabledbooleanfalseYesRedact environment variables that may contain secrets.
security.enableConsecabooleanfalseYesEnable context-aware security checks.

permissions

SettingTypeDefaultRestartDescription
permissions.allowstring[][]NoList of automatically allowed permission rules. For rule syntax, see Permissions and Directory Trust.
permissions.askstring[][]NoList of permission rules requiring confirmation.
permissions.denystring[][]NoList of permission rules always denied.
permissions.additionalDirectoriesstring[][]NoAdditional trusted directories added to the workspace context (corresponds to /add-dir).
permissions.trustDirectoriesstring[][]NoDirectories explicitly trusted by the user; stored in the user-level configuration and never overridden by the project level.
autoModeobject{}NoAuto-mode classifier soft-steering rules (allow/soft_deny/environment). A top-level key, read only from the user-level and local configuration.
allowManagedPermissionRulesOnlybooleanfalseNoUse only permission rules from managed policies. A top-level key, mainly for organization-managed policies.

privacy / aiCodeStatistics

SettingTypeDefaultRestartDescription
privacy.usageStatisticsEnabledbooleantrueNoShare usage data; turning it off enters privacy mode.
aiCodeStatistics.enabledbooleantrueYesRecord and report AI-generated code statistics.

advanced

SettingTypeDefaultRestartDescription
advanced.autoConfigureMemorybooleantrueYesAutomatically configure the Node.js memory limit.
advanced.dnsResolutionOrderstringnoneYesDNS resolution order.
advanced.excludedEnvVarsstring[]['DEBUG','DEBUG_MODE']NoEnvironment variables excluded from project context.
agents.overridesobject{}YesOverride configuration per Agent name (enablement, tools, model, run limits, etc.). For fields, see Subagents.

statusLine

SettingTypeDefaultDescription
statusLine.typestringcommandStatus line type.
statusLine.commandstring""Shell command that produces the status line, receiving session data JSON via stdin.
statusLine.paddingnumber0Horizontal padding characters.
statusLine.colorsobject{}Custom colors for the built-in default status line's segments (such as model, branch, separator).

Environment variables

Environment variableDescription
QODERCN_PERSONAL_ACCESS_TOKENPersonal Access Token (PAT); when set, PAT authentication is used automatically.
QODERCN_CONFIG_DIRUser config directory location (default ~/.qoder-cn).
QODERCN_MODELThe model to use.
QODERCN_WORKING_DIRThe working directory.
QODERCN_SESSION_IDSession ID.
QODERCN_SESSION_NAMESession name.
QODERCN_PERMISSION_MODEPermission mode.
QODERCN_APPEND_SYSTEM_PROMPTAppend to the system prompt.
QODER_MCP_LAZYSet to 1 to enable MCP lazy loading.
QODERCN_SANDBOXSandbox command or switch.
QODERCN_SANDBOX_IMAGECustom sandbox image.
QODERCN_SANDBOX_IMAGE_DEFAULTDefault sandbox image.
QODERCN_SANDBOX_PROXY_COMMANDProxy command inside the sandbox.
SANDBOXInjected by the sandbox environment to detect being inside a sandbox and avoid nesting (usually no need to set manually).
QODER_ASR_URLSpeech recognition service address.
QODERCN_SUBAGENT_MODELThe model used by subagents.
QODERCN_MEMORYSet to 1 to enable auto-memory (interactive sessions only).
QODERCN_MEMORY_USERSet to 1 to also enable user-level auto-memory; effective only when QODERCN_MEMORY is enabled.

Network proxy

Environment variableDescription
HTTP_PROXY / http_proxyProxy address for HTTP requests.
HTTPS_PROXY / https_proxyProxy address for HTTPS requests.
NO_PROXY / no_proxyComma-separated list of hosts that bypass the proxy.
NODE_EXTRA_CA_CERTSPath to an additional CA certificate file (PEM format).
SSL_CERT_FILEPath to a trusted certificate file, for self-signed or corporate root certificate environments.

Next steps