zachdaniel
AshOps - Expose actions as mix tasks on the command-line
@jimsynz just launched an epic new extension for Ash! It allows you to create rich mix tasks for calling your resource actions directly from the command line.
Its only just had its first release, so there will probably be bugs here and there, but honestly this think slaps and so far it has Just Worked™ in my usage.
Check out the docs for more: README — ash_ops v0.2.3
Here is a teaser image:
Which would give you:
mix tunez.music.create_album and mix tunez.music.list_albums mix tasks. If you really want your mind blown, try out the --filter option on list tasks, and the --format option on any of them ![]()
And there is a demo video in the latest Ash Weekly newsletter: Ash Weekly: Issue #8 - Ash Weekly
Most Liked
matthewsinclair
This
is awesome! I have a CLI/REPL utility that I have been hacking around with for a while now, and I have an idea for an Ash-compatible extension for it at the back of my mind. I will see if I can quickly connect the two …
BTW: This might not be to everyone’s taste. It’s potentially very ropey Elixir code, so don’t expect too much! The motivation for it was twofold: a) to help me learn Elixir, and b) to have a simple way to implement the command pattern from a CLI/REPL so that I could test my code as I was building it. As they say, #ymmv. ![]()








