These are the main features of the non-interactive (or batch) mode:
You have to specify a command name with the -C option. Specify all options that the command would take in an interactive session as additional options on the command line. The client will execute this command and exit.
The clients accept the input for some commands on stdin. If input is available on stdin, be it through a pipe or from a redirected file, this input will be used and any input from a file with the -f option will be ignored.
The main purpose of the batch mode is to run the clients from shell scripts. You can figure out scripts of arbitrary complexity to interact with your reference database.
Note: You will still be prompted for a password unless you specify one with the -w or in the configuration file. Both ways are considered less secure than typing it on the password prompt, but this is a tradeoff if you want unattended operation.