Skip to main content

CLI Reference

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

Modes

Options

Subcommands

Config file

differens.toml (or .differensrc.json) in the working directory, or the nearest ancestor that has one, changes the defaults:
Flags override the config. Unknown keys and malformed values are ignored, and an unparseable config file is skipped rather than fatal.

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.

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.