This is a Clojure library that provides a small clj layer on top of Minio, for s3 bucket access. This may be expanded in the future, as the need arises.
Include the lib in your project
For deps.edn:
com.monkeyprojects/minio-clj {:mvn/version "<VERSION>"}
Or Leiningen:
[com.monkeyprojects/minio-clj "<VERSION>"]
The require the namespace and create a client.
(require '[monkey.minio :as m])
;; Client requires url, access key and secret key
(def client (m/make-client "http://s3-bucket-url" "my-access-key" "very-secret"))
To emphasise the remote nature of the calls, they all return a Manifold
deferred which can
then easily be derefed, or composed with other async operations.
Currently these operations have been provided:
put-object: upload a stream or a fileget-object: download object contentslist-objects: list existing objects in a locationobject-exists?: check for object existenceget-object-details: retrieve information about an object without fetching its contentsremove-object: delete an object, or a specific versionremove-objects: delete multiple objectscompose-object: create a new object by combining multiple others(def my-file-contents "This is a test")
(def bucket "my-test-bucket")
(def path "test/file.txt")
;; Upload a stream
(with-open [i (java.io.ByteArrayInputStream. (.getBytes my-file-contents))]
;; Can optionally specify content-type, metadata and size
@(m/put-object client bucket path {:stream i :content-type "text/plain"}))
;; => {:bucket "my-test-bucket" :object "test/file.txt" ...}
;; Upload a file
@(m/put-object client bucket "test/other.txt" {:file "path/to/file"})
;; Read it back. This returns an InputStream
(slurp @(m/get-object client bucket path))
;; => "This is a test"
;; List the files
@(m/list-objects client bucket "test/")
;; => [{:object "test/file.txt" :size ... }]
;; Or delete an object
@(m/remove-object client bucket path)
;; => Returns empty list, or a list of errors
Copyright (c) 2026 by Monkey Projects
Can you improve this documentation?Edit on Codeberg
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |