Skip to main content

CLI Reference

The differens command is a single binary. It runs in five modes and prints four output formats.

Modes

Options

Subcommands

Examples

Exit behavior

  • When the diff is empty, any mode prints “nothing changed” (or “nothing changed in range: …”) instead of failing.
  • Errors exit 1 with a message on stderr: not in a git repo, file cannot be read, a directory against a file, or malformed args.
  • Files over 2 MiB are treated as whole-file changes. Differens writes note: fell back to … diff to stderr.

Internal flags

The CLI also accepts two flags for internal use: --git-diff-driver (git invokes the registered driver with it) and a worker flag used by the parallel diff pool. Ignore them in scripts.