   (command "vault [global opts] <command> [command args]"
     "Command-line tool for the vault data store."
 
+    ["--store" "Select blob store to use."
+     :parse-fn keyword]
     ["-v" "--verbose" "Show extra debugging messages."
      :flag true :default false]
     ["-h" "--help" "Show usage information."

                     "/.config/vault/blob-stores.edn")})



;; BLOB STORES

(defn- initialize-blob-stores
  [opts]
  (try
    (let [config (slurp (:blob-stores config-paths))
          edn-readers {'vault/file-store (partial apply file-store)}
          stores (edn/read-string {:readers edn-readers} config)]
      (assoc opts :blob-stores stores))
    (catch java.io.FileNotFoundException e
      (assoc opts :blob-stores {}))))


(defn- get-blob-store
  "Returns the selected blob-store (as opposed to its keyword nickname)."
  [opts]
  (let [blob-stores (:blob-stores opts)
        nickname (:store opts :default)]
    (loop [store (blob-stores nickname)]
      (if (keyword? store)
        (recur (blob-stores store))
        store))))


(defn- list-blob-stores

    (command "blob <action> [args]"
      "Blob storage command."

      (init require-blob-store)

      (command "list [opts]"
        "Enumerate the stored blobs."
