   [filename]
   (utree.dot/dot filename))
 
+(defn ^{:cli true :usage ""} help
+  "Display help message"
+  []
+  (command-help))
+
 (defn subcommands
   []
-  (filter :cli (map (fn [[k v]] (meta v)) (ns-publics 'utree.core))))
+  (filter :cli (map meta (vals (ns-publics 'utree.core)))))
 
 (defn find-first
   [pred coll]


(defn command-help
  []
  (println "Usage: utree [subcommand] command-options")
  (println "\nSubcommands:")
  (doseq [c (subcommands)]
    (apply print (interpose "\t" (map c [:name :usage :doc])))
    (println)))

(defn -main
  ([] (command-help))

(ns utree.core
  (:require (utree.dot))
  (:require (clojure [string :as str])
            (clojure [pprint :only (cl-format)]))
  (:gen-class))

(defn ^{:cli true :usage "filename"} dot
