mix linea_ui.install (linea_ui v0.3.0)

Copy Markdown View Source

Sets LineaUI up in a Phoenix app. The one command that adds the dependency and runs this is

mix igniter.install linea_ui

and running mix linea_ui.install again after an upgrade changes only what the new version changed. It edits the host app, showing the diff for you to confirm:

  • assets/css/app.css: imports LineaUI's fonts and styles (and @source for its templates when the file uses source(none))
  • assets/js/app.js: imports LineaUI's hooks and spreads them into the LiveSocket hooks
  • the endpoint: plug Plug.Static for the fonts, after the app's own
  • lib/my_app_web.ex: use LineaUI, avoid_conflicts: true in html_helpers/0
  • .claude/skills/linea-ui/: the Claude Code skill, and a pointer to it in AGENTS.md and CLAUDE.md (AGENTS.md is created when neither exists)

Every step skips what is already there, and warns instead of failing when it cannot find its place.

Options

  • --hugeicons - draws the components' glyphs with Hugeicons: adds the hugeicons dependency, config :linea_ui, :icons, :hugeicons and the Tailwind plugin to app.css
  • --replace-daisyui - removes the daisyUI and heroicons plugins from app.css, which LineaUI's styles can conflict with. Without it they stay and a warning says so
  • --no-skill - does not write the Claude Code skill

mix linea_ui.gen.skill refreshes only the skill. This task needs the igniter dependency; without it the task writes the skill and prints the lines to add by hand.