mantish/ help / docs
Join the waitlist

Global configuration

config.json — default settings for mantish diff, and how settings are resolved.

Last updated

Mantish reads one optional configuration document. You create and edit it yourself; the command never writes it, and never creates the directory.

PlatformPath
macOS / Linux~/.mantish/config.json
Windows%LOCALAPPDATA%\Mantish\config.json
Any, when set$MANTISH_HOME/config.json
json
{
  "version": 1,
  "diff": {
    "defaultProfile": "review",
    "defaults": {
      "view": "split",
      "muteTags": ["formatting", "whitespace"],
      "spotlightTags": ["breaking"]
    }
  }
}
  • version is required and must be 1.
  • diff.defaults accepts the same settings as a profile, minus version.
  • diff.defaultProfile selects a profile for every mantish diff you run — by name or by path. Remove it to use only diff.defaults.
  • Unknown sections at the top level are left alone (other Mantish features may use them). Unknown keys inside diff are refused, so a typo is caught rather than ignored.

How a setting is resolved

Highest priority first, field by field:

  1. An explicit flag on the command line.
  2. The selected profile — --profile, or diff.defaultProfile.
  3. diff.defaults in config.json.
  4. Your existing TUI preferences (display settings) and engine settings (tag sets).
  5. 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

sh
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:

text
$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.

Was this page helpful?