Qwen Code CLI reference - Config files
Qwen Code config files and locations
Qwen Code documents 22 config files, including ~/.qwen/settings.json, .qwen/settings.json and /etc/qwen-code/system-defaults.json. These are the files and directories Qwen Code reads its configuration from. Each row gives the docs' description, accepted values and an example where one is documented.
Last verified 9 official pagesFull Qwen Code reference
| Path | Description |
|---|---|
~/.qwen/settings.json | User settings file; applies to all Qwen Code sessions for the current user. Docs: ~/.qwen/settings.json |
.qwen/settings.json | Project settings file in the project root; overrides user settings for that project. Docs: .qwen/settings.json |
/etc/qwen-code/system-defaults.json | System defaults file (Linux path); lowest-precedence settings layer. Override with QWEN_CODE_SYSTEM_DEFAULTS_PATH. Windows: C:\ProgramData\qwen-code\system-defaults.json; macOS: /Library/Application Support/QwenCode/system-defaults.json Docs: /etc/qwen-code/system-defaults.json |
/etc/qwen-code/settings.json | System settings file (Linux path); overrides user and project settings. Override with QWEN_CODE_SYSTEM_SETTINGS_PATH. Windows: C:\ProgramData\qwen-code\settings.json; macOS: /Library/Application Support/QwenCode/settings.json Docs: /etc/qwen-code/settings.json |
.qwen/.env | Recommended project env file for Qwen Code variables; never filtered by the default excluded-vars list. Docs: .qwen/.env |
.env | Environment file loaded automatically; DEBUG and DEBUG_MODE are excluded from project .env files by default. Docs: .env |
~/.qwen/tmp/<project_hash>/shell_history | Project-specific history of shell commands run in the CLI. Docs: ~/.qwen/tmp/<project_hash>/shell_history |
QWEN.md | Default context file for hierarchical instructional context (configurable via context.fileName); /init creates one. Docs: QWEN.md |
~/.qwen/QWEN.md | Global context file that applies to all your projects. Docs: ~/.qwen/QWEN.md |
.qwen/QWEN.local.md | Personal, project-local context file. Docs: .qwen/QWEN.local.md |
.qwen/PROJECT_SUMMARY.md | Default output of /summary; read by the welcome-back flow. Docs: .qwen/PROJECT_SUMMARY.md |
.qwenignore | Ignore file whose patterns exclude files from Qwen Code tools. Docs: .qwenignore |
.qwen/sandbox-macos-<profile_name>.sb | Custom macOS Seatbelt profile selected with SEATBELT_PROFILE=<profile_name>. Docs: .qwen/sandbox-macos-<profile_name>.sb |
.qwen/sandbox.Dockerfile | Custom sandbox image definition for container-based sandboxing. Docs: .qwen/sandbox.Dockerfile |
.qwen/skills/<name>/SKILL.md | Project Agent Skill; each Skill is a directory containing a SKILL.md. Docs: .qwen/skills/<name>/SKILL.md |
~/.qwen/commands/ | Global custom slash command files (Markdown recommended; TOML deprecated); test.md becomes /test. Docs: ~/.qwen/commands/ |
<project>/.qwen/commands/ | Project custom slash command files; subdirectories form namespaces such as /git:commit. Docs: <project>/.qwen/commands/ |
~/.qwen/output-styles/<name>.md | User-level custom output style (project styles go in <project>/.qwen/output-styles/). Docs: ~/.qwen/output-styles/<name>.md |
~/.qwen/rules/ | User-level rules directory (or $QWEN_HOME/rules/); project rules go in <project>/.qwen/rules/. Docs: ~/.qwen/rules/ |
.lsp.json | LSP server configuration file in the project root (LSP is experimental, enabled with --experimental-lsp). Docs: .lsp.json |
~/.qwen/mcp-oauth-tokens.json | Default MCP OAuth token store (plaintext, mode 0600). Docs: ~/.qwen/mcp-oauth-tokens.json |
qwen-extension.json | Extension manifest file; Claude and Gemini manifests are converted to it on install. Docs: qwen-extension.json |
The rest of the Qwen Code reference
FAQ
How many config files does Qwen Code have?
The official Qwen Code docs list 22 config files, including ~/.qwen/settings.json, .qwen/settings.json and /etc/qwen-code/system-defaults.json. All of them are in the table above, in the docs' order.
What does ~/.qwen/settings.json do in Qwen Code?
User settings file; applies to all Qwen Code sessions for the current user.
Where are Qwen Code config files documented?
On 9 official docs pages at qwenlm.github.io, last read on October 17, 2026. Every row in the table links the exact section it came from.
Sources
Last verified . Names and examples are copied verbatim from the 9 official pages below, and every row above links the exact section it came from.
- qwenlm.github.io/qwen-code-docs/en/users/configuration/settings/11 items
- qwenlm.github.io/qwen-code-docs/en/users/features/memory/2 items
- qwenlm.github.io/qwen-code-docs/en/users/features/commands/3 items
- qwenlm.github.io/qwen-code-docs/en/users/configuration/qwen-ignore/1 item
- qwenlm.github.io/qwen-code-docs/en/users/features/sandbox/1 item
- qwenlm.github.io/qwen-code-docs/en/users/features/output-styles/1 item
- qwenlm.github.io/qwen-code-docs/en/users/features/rules/1 item
- qwenlm.github.io/qwen-code-docs/en/users/features/mcp/1 item
- qwenlm.github.io/qwen-code-docs/en/users/extension/introduction/1 item
Newsletter
Know when your tools change
One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.