csokun

csokun

I love mix phx.* they are fantastic. However, I keep forgetting what argument comes first. So, I decided to write a small app that wraps mix phx.* with relevant prompt messages & hints. It works for me hope it helps others. I call it phx GitHub - csokun/phx: Phoenix Framework friendly CLI · GitHub

Showing Posts 1 to 2

Eiji

Eiji

Subjectively I don’t see custom wrappers have any use for me, because:

  1. We already have mix help … command if something is not clear.
  2. It’s not good way for copy-paste examples (learning resources, creating similar project etc.)
  3. They are harder to enhance comparing to simple bash autocompletion scripts

If I really would need to add something then it would be a simple bash script for autocompletion.

Also since lots of Unix commands supports passing arguments like you do, I would rather ask a phoenix core team if such idea could be merged to phoenix project instead of creating a wrapper.

If we would take a look at phx.new task code then we would see how simple would be a way to add prompts:
https://github.com/phoenixframework/phoenix/blob/4c9737cd1020ddb21cf1a8a714e6dc88317fd843/installer/lib/mix/tasks/phx.new.ex#L120-L130

In this case simple defp parse_opts([]) do … end function clause would do the work.

dogweather

dogweather

This is cool, thank you. I’m the kind of developer who runs ssh-keygen to follow the interactive dialog. It’s annoying to need to learn a special, unrelated DSL (how to use a CLI app) just to get some other task done. I think it’s a legacy anti-pattern, TBH. I already need to truly know 10–20 languages that actually produce value. I’ll avoid spending time learning yet another that doesn’t actually generate business value.

That being said, Golang blows every chimp in the zoo, IMO. I’m not going to be contributing any time soon. :joy_cat: In some perfect world, your code would work in Elixir and be DRY vis a vis the existing argument parser.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
sorenone
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
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews