   (System/exit status))
 
 (defn -main [& args]
-  (let [{:keys [options arguments errors summary help]} (cli/parse-opts args cli-options)]
+  (let [{:keys [options arguments errors summary help]} (cli/parse-opts args cli-options)
+        verbose (if (contains? options :verbose) 1 0)]
     (cond
       help (exit 0 (usage summary))
       errors (exit 1 (error-msg errors))
       (not= (count arguments) 1) (exit 1 (usage summary))
-      (:serverspec options) (core-app/existing-serverspec
-                              app/crate-app
-                              {:domain (first arguments)
-                               :targets (:targets options)})
+      (:serverspec options) (if (core-app/existing-serverspec
+                                  app/crate-app
+                                  {:domain (first arguments)
+                                   :targets (:targets options)
+                                   :verbosity verbose})
+                                (exit 0 (styled/styled "ALL TESTS PASSED" :green))
+                                (exit 2 (styled/styled "SOME TESTS FAILED" :red)))
+
       (:configure options) (core-app/existing-configure
                              app/crate-app
                              {:domain (first arguments)

   ["-s" "--serverspec"]
   ["-c" "--configure"]
   ["-t" "--targets targets.edn" "edn file containing the targets to install on."
    :default "localhost-target.edn"]])

(defn usage [options-summary]
  (str/join

  (:require
    [clojure.string :as str]
    [clojure.tools.cli :as cli]
    [dda.config.commons.styled-output :as styled]
    [dda.pallet.core.app :as core-app]
    [dda.pallet.dda-managed-ide.app :as app]))

