Tab turns Clojure data structures into tables.
Note Tab is in alpha. While in alpha, breaking changes can happen.
Tab's primary aim is to help Clojure programmers make sense of data.
Most interesting Clojure values are maps or seqs of maps. When small, pretty-printing is an adequate tool for inspecting such values. When they get to medium size (like, say, your typical Ring request map), you're better off reaching for something else.
Tab aims to be that something else.
- Tab only shows you one value at a time.
- Tab datafies (via
clojure.datafy/datafy
) values you give it. - Tab aims to be useful without forcing you to choose between different viewers (table, tree, etc).
- Tab has no dependencies.
Given that you have the Clojure CLI installed, on the command line, run:
clj -Sdeps '{:deps {io.github.eerohele/tab {:git/url "https://github.com/eerohele/tab.git" :git/sha "715d24e5276887533006616685833dc2d5781524"}}}'
Then, in the REPL:
user=> (require 'tab.auto)
nil
user=> (tap> BigInteger)
true
Then, bask in the glory of the table that appears in your browser. If a tabulated BigInteger
doesn't do it for you, there are more examples available.
See the user manual for instructions of use.
To stop Tab:
user=> (tab.auto/halt)
The tab.auto
namespace is the easiest way to run Tab. The tab.api
namespace exposes the API proper.
user=> (require '[tab.api :as tab])
nil
user=> (doc tab/run)
...
user=> (doc tab/tab>)
...
user=> (doc tab/address)
...
user=> (doc tab/halt)
...
- Click
-
to collapse a node - Click
+
to expand a node - Press Alt and click
-
or+
to expand or collapse all nodes underneath a node
For more examples on what Tab can do, see repl/demo/intro.repl
.
Note To run through all the examples, you must use the
add-lib3
branch of tools.deps.
- Can make tables.
- Zero dependencies, apart from Clojure itself.
- Prefers operating system theme (light or dark mode).
- Can only make tables.
- Likely to die if given a very large input.
- Eager; will blow up if you give it an infinite seq.
- Requires a modern browser to look good. If your browser supports
backdrop-filter
, you should be good. - Might not work with Clojure versions older than 1.10.2
- Gregoire, Daniel. (2018, November 30). Tables Considered Helpful (Clojure/conj 2018).
- My employer, for graciously sponsoring the development of this tool.
- Nikita Prokopov, for the Alabaster Color Scheme.
- Pedro Girardi, for alpha testing and improvement ideas.