Skip to content

CLI reference

Every command-line option for the Diffgazer binary.

The diffgazer binary takes options only. It accepts no positional arguments, so anything that is not a recognized flag fails parsing.

Synopsis

text
Usage: diffgazer [options]

Review code changes with Diffgazer in your browser or terminal.

Options:
  --tui              Start the terminal UI
  --theme <theme>    Start TUI with a theme: auto, dark, light, high-contrast (only with --tui)
  -V, --version      Display version
  -h, --help         Display help

Options

OptionDescription
--tuiStart the terminal UI. See the TUI overview.
--theme <theme>Start the TUI with one of auto, dark, light, or high-contrast. Only valid together with --tui. See TUI themes.
-V, --versionPrint the version and exit.
-h, --helpPrint the usage text shown above and exit.

--help is checked before --version, and both are checked before any launch flag. If you pass --help (or -h), the CLI prints the usage block and exits without starting anything, even when --tui, --theme, or other flags are also present.

Behavior

  • With no options, diffgazer starts the web environment and opens your browser.
  • --tui starts the terminal UI and does not open a browser. The TUI module is loaded only when you pass this flag.
  • --theme <theme> selects the starting theme for the TUI. The theme value is read only when --tui is also present.
  • --theme without --tui is a usage error. The CLI throws --theme requires --tui. and exits with a non-zero status.
  • Unknown options and any positional argument fail parsing. The parser runs in strict mode with positionals disabled, so a typo'd flag or a stray argument stops the CLI before it launches anything.
  • --version prints the binary version. A build stamps the real version in; running from source instead reports the 0.0.0-dev fallback.
Info:

Note: The terminal UI is still catching up to the web environment. Use web mode for day-to-day reviews unless you specifically want the TUI.

Exit and signals

  • Pressing Ctrl+C, or sending SIGINT or SIGTERM, stops the running web server and then exits. Each signal is handled once: the CLI starts a graceful shutdown, waits for it within a grace window, and exits with status 0 whether shutdown finished or the window elapsed first.
  • Any error during startup prints the error message to standard error and sets a non-zero exit code (1). The --theme requires --tui. usage error follows this path.