Apex is Awesome Print for Elixir. It pretty-prints Elixir data structures, in color, to make it easy to make sense of their contents. Let's have a look.

We'll kick off a new project just to have somewhere to put the dependency:

mix new apex_playground cd apex_playground

Now we'll need to add the dependency. Open up mix.exs and add the dependency:

 defp deps do [ {:apex, github: "BjRo/apex"} ] end

Fetch the dependency: mix deps.get

Now let's fire up an iex session to have a look:

Apex.ap 1

So here we're just outputting an integer. Nothing interesting is going on yet. What about a list?

Apex.ap [1,2,3]

Alright, so you can easily see the index of a given value in the data structure. That has some value. What do maps look like?

map = %{foo: "bar", baz: "whee"} Apex.ap map

So in general, you can see the pattern here - the value to be passed to the Access protocol is laid out beside the data it represents.

map[:foo]

It becomes a lot more...