Add a --mode=command to mongoshim. Command objects will be read from stdin/file and passed as db.runCommand() operands.