Clojure CLI progress indicators
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

progress - A progress indication library for Clojure

progress provides progress indicators, mostly focused around displaying the progress of file copy/download operations.


The current release is 1.0.2. You can add it to a Leiningen project via:

[progress "1.0.2"]

To use it for file progress, use the with-file-progress macro from the progress.file namespace:

  (:require [progress.file :as progress]))
(let [f "/tmp/"]
  (progress/with-file-progress f 
    ;; do your business here, maybe with:
    (with-open [input (io/input-stream "")]
      (io/copy input f))))

This will result in a simple incrementing size counter on *out*:


If you know the size of the file being downloaded, you can specify it (in bytes) and get a fancy pants progress bar:

(let [f "/tmp/"]
  (progress/with-file-progress f :filesize 1234567
    ;; do your business here, maybe with:
    (with-open [input (io/input-stream "")]
      (io/copy input f))))

Which looks like:

[===>                                             ] 5% 60.28KB / 1.18MB

The with-file-progress macro takes a few options - check out its docstring for details. You can also disable its monitoring entirely by setting the progress.monitor sytem property to "false".

There are progress indicators that are potentially useful for things other than file downloads - see the and progress.file namespaces.


There is an entirely inadequate midje test suite that you can run via lein midje if you have the lein-Midje plugin installed.


Copyright (C) 2011 Tobias Crawley

Distributed under the Eclipse Public License.