Search documentation of phoenix_kit

# mix phoenix_kit.install (phoenix_kit v1.7.87)

Copy Markdown View Source

Igniter installer for PhoenixKit.

This task automatically installs PhoenixKit into a Phoenix application by:

1. Auto-detecting and configuring Ecto repo
2. Setting up mailer configuration for development and production
3. 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_repos` config 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.