> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configurations, Environment Variables, and File Paths

> Comprehensive reference of all Qoder CLI configuration items, default values, environment variables, and file paths

This page lists all configuration groups, key fields, default values, and restart requirements for `settings.json`, along with supported environment variables. For configuration file layering and merging rules, see [Configuration Files and Application Order](/cli/settings).

Configuration file locations:

| Level         | Path                                   |
| ------------- | -------------------------------------- |
| User Level    | `~/.qoder/settings.json`               |
| Project-Level | `<project>/.qoder/settings.json`       |
| Local Level   | `<project>/.qoder/settings.local.json` |

JSON Schema is available for editor auto-completion, located in the project `schemas/settings.schema.json`.

## Top-Level Configurations

| Configuration Item  | Type    | Default | Restart | Description                                                                                         |
| ------------------- | ------- | ------- | ------- | --------------------------------------------------------------------------------------------------- |
| `mcpServers`        | object  | `{}`    | Yes     | MCP server configuration. See [MCP reference](/cli/mcp-reference).                                  |
| `autoMemoryEnabled` | boolean | `false` | Yes     | Enable Auto-Memory for interactive sessions.                                                        |
| `outputStyle`       | string  | None    | Yes     | Active output style name. Compatible with `general.outputStyle` syntax, top-level takes precedence. |
| `language`          | string  | None    | Yes     | Preferred language for AI responses (e.g., "Chinese").                                              |
| `vpcInstanceName`   | string  | None    | Yes     | VPC Private Deployment instance name (CN edition only).                                             |
| `agent`             | string  | None    | Yes     | Agent name used by the main thread.                                                                 |
| `enabledPlugins`    | object  | `{}`    | Yes     | Plugin enablement mapping (plugin ID → true/false). See [Plugins](/cli/plugins-reference).          |
| `hooks`             | object  | `{}`    | No      | Event-based Hooks configuration. See [Hooks reference](/cli/hooks-reference).                       |

## spellcheck (Spell Checking)

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.

| Configuration Item    | Type    | Default           | Restart | Description                                                                                                                                                                                  |
| --------------------- | ------- | ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `spellcheck.enabled`  | boolean | `false`           | No      | Turn on spell checking of the prompt input.                                                                                                                                                  |
| `spellcheck.checker`  | enum    | `auto`            | No      | Which checker to run: `auto`/`aspell`/`hunspell`/`ispell`. `auto` takes the first one found on `PATH`.                                                                                       |
| `spellcheck.language` | string  | None              | No      | Dictionary 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.color`    | string  | Theme error color | No      | Color 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 (General)

| Configuration Item                      | Type    | Default               | Restart | Description                                                                                      |
| --------------------------------------- | ------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------ |
| `general.preferredEditor`               | string  | None                  | No      | Preferred editor for opening files.                                                              |
| `general.vimMode`                       | boolean | `false`               | No      | Enable Vim Keybindings.                                                                          |
| `general.defaultPermissionMode`         | enum    | `default`             | No      | Default Permission Mode: `default`/`accept_edits`/`plan`/`auto`/`bypass_permissions`/`dont_ask`. |
| `general.enableAutoUpdate`              | boolean | `true`                | No      | Enable auto-updates.                                                                             |
| `general.enableNotifications`           | boolean | `false`               | No      | Enable run event notifications.                                                                  |
| `general.maxAttempts`                   | number  | `10`                  | No      | Maximum retry attempts for main conversational model requests (up to 10).                        |
| `general.retryFetchErrors`              | boolean | `true`                | No      | Auto-retry on network request exceptions such as `fetch failed`.                                 |
| `general.fileCheckpointing.enabled`     | boolean | `true`                | Yes     | Enable file checkpoints (code rollback).                                                         |
| `general.plan.enabled`                  | boolean | `true`                | Yes     | Enable Plan Mode.                                                                                |
| `general.plan.directory`                | string  | System temp directory | Yes     | Directory for storing plan artifacts.                                                            |
| `general.plan.modelRouting`             | boolean | `true`                | No      | Auto-switch models during Plan/implementation phases.                                            |
| `general.sessionRetention.enabled`      | boolean | `true`                | No      | Enable automatic session cleanup.                                                                |
| `general.sessionRetention.maxAge`       | string  | `30d`                 | No      | Automatically delete sessions older than this duration.                                          |
| `general.sessionRetention.minRetention` | string  | `1d`                  | No      | Minimum retention period (safety lower bound).                                                   |

## output (Output)

| Configuration Item | Type | Default | Description                          |
| ------------------ | ---- | ------- | ------------------------------------ |
| `output.format`    | enum | `text`  | CLI output format: `text` or `json`. |

## ui (UI)

| Configuration Item                     | Type      | Default | Restart | Description                                                                                                                          |
| -------------------------------------- | --------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ui.theme`                             | string    | None    | No      | Color theme name.                                                                                                                    |
| `ui.autoThemeSwitching`                | boolean   | `true`  | No      | Auto-switch Light and Dark Theme based on terminal background.                                                                       |
| `ui.terminalBackgroundPollingInterval` | number    | `60`    | No      | Terminal background color polling interval (seconds).                                                                                |
| `ui.customThemes`                      | object    | `{}`    | No      | Custom theme definitions.                                                                                                            |
| `ui.inlineThinkingMode`                | enum      | `full`  | No      | inline thinking display: `off`/`full`.                                                                                               |
| `ui.maxTurns`                          | enum      | `1000`  | No      | Maximum model/tool-loop turns per submitted TUI prompt: `1000`/`2000`/`3000`/`unlimited`. Does not affect `-p`/`--print`.            |
| `ui.dynamicWindowTitle`                | boolean   | `true`  | No      | Update window title with Status Icon.                                                                                                |
| `ui.hideBanner`                        | boolean   | `false` | No      | Hide Startup banner.                                                                                                                 |
| `ui.hideFooter`                        | boolean   | `false` | No      | Hide Footer.                                                                                                                         |
| `ui.hideTips`                          | boolean   | `false` | No      | Hide prompts.                                                                                                                        |
| `ui.showLineNumbers`                   | boolean   | `true`  | No      | Show Line number in conversations.                                                                                                   |
| `ui.renderMermaid`                     | boolean   | `true`  | No      | Render closed `mermaid` code blocks as text diagrams. Blocks that cannot be drawn show as source.                                    |
| `ui.compactToolOutput`                 | boolean   | `true`  | No      | Compact display for tool output.                                                                                                     |
| `ui.copyFullResponse`                  | boolean   | `false` | No      | `/copy` always copies the full response.                                                                                             |
| `ui.loadingPhrases`                    | enum      | `off`   | No      | Loading display: `tips`/`witty`/`all`/`off`.                                                                                         |
| `ui.errorVerbosity`                    | enum      | `low`   | No      | Recoverable error verbosity: `low`/`full`.                                                                                           |
| `ui.customWittyPhrases`                | string\[] | `[]`    | No      | Custom loading phrases.                                                                                                              |
| `ui.footer.*`                          | object    | `{}`    | No      | Footer item configuration (items/showLabels/hideCWD/hideModelInfo, etc.).                                                            |
| `ui.rotatingInfoLine.enabled`          | boolean   | `true`  | No      | Carousel info line above the input box.                                                                                              |
| `ui.rotatingInfoLine.intervalMs`       | number    | `4000`  | No      | Carousel interval in milliseconds.                                                                                                   |
| `ui.useAlternateBuffer`                | boolean   | `false` | Yes     | Use alternate buffer.                                                                                                                |
| `ui.accessibility.screenReader`        | boolean   | `false` | Yes     | Screen Reader Mode, outputs plain text.                                                                                              |
| `ui.showMemoryUsage`                   | boolean   | `false` | No      | Display memory usage information in the UI.                                                                                          |
| `ui.showSpinner`                       | boolean   | `true`  | No      | Show loading animation during operations.                                                                                            |
| `ui.terminalBuffer`                    | boolean   | `true`  | Yes     | Use the new Terminal Buffer architecture for rendering.                                                                              |
| `ui.renderProcess`                     | boolean   | `true`  | Yes     | Enable Ink Render Process.                                                                                                           |
| `ui.incrementalRendering`              | boolean   | `true`  | Yes     | incremental rendering, reduces flickering but may cause rendering artifacts; only supported when `ui.useAlternateBuffer` is enabled. |

## model / modelConfigs (Models)

| Configuration Item             | Type   | Default  | Restart | Description                                                                                                                       |
| ------------------------------ | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `model.name`                   | string | None     | No      | conversational model.                                                                                                             |
| `model.reasoningEffort`        | enum   | None     | No      | Reasoning Effort: `disabled`/`off`/`none`/`low`/`medium`/`high`/`xhigh`/`max`.                                                    |
| `model.contextWindow`          | number | None     | No      | Explicit Context Window (tokens).                                                                                                 |
| `model.summarizeToolOutput`    | object | None     | No      | Set output summary token budget per tool.                                                                                         |
| `modelConfigs.aliases`         | object | Built-in | No      | Model Configuration Alias presets.                                                                                                |
| `modelConfigs.customAliases`   | object | `{}`     | No      | Custom aliases, merged to override built-in ones.                                                                                 |
| `modelConfigs.overrides`       | array  | `[]`     | No      | Apply configuration overrides based on matching conditions (primary key is model or alias); the most specific match takes effect. |
| `modelConfigs.customOverrides` | array  | `[]`     | No      | Custom overrides, merged and appended with built-in overrides.                                                                    |

## context (Context)

| Configuration Item                                | Type             | Default     | Restart | Description                                                                                                  |
| ------------------------------------------------- | ---------------- | ----------- | ------- | ------------------------------------------------------------------------------------------------------------ |
| `context.fileName`                                | string/string\[] | `AGENTS.md` | No      | Context file names loaded into memory.                                                                       |
| `context.importFormat`                            | enum             | None        | No      | Memory import format: `tree`/`flat`.                                                                         |
| `context.discoveryMaxDirs`                        | number           | `200`       | No      | Maximum number of directories for Memory discovery.                                                          |
| `context.memoryBoundaryMarkers`                   | string\[]        | `['.git']`  | Yes     | Boundary markers for upward memory discovery.                                                                |
| `context.loadMemoryFromIncludeDirectories`        | boolean          | `false`     | No      | Load memory from Additional trusted directories.                                                             |
| `context.fileFiltering.respectGitIgnore`          | boolean          | `true`      | Yes     | Follow `.gitignore` during search.                                                                           |
| `context.fileFiltering.enableRecursiveFileSearch` | boolean          | `true`      | Yes     | Recursive search during `@` reference completion.                                                            |
| `agentsMdExcludes`                                | string\[]        | `[]`        | Yes     | Exclude project-level / local-level memory files by glob. Top-level key, supports manual configuration only. |

## tools (Tools)

| Configuration Item              | Type      | Default | Restart | Description                                     |
| ------------------------------- | --------- | ------- | ------- | ----------------------------------------------- |
| `tools.shell.pager`             | string    | `cat`   | No      | Shell output paging command.                    |
| `tools.shell.inactivityTimeout` | number    | `300`   | No      | Shell no-output timeout in seconds.             |
| `tools.core`                    | string\[] | None    | Yes     | Built-in tool Allowlist.                        |
| `tools.exclude`                 | string\[] | None    | Yes     | Tool names excluded from discovery.             |
| `tools.useRipgrep`              | boolean   | `true`  | No      | Use ripgrep for content search.                 |
| `tools.disableLLMCorrection`    | boolean   | `true`  | Yes     | Disable LLM error correction for editing tools. |

## mcp (MCP)

| Configuration Item               | Type      | Default | Restart | Description                                                   |
| -------------------------------- | --------- | ------- | ------- | ------------------------------------------------------------- |
| `mcp.allowed`                    | string\[] | None    | Yes     | Allowed MCP server list.                                      |
| `mcp.excluded`                   | string\[] | None    | Yes     | Excluded MCP server list.                                     |
| `mcp.enableAllProjectMcpServers` | boolean   | `false` | Yes     | Auto-approve all project-level MCP servers.                   |
| `mcp.enabledProjectMcpServers`   | string\[] | `[]`    | Yes     | List of individually approved project-level MCP server names. |
| `mcp.lazyLoad`                   | boolean   | `false` | Yes     | Lazy load MCP tools (exposes Meta Tool).                      |

## security (Security)

| Configuration Item                              | Type      | Default | Restart | Description                                                                 |
| ----------------------------------------------- | --------- | ------- | ------- | --------------------------------------------------------------------------- |
| `security.folderTrust.enabled`                  | boolean   | `true`  | Yes     | Enable Folder Trust.                                                        |
| `security.disableYoloMode`                      | boolean   | `false` | Yes     | Disable `bypass_permissions` (YOLO) Permission Mode.                        |
| `security.blockGitExtensions`                   | boolean   | `false` | Yes     | Block installing/loading extensions from Git.                               |
| `security.allowedExtensions`                    | string\[] | `[]`    | Yes     | Extension source regex Allowlist.                                           |
| `security.environmentVariableRedaction.enabled` | boolean   | `false` | Yes     | Enable Environment Variable Masking for variables that may contain secrets. |

## permissions (Permissions)

| Configuration Item                  | Type      | Default | Restart | Description                                                                                                                                      |
| ----------------------------------- | --------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `permissions.allow`                 | string\[] | `[]`    | No      | List of automatically allowed permission rules. For rule syntax, see [Permissions](/cli/permissions).                                            |
| `permissions.ask`                   | string\[] | `[]`    | No      | List of permission rules requiring confirmation.                                                                                                 |
| `permissions.deny`                  | string\[] | `[]`    | No      | List of always denied permission rules.                                                                                                          |
| `permissions.additionalDirectories` | string\[] | `[]`    | No      | Additional trusted directories added to workspace context (corresponding to `/add-dir`).                                                         |
| `permissions.trustDirectories`      | string\[] | `[]`    | No      | Directories explicitly trusted by the user; stored in user-level configuration and not overridden by project-level configuration.                |
| `autoMode`                          | object    | `{}`    | No      | Auto mode classifier soft-steering rules (`allow`/`soft_deny`/`environment`). Top-level key, read only from user-level and local configurations. |
| `allowManagedPermissionRulesOnly`   | boolean   | `false` | No      | Use only Managed Policy permission rules. Top-level key, primarily used for organizational managed policies.                                     |

## privacy / aiCodeStatistics (Privacy)

| Configuration Item               | Type    | Default | Restart | Description                                       |
| -------------------------------- | ------- | ------- | ------- | ------------------------------------------------- |
| `privacy.usageStatisticsEnabled` | boolean | `true`  | No      | Share usage data; turn off to enter Privacy mode. |
| `aiCodeStatistics.enabled`       | boolean | `true`  | Yes     | Record and report AI-generated code statistics.   |

## advanced (Advanced)

| Configuration Item             | Type      | Default                  | Restart | Description                                                                                                                              |
| ------------------------------ | --------- | ------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `advanced.autoConfigureMemory` | boolean   | `true`                   | Yes     | Auto-configure Node.js memory limit.                                                                                                     |
| `advanced.dnsResolutionOrder`  | string    | None                     | Yes     | DNS resolution order.                                                                                                                    |
| `advanced.excludedEnvVars`     | string\[] | `['DEBUG','DEBUG_MODE']` | No      | Environment variables excluded from project context.                                                                                     |
| `agents.overrides`             | object    | `{}`                     | Yes     | Override configuration by Agent name (enablement, tools, models, run limits, etc.). For fields, see [Subagent](/cli/builtins-reference). |

## statusLine (Status Bar)

| Configuration Item   | Type   | Default   | Description                                                                                         |
| -------------------- | ------ | --------- | --------------------------------------------------------------------------------------------------- |
| `statusLine.type`    | string | `command` | Status bar type.                                                                                    |
| `statusLine.command` | string | `""`      | Shell command to generate the status bar, receives session data JSON via stdin.                     |
| `statusLine.padding` | number | `0`       | Number of horizontal padding characters.                                                            |
| `statusLine.colors`  | object | `{}`      | Custom paragraph colors for the built-in default status bar (e.g., `model`, `branch`, `separator`). |

## Environment Variables

### Qoder-Related

| Environment Variable          | Description                                                                                       |
| ----------------------------- | ------------------------------------------------------------------------------------------------- |
| `QODER_PERSONAL_ACCESS_TOKEN` | Personal Access Token (PAT). When set, PAT authentication is used automatically.                  |
| `QODER_CONFIG_DIR`            | User configuration directory location (default: `~/.qoder`).                                      |
| `QODER_MODEL`                 | Specifies the model to use.                                                                       |
| `QODER_WORKING_DIR`           | Working Directory.                                                                                |
| `QODER_SESSION_ID`            | Session ID.                                                                                       |
| `QODER_SESSION_NAME`          | Session name.                                                                                     |
| `QODER_PERMISSION_MODE`       | Permission Mode.                                                                                  |
| `QODER_APPEND_SYSTEM_PROMPT`  | Appends to the System Prompt.                                                                     |
| `QODER_MCP_LAZY`              | Enables MCP Lazy Loading when set to `1`.                                                         |
| `QODER_ASR_URL`               | Speech recognition service URL.                                                                   |
| `QODER_SUBAGENT_MODEL`        | Model used by Subagents.                                                                          |
| `QODER_MEMORY`                | Enables Auto-memory when set to `1` (only applies to interactive sessions).                       |
| `QODER_MEMORY_USER`           | Enables user-level Auto-memory when set to `1`; only takes effect when `QODER_MEMORY` is enabled. |

### Network and Proxy

| Environment Variable          | Description                                                                                                               |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `HTTP_PROXY` / `http_proxy`   | Proxy address for HTTP requests.                                                                                          |
| `HTTPS_PROXY` / `https_proxy` | Proxy address for HTTPS requests.                                                                                         |
| `NO_PROXY` / `no_proxy`       | Comma-separated list of hosts to bypass the proxy.                                                                        |
| `NODE_EXTRA_CA_CERTS`         | Path to an additional CA certificate file (PEM format).                                                                   |
| `SSL_CERT_FILE`               | Specifies the path to a trusted certificate file for Self-Signed Certificate or Enterprise root certificate environments. |

## Next Steps

- Configuration layering and merging rules: [Configuration Files and Application Order](/cli/settings).
- Network and proxy configuration: [Network, Proxy, and VPC](/cli/network).
