   (let [sys (sys)]
     (get sys component-name)))
 
-(defn safe-to-refresh? []
-(or (empty? @system-status)
-    (= #{false} (-> @system-status vals set))))
 
-(defn  refresh
-  "Refresh changed namespaces"
-  []
-  (if (safe-to-refresh?)
-    (ns.repl/refresh)
-    ::system-running!))
 
-(defn refresh-all
-  "Refresh everything"
-  []
-  (if (safe-to-refresh?)
-    (ns.repl/refresh-all)
-    ::system-running!))
+(defn t
+  "Run tests via kaocha - either all or a list of vars"
+  ([]
+   (kaocha.repl/run :unit))
+  ([ns-list]
+   (apply kaocha.repl/run ns-list)))
 
-(def ^{:doc "Pretty pretint a thing"} pp clojure.pprint/pprint)
+
+(defn t!
+  "Run tests via kaocha, but refresh first - runs all tests or a list of vars"
+  ([]
+   (refresh)
+   (kaocha.repl/run :unit))
+  ([ns-list]
+   (refresh)
+   (apply kaocha.repl/run ns-list)))
 
 
 (init!)

          (println v)) (ns-publics 'R))
  ::ok)

(defn init! []
  (ns.repl/disable-reload! *ns*)
  (ns.repl/set-refresh-dirs "src" "test")
  (help))

(defn list-ns
  "Return list of symbols of namespaces found in src dir"

  ([]
   (list-ns "./src/")))


(defn find-ns
  "Find namespace vars by a regex"
  [re]
  (filter #(re-find re (str %)) (list-ns)))


(defn find-test-ns
  "Find test namespace vars by a regex"
  [re]
  (filter #(re-find re (str %)) (list-ns "./test/")))


(def system-status (atom {}))


(defn safe-to-refresh? []
  (or (empty? @system-status)
      (= #{false} (-> @system-status vals set))))


(defn  refresh
  "Refresh changed namespaces"
  []
  (if (safe-to-refresh?)
    (ns.repl/refresh)
    ::system-running!))


(defn refresh-all
  "Refresh everything"
  []
  (if (safe-to-refresh?)
    (ns.repl/refresh-all)
    ::system-running!))


(defn start-system!
  "Given a namespace, usually some-service, do the following:
