get key_path, key_index and peer from program option