Creating an OTP application using distillery with escript for common tasks?

I have an elixir application that is released with distillery. There are some common use cases for simple one off tasks, (get status, load an asset, delete an asset, change offset). I have been making small changes to my mix.exs file to generate in escript to perform many of these tasks. So my workflow has become, update the code, release the app, generate an escript. I was wondering if there is a better way to handle this use case, create an OTP application and have a utility script for operations using the code base of the app.

Where do the custom tasks usually run from? Eg on the CI server, developer workstation, production server?

The simplest would be to just create mix tasks and run them with mix, similar to mix ecto.migrate.

However if you’re running the tasks from a location that doesn’t have mix available, then you could define custom commands and include them in your release.

Thanks for the reply, it sounds like custom commands are the way to go since miss is not available.