I’ve my Erlang service perfectly running and I’d like to add an admin console to it.
I found clique but couldn’t get my head around it.
It seems a bit complicated and I’m looking for something simple to manage.
There is also ectl. But it wasn’t updated for the last +10y.
For example, I’d like to be able to add/delete/update user account in my app. @max-auargparse could be a good start.
Fun fact, argparse was originally a part of a larger library intended to perform exactly the task you’re after. And cli module (cli.erl) is the code enabling such functionality.
I use it in the following combination:
my service code has multiple modules implementing -behaviour(cli).
a very small trampoline escript that simply runs rpc:call('node@hostname', cli, run, init:get_all_arguments(), #{modules => all_loaded})
How it works: my primary service is running in a context of a production node. It has many modules loaded, and exporting cli callback. The trampoline script effectively just passes the command line invocation (via rpc) to that service.
Not that I heard of, but given how simple the code is, I just copy-and-paste lines doing that job from one project to another. To a degree that I’m not sure whether it’s worth having it in the OTP itself.