Create mix tasks that invoke existing modules which use Ecto

You need to make sure to start Repo before using it in a Mix task:

def run(_) do
 Mix.Ecto.ensure_started(App.Repo, [])
 App.Adapter.list_all(App.Thing)
end