Fast, robust, accurate content-aware diffing: code by its syntax, and pictures, archives, fonts, cursors, message catalogs and PDFs by what they hold.

With no arguments, opens an interactive two-panel terminal UI. With BEFORE and AFTER file paths, diffs them directly - as the TUI, as plain text (--headless), or as a single JSON object (--mode json) for editor integrations. Also serves as a `git difftool` backend and a `jj` diff formatter; see `omnidiff git configure` and `omnidiff jj configure`.

Usage: omnidiff [OPTIONS] [PATHS]... [COMMAND]

Commands:
  git   git integration helpers
  jj    Jujutsu (jj) integration helpers
  util  Generate packaging artifacts (shell completions, man page)
  help  Print this message or the help of the given subcommand(s)

Arguments:
  [PATHS]...
          The files to diff: `BEFORE AFTER`, or git's 7- or 9-argument `GIT_EXTERNAL_DIFF` list (`path old-file old-hex old-mode new-file new-hex new-mode [new-path score]`). Without them the viewer starts empty

Options:
      --mode <MODE>
          How to show the diff. `headless` and `json` need BEFORE and AFTER. `headless` is also chosen when stdout is not a terminal; `json` never is

          Possible values:
          - tui:      The interactive viewer
          - headless: Plain text on stdout
          - json:     One JSON object on stdout, for editor integrations
          
          [default: tui]

      --headless
          Shorthand for `--mode headless`. `--batch` is a synonym

      --minimal
          Paint only the ranges that carry meaning: every option of the TUI's `M` panel off (its Minimal preset), so standalone brackets and separators, leading whitespace, and moves that only reindent or resize go unpainted. Without this or `--full`, the panel's last saved setting applies; either one applies to this run only and is not saved.
          
          `--minimal` and `--full` are two faithful readings of the same diff, not a right and a wrong one.

      --full
          Paint the fullest reading: every option of the `M` panel on except whole-pair updates (its Full preset)

      --whole-updates
          Highlight an updated node's matched pair whole (e.g. both `argument` and `i_am_an_argument`), instead of only the part that differs.
          
          Independent of `--minimal`/`--full`; combine freely.

      --paint-reindent-moves
          Paint a node as moved even when it only changed indentation (nesting added or removed around untouched content) - the `M` panel's "Paint reindent-only moves" row, forced on.
          
          Combine freely with the other render flags; it can only turn the option on.

      --color <WHEN>
          When to ANSI-color headless output. `auto` colors unless `NO_COLOR` is set, even when stdout is a pipe (git's pager shows color); `always` and `never` override `NO_COLOR`
          
          [default: auto]
          [possible values: auto, always, never]

      --exit-code
          Exit 1 when the files differ (0 when identical, 2 on error) - the `diff(1)` convention, for scripts and CI conditionals. Headless and JSON modes only.
          
          Off by default because version control systems read any non-zero exit from a display tool as a failure: jj warns on every file, and `git difftool` with `difftool.trustExitCode=true` aborts the whole diff. Ignored under git's `GIT_EXTERNAL_DIFF` argument form for the same reason.

      --context <N>
          Unchanged lines to keep around each change in headless output, like `diff -U N`
          
          [default: 3]

      --review
          Open on the git review picker - the repository around the current directory's unstaged files, staged files and recent commits - instead of an empty viewer (the `G` key, at startup). TUI only; takes no BEFORE/AFTER pair

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Exit codes: 0 on success, 2 on error. Pass --exit-code to additionally get 1 when the files differ (the diff(1) convention), which is off by default for the same reason `git diff` defaults to 0: when a VCS drives omnidiff as a display tool, a non-zero exit means "the tool failed", not "the files differ".
