Can I try a Hex package without creating a Mix project?


I was looking for some packages in the Hex package registry and it got me thinking whether it’d be possible to try them out without having to create a Mix project first and add them as dependencies in the list returned by the deps function. I did a bit of search and I couldn’t find anything. Something along the lines of:

mix hex.try Rambo

I’d expect the command to pull and compile the dependency and open a REPL.

Thanks in advance

Take a look at Mix.install, which you can call from simple elixir scripts.


I mostly test packages in Livebook. You can directly search and install package in a notebook.