   (let [formatter (format-columns bold-white-font [:right 10] "  " reset-font [:right 2] "  "
                      [:right 5] "  " [:right 12] "  " :none)]
     (write-rows *out* formatter [:hostname :id :owner :os :ip] (map render systems))))
- 
+
 (defmethod pretty #{:types} [[_ {:keys [types]}]]
   (let [formatter (format-columns bold-white-font [:right 10] "  " reset-font [:right 10] "  "[:right 20] :none)]
     (write-rows *out* formatter [:type (comp first keys) :description] types)))


(def admin {
  :username "admin" :password "foo"
  :envs [:dev :qa :prod] 
  :roles #{:celestial.roles/admin} 
  :operations [] })

(defmacro with-admin [& body]
  `(with-redefs [celestial.security/current-user (fn [] {:username "admin"})
                celestial.persistency.users/get-user! (fn [a#] admin)]
       ~@body 
       ))

(defprotocol Repl 
  "Basic shell like functions on Celestial model types" 
  (ls [this] [this & opts])
  (find [this exp])
  (rm [this items])

(ns celestial.repl
  "Repl Driven Celestial "
  (:require
    [celestial.persistency.systems :as s]
    [celestial.persistency.types :as t]
    [es.systems :as es :refer (set-flush)]
