diff --git a/monitor/argument.cpp b/monitor/argument.cpp
deleted file mode 100644
index 90afd10..0000000
--- a/monitor/argument.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Copyright © 2017 IBM Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "argument.hpp"
-
-#include <algorithm>
-#include <iostream>
-#include <iterator>
-
-namespace phosphor
-{
-namespace fan
-{
-namespace util
-{
-
-ArgumentParser::ArgumentParser(int argc, char** argv)
-{
-    auto option = 0;
-    while (-1 != (option = getopt_long(argc, argv, optionstr, options, NULL)))
-    {
-        if ((option == '?') || (option == 'h'))
-        {
-            usage(argv);
-            exit(1);
-        }
-
-        auto i = &options[0];
-        while ((i->val != option) && (i->val != 0))
-        {
-            ++i;
-        }
-
-        if (i->val)
-        {
-            arguments[i->name] = (i->has_arg ? optarg : true_string);
-        }
-    }
-}
-
-const std::string& ArgumentParser::operator[](const std::string& opt)
-{
-    auto i = arguments.find(opt);
-    if (i == arguments.end())
-    {
-        return empty_string;
-    }
-    else
-    {
-        return i->second;
-    }
-}
-
-void ArgumentParser::usage(char** argv)
-{
-    std::cerr << "Usage: " << argv[0] << " [options]\n";
-    std::cerr << "Options:\n";
-    std::cerr << "    --help               Print this menu\n";
-    std::cerr << "    --init               Set fans to functional\n";
-    std::cerr << "    --monitor            Start fan funcitonal monitoring\n";
-    std::cerr << std::flush;
-}
-
-const option ArgumentParser::options[] = {
-    {"init", no_argument, NULL, 'i'},
-    {"monitor", no_argument, NULL, 'm'},
-    {"help", no_argument, NULL, 'h'},
-    {0, 0, 0, 0},
-};
-
-const char* ArgumentParser::optionstr = "imh?";
-
-const std::string ArgumentParser::true_string = "true";
-const std::string ArgumentParser::empty_string = "";
-
-} // namespace util
-} // namespace fan
-} // namespace phosphor
diff --git a/monitor/main.cpp b/monitor/main.cpp
index fbdcd0d..8505c76 100644
--- a/monitor/main.cpp
+++ b/monitor/main.cpp
@@ -16,7 +16,7 @@
 #include "config.h"
 
 #ifndef MONITOR_USE_JSON
-#include "argument.hpp"
+#include <CLI/CLI.hpp>
 #endif
 #include "fan.hpp"
 #ifdef MONITOR_USE_JSON
@@ -41,27 +41,31 @@
     Mode mode = Mode::init;
 
 #ifndef MONITOR_USE_JSON
-    phosphor::fan::util::ArgumentParser args(argc, argv);
+    CLI::App app{"Phosphor Fan Monitor"};
 
-    if (argc != 2)
+    bool init = false;
+    bool monitor = false;
+    app.add_flag("-i,--init", init, "Set fans to functional");
+    app.add_flag("-m,--monitor", monitor, "Start fan functional monitoring");
+    app.require_option();
+
+    try
     {
-        args.usage(argv);
-        return 1;
+        app.parse(argc, argv);
+    }
+    catch (const CLI::Error& e)
+    {
+        return app.exit(e);
     }
 
-    if (args["init"] == "true")
+    if (init)
     {
         mode = Mode::init;
     }
-    else if (args["monitor"] == "true")
+    else if (monitor)
     {
         mode = Mode::monitor;
     }
-    else
-    {
-        args.usage(argv);
-        return 1;
-    }
 #endif
 
     // Attach the event object to the bus object so we can
diff --git a/monitor/meson.build b/monitor/meson.build
index d708cca..1171530 100644
--- a/monitor/meson.build
+++ b/monitor/meson.build
@@ -4,7 +4,6 @@
 )
 
 sources=[
-    'argument.cpp',
     'conditions.cpp',
     'fan.cpp',
     'fan_error.cpp',
