Command Line Interface

Usage

To see the available commands, run hex --help.

Usage: hex [options] [file]

Options:
  -h, --help       Show this help message and exit
  -v, --version    Show version information and exit
  --noactivate     Do not activate the window when opening a file

Arguments:
  file             Path to a file to open
  -                Read from stdin, write to stdout on tab close

On macOS you need to create a symlink to the app executable:

ln -s "/Applications/Hex Editor.app/Contents/MacOS/hexeditorapp" /usr/local/bin/hex

Examples

# open a file without activating editor window
hex --noactivate file.bin

# edit stdin, the result is written to stdout when the tab is closed
cat data.bin | hex -