mix phoenix_kit.install (phoenix_kit v1.6.15)
View SourceIgniter installer for PhoenixKit.
This task automatically installs PhoenixKit into a Phoenix application by:
- Auto-detecting and configuring Ecto repo
- Setting up mailer configuration for development and production
- Modifying the router to include PhoenixKit routes
Usage
mix phoenix_kit.install
With custom options:
mix phoenix_kit.install --repo MyApp.Repo --router-path lib/my_app_web/router.ex
Options
--repo- Specify Ecto repo module (auto-detected if not provided)--router-path- Specify custom path to router.ex file--prefix- Specify PostgreSQL schema prefix (defaults to "public")--create-schema- Create schema if using custom prefix (default: true for non-public prefixes)
Auto-detection
The installer will automatically:
- Detect Ecto repo from
:ecto_reposconfig or common naming patterns (MyApp.Repo) - Find main router using Phoenix conventions (MyAppWeb.Router)
- Configure Swoosh.Adapters.Local for development in config/dev.exs
- Provide production mailer setup instructions
Note about warnings
You may see a compiler warning about "unused import PhoenixKitWeb.Integration".
This is normal behavior for Elixir macros and can be safely ignored.
The phoenix_kit_routes() macro is properly used and will expand correctly.