Config file
Also: 設定檔 · 配置文件 · config file · config
A file a program reads its own settings from — which model, which port, where keys live — written once, applied on every run.
When you will meet it
The first time you configure an AI tool you are almost always editing a config file, not clicking a GUI: settings.json, a .env for keys, an MCP server registry. Guides say "paste this into the config" — without knowing where that file lives, what format it uses and how to recover a broken edit, you are stuck at that one sentence. Reading config files is also the "write the setting once, keep it forever" skill that frees you from retyping flags.
An analogy
Like a regular's order card at a coffee shop: "no sugar, one ice" written once saves repeating it every visit. CLI flags are saying it aloud each time; a config file is writing it on the card.
Minimal example
# 每個設定都是從某個檔案讀來的 —— 這個指令把來源標在每一條前面:
git config --list --show-originEvery output line starts with the file that setting was read from — changing configuration literally means editing those files. Nearly every program has such a location; its documentation tells you where.
What people get wrong
- Editing config while the program runs and wondering why nothing changed. Many programs read config only at startup — and some write the file back on exit, overwriting your edit. Restart after changing, as the docs say.
- Skipping format validation after editing JSON/YAML configs. One missing comma or stray tab, and the failure is often just "failed to load config" with no line number. Run JSON through python3 -m json.tool; for YAML, check indentation first.
Related terms
Next
- 五分鐘設置你的 LLM 開發環境15 minChinese only
- A Deep Dive into Claude Code5 min