Global configuration
config.json — default settings for mantish diff, and how settings are resolved.
Mantish reads one optional configuration document. You create and edit it yourself; the command never writes it, and never creates the directory.
| Platform | Path |
|---|---|
| macOS / Linux | ~/.mantish/config.json |
| Windows | %LOCALAPPDATA%\Mantish\config.json |
| Any, when set | $MANTISH_HOME/config.json |
{
"version": 1,
"diff": {
"defaultProfile": "review",
"defaults": {
"view": "split",
"muteTags": ["formatting", "whitespace"],
"spotlightTags": ["breaking"]
}
}
}
versionis required and must be1.diff.defaultsaccepts the same settings as a profile, minusversion.diff.defaultProfileselects a profile for everymantish diffyou run — by name or by path. Remove it to use onlydiff.defaults.- Unknown sections at the top level are left alone (other Mantish features may use them). Unknown keys inside
diffare refused, so a typo is caught rather than ignored.
How a setting is resolved
Highest priority first, field by field:
- An explicit flag on the command line.
- The selected profile —
--profile, ordiff.defaultProfile. diff.defaultsinconfig.json.- Your existing TUI preferences (display settings) and engine settings (tag sets).
- Mantish's built-in defaults.
A tag array replaces the set below it; [] clears it; an absent field inherits. false is a real value, not an absence — a profile can switch something off that a lower layer switched on.
Recovering from a broken file
mantish diff --no-profile
--no-profile skips config.json and every profile. Your TUI preferences and engine defaults still apply. Every configuration error names the file, the field and the problem, so the message usually tells you what to fix.
--config is something else
--config PATH means the TUI preference file (tui.json) — on mantish and mantish diff alike. It never selects a profile; --profile does that. tui.json keeps its own location:
$XDG_CONFIG_HOME/mantish/tui.json # else ~/.config/mantish/tui.json
config.json is the only user-owned file under Mantish's home directory; engine updates and uninstalls leave it, and your profiles, alone.