diff --git a/tools/peek/ndnpeek/main.cpp b/tools/peek/ndnpeek/main.cpp
index ff9f2af..22523b7 100644
--- a/tools/peek/ndnpeek/main.cpp
+++ b/tools/peek/ndnpeek/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,7 @@
  */
 
 #include "ndnpeek.hpp"
+#include "core/program-options-ext.hpp"
 #include "core/version.hpp"
 
 #include <ndn-cxx/util/io.hpp>
@@ -85,7 +86,8 @@
   interestOptDesc.add_options()
     ("prefix,P",   po::bool_switch(&options.canBePrefix), "set CanBePrefix")
     ("fresh,f",    po::bool_switch(&options.mustBeFresh), "set MustBeFresh")
-    ("link-file",  po::value<std::string>(), "set ForwardingHint from a raw binary file")
+    ("fwhint,F",   po::value<std::vector<Name>>(&options.forwardingHint)->composing(),
+                   "add ForwardingHint delegation name")
     ("lifetime,l", po::value<time::milliseconds::rep>()->default_value(options.interestLifetime.count()),
                    "set InterestLifetime, in milliseconds")
     ("hop-limit,H",     po::value<int>(), "set HopLimit")
@@ -98,7 +100,7 @@
 
   po::options_description hiddenOptDesc;
   hiddenOptDesc.add_options()
-    ("name", po::value<std::string>(), "Interest name");
+    ("name", po::value<Name>(&options.name), "Interest name");
 
   po::options_description optDesc;
   optDesc.add(visibleOptDesc).add(hiddenOptDesc);
@@ -132,14 +134,6 @@
     return 2;
   }
 
-  try {
-    options.name = vm["name"].as<std::string>();
-  }
-  catch (const Name::Error& e) {
-    std::cerr << "ERROR: invalid name: " << e.what() << std::endl;
-    return 2;
-  }
-
   if (vm.count("timeout") > 0) {
     options.timeout = time::milliseconds(vm["timeout"].as<time::milliseconds::rep>());
     if (*options.timeout < 0_ms) {
@@ -148,19 +142,6 @@
     }
   }
 
-  if (vm.count("link-file") > 0) {
-    auto filename = vm["link-file"].as<std::string>();
-    std::ifstream linkFile = openBinaryFile(filename);
-    if (!linkFile) {
-      return 2;
-    }
-    options.link = io::load<Link>(linkFile, io::NO_ENCODING);
-    if (!options.link) {
-      std::cerr << "ERROR: cannot parse a valid Link object from file '" << filename << "'" << std::endl;
-      return 2;
-    }
-  }
-
   options.interestLifetime = time::milliseconds(vm["lifetime"].as<time::milliseconds::rep>());
   if (options.interestLifetime < 0_ms) {
     std::cerr << "ERROR: InterestLifetime cannot be negative" << std::endl;
