Creates a new Phoenix application with Corex installed.
Install archives:
mix archive.install hex phx_new
mix archive.install hex corex_newmix corex.new PATH runs mix phx.new PATH --no-install with forwarded Phoenix flags,
then writes Corex-owned files and patches into that app. --no-install is always passed to
Phoenix so dependency fetching stays under Corex control.
LiveView, HTML, esbuild, and the default Phoenix asset setup are always on — Corex does not
forward --no-live, --no-html, --no-esbuild, or --no-assets.
mix phx.new --dev (Phoenix from a Git checkout) is not forwarded. --dev on this task
means a Corex path dependency only.
Corex-only options
--no-design— skip copying consumer design assets intoassets/corex/and omit Corex design@importblocks inapp.css. Default is--design(design on).--tailwind/--no-tailwind— Tailwind in the generated Phoenix app defaults on.--no-tailwindis forwarded tophx.newonly together with--no-design. If--designis on,--no-tailwindis ignored (Corex design CSS expects Tailwind).--mode— plugs, mode toggle, root-layout bridge for light/dark. Implies--design.--theme— themes (Neo/Uno/Duo/Leo), plugs, theme toggle, layout bridge. Implies--design.--lang— Localize + Gettext, path plug, locale scope helpers,language_switch.--designex— copy token sources intoassets/corex/design/, add:designex, asset aliases. Implies--design.--mcp/--no-mcp— when--mcp(default),plug Corex.MCPis added to the endpoint in:dev/:testafterPlug.Static.--dev PATH—{:corex, path: PATH}and relativecorex.mjsimport when building JS; design copies from that checkout when--designis on.--install/--no-install— whether Corex runsmix deps.getin the new project after generation (prompt if omitted). Does not change Phoenix’s--no-installstep.
Options forwarded to mix phx.new
Same semantics as Phoenix’s installer — see mix help phx.new on Hexdocs.
Supported switches include for example:
--database(postgres,mysql,sqlite3,mssql, …)--adapter(bandit,cowboy)--app,--module,--web-module,--prefix--binary-id,--verbose,--inside-docker-env--no-dashboard,--no-mailer,--no-gettext,--no-version-check
--no-ecto is rejected (Corex expects Ecto in generated apps).
--no-gettext is incompatible with --lang.
--umbrella is not supported here yet; use mix phx.new --umbrella and guides/manual_installation.md.
After generation
The installer prints Phoenix-style follow-up steps (cd, mix deps.get when dependencies were not fetched, database setup when Ecto is enabled, mix assets.setup / mix assets.build, optional mix localize.download_locales with --lang, then mix phx.server / iex -S mix phx.server).
Examples
mix corex.new hello_world
mix corex.new my_app --mode --theme --lang
mix corex.new my_app --no-design --no-tailwind
mix corex.new my_app --dev ../corexTo update the generator before creating a project:
mix local.corex
mix corex.new my_app