[Proposal]: Phoenix phx.new command interactive

Hello,

I’ve been working with Elixir and Phoenix for 4 years, but I keep forgetting about the phoenix phx.new task tags, such as --no-ecto and --no-html, because I rarely start a new phoenix project. Most of the time, I’m maintaining an existing one.

I was wondering if it would make more sense to make phx.new interactive, asking the user each time what they would like include/exclude, as such tasks are usually initiated by a user as oppose to a CI/CD environment.

Just throwing it out there :smiley:

3 Likes

Each time I forget options… I use

iex> mix help phx.new
...
## Options

  • --live - include Phoenix.LiveView to make it easier than ever to build
    interactive, real-time applications
  • --umbrella - generate an umbrella project, with one application for
    your domain, and a second application for the web interface.
  • --app - the name of the OTP application
  • --module - the name of the base module in the generated skeleton
  • --database - specify the database adapter for Ecto. One of:
    • postgres - via https://github.com/elixir-ecto/postgrex
    • mysql - via https://github.com/elixir-ecto/myxql
    • mssql - via https://github.com/livehelpnow/tds

    Please check the driver docs for more information and requirements.
    Defaults to "postgres".

  • --no-webpack - do not generate webpack files for static asset building.
    When choosing this option, you will need to manually handle JavaScript
    dependencies if building HTML apps
  • --no-ecto - do not generate Ecto files.
  • --no-html - do not generate HTML views.
  • --no-gettext - do not generate gettext files.
  • --no-dashboard - do not include Phoenix.LiveDashboard
  • --binary-id - use binary_id as primary key type in Ecto schemas
  • --verbose - use verbose output
...
2 Likes

I would prefer something like suspenders from thoughtbot for phoenix. That would be nice.

2 Likes

I always forget “about the tags” not really “what the available tags are and what they do”. I usually end up deleting the project and creating it again with the appropriate tags that I want.

1 Like