Where Does Crush Store Config and API Keys?
Crush reads config from crush.json in XDG config and the project, with API keys kept in the data directory.
Last updated
Crush layers three config files. Project files (.crush.json, then crush.json) win. Global defaults live at ~/.config/crush/crush.json on Unix. API keys and ephemeral state go somewhere else: ~/.local/share/crush/crush.json (%LOCALAPPDATA%\crush on Windows).
The secrets split is intentional. The data file holds keys, recent models, and tokens, while the config file stays clean enough to share or commit. Override either location with CRUSH_GLOBAL_CONFIG and CRUSH_GLOBAL_DATA when you need isolated profiles.
Where Crush stores this, by platform
~/.config/crush/crush.json
Global defaults: providers, models, MCPs, LSPs. Project .crush.json/crush.json in each repo overrides it. Rules in CRUSH.md beside it.
~/.config/crush/crush.json
Same layered layout as Linux. Data and keys stay in ~/.local/share/crush/crush.json instead.
%LOCALAPPDATA%\crush\crush.json
Config and data converge here on Windows. Project files still override. CRUSH_GLOBAL_CONFIG and CRUSH_GLOBAL_DATA relocate either.
Frequently asked questions
I entered my API key but cannot find it in crush.json. Where is it?
By design it lands in the data file (~/.local/share/crush/crush.json), not the config file. Configure providers and MCPs in ~/.config/crush/crush.json and let keys live in the data copy.
How do I share Crush rules with other coding tools?
Put generic instructions in ~/.config/AGENTS.md, which other agents read too. Keep Crush-specific rules in ~/.config/crush/CRUSH.md so they do not confuse other tools.
Notice an outdated path? Let us know.