Best practices for adding a CLI to your app?

At work, we have a fairly large Elixir umbrella monolith, and since some other services are Ruby-based, we have a Ruby script in the same project which parses some dot files and has a CLI library called Thor.
While this works, it’s not ideal imho that we are mixing two separate stacks and introducing external dependencies in another runtime just to parse some basic CLI options and dot files.

Is there a common Elixir-way of doing things like this? Or maybe you have a shell script wrapper?

I think mix tasks paired with OptionParser would be idiomatic.

3 Likes