app/reference/cli
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
Options
--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,
diffgazerstarts the web environment and opens your browser. --tuistarts 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--tuiis also present.--themewithout--tuiis 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.
--versionprints the binary version. A build stamps the real version in; running from source instead reports the0.0.0-devfallback.
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
SIGINTorSIGTERM, 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 status0whether 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.
Related
- Server reference covers the local server that the web environment runs behind.
- Environment variables lists the variables that adjust ports, timeouts, and shutdown behavior.