zachdaniel
Creator of Ash
@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.4
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 Chronicle | Zach Daniel | Substack
Trending in News & Updates
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
I’m a bit excited to announce that Localize and friends are now at release 1.0. Even though it’s a 1.0 release, it stands on 8 years of w...
New
I’ll be using this thread to share Hologram patch release announcements. Minor releases will continue to get dedicated threads with blog ...
New
Hologram v0.11 is out! Two headline features this release. First, Elixir regexes now run in the browser. They were server-only until now,...
New
Just published search_ash 0.5.0 (with search_core 0.4.0) on Hex.
What’s new: synonyms
You can now declare a synonym dictionary per lang...
New
MdexMultilineCells is an MDEx plugin enabling multi-line cells in Markdown tables with full
inline/block Markdown rendering and automati...
New
This release unifies configuration for queues, repos, and services, swaps opaque timing integers for readable durations, and backports pe...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
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.
Stefano1990
This is absolute fire and @jimsynz is the MVP.
matthewsinclair
Ok, I must be being really dumb. Where does the
mix_tasks...bit go? I ran the install viamix igniter.install ash_opsand then I have tried to put that inside the Ash Domain, the Ash Resource, in mix.exs. This looks so simple from the docs, what am I doing wrong?This seemed the most obvious place to put it given the instructions said “Example: Defining the following action in your domain”
So I did this:
But that generates a compile error.
matthewsinclair
Aha. I worked it out. I needed to add
AshOpsto:extensionslike this:Now the mix task is available:
Cool!
matthewsinclair
Ok, the next question is how to map these resource actions onto the mix tasks? For example, consider this:
What’s the syntax for mapping those
Resourcecommands that take a parameter onto mix tasks?matthewsinclair
More here: Slack