Qoder CLI CN's three-layer settings files, merge precedence, and common settings
Qoder CLI CN's behavior can be customized through JSON settings files (settings.json). Configuration is layered: the same setting can be set separately at different layers, then merged into the effective value by a fixed precedence. Understanding this layering and merge rule is the foundation for managing personal preferences and team conventions.This page covers the settings file locations, merge precedence, and common settings. For the complete list of settings and environment variables, see Settings, Environment Variables, and File Paths.
Qoder CLI CN reads three layers of settings files:
Layer
Path
Description
User
~/.qoder-cn/settings.json
Personal preferences, effective for all of the current user's projects.
Project
<project>/.qoder/settings.json
Project-shared settings, committed to version control and shared by the team.
Local
<project>/.qoder/settings.local.json
Personal in-project overrides, usually not committed to version control.
The config directory defaults to ~/.qoder-cn and can be changed with the QODERCN_CONFIG_DIR environment variable. For the full structure of the .qoder/ directory, see The .qoder Directory.
Arrays: some settings (such as deny lists and exclusion lists) use "union merge," combining and deduplicating values across layers; other arrays default to override behavior.
So at the project level you only need to write the fields you want to override — no need to copy the entire user configuration.
For security, project and local settings apply only when the current working directory is trusted. If the working directory is not trusted, Qoder CLI CN loads only the user settings and ignores the in-project settings.json and settings.local.json. Folder trust is controlled by security.folderTrust.enabled (on by default).
Settings files are JSON (with // comments supported, see below). The top level is one object; most settings are nested by group, while a few sit directly at the top level (such as outputStyle, language, agent). For example: