# `PhoenixKit.Install.BootHook`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.164/lib/phoenix_kit/install/boot_hook.ex#L1)

Wires `PhoenixKit.boot/1` into the parent app's `Application.start/2`.

`PhoenixKit.boot/1` rescans for late-loading `:phoenix_kit_<x>` deps and
runs registered modules' `migrate_legacy/0`. It must be called after
`Supervisor.start_link/2` succeeds.

Idempotent — if `PhoenixKit.boot` is already present in the file, this
helper is a no-op. Called from both `mix phoenix_kit.install` and
`mix phoenix_kit.update`.

## Standard form

Matches the canonical Phoenix generator output:

    Supervisor.start_link(children, opts)

and rewrites it to:

    Supervisor.start_link(children, opts) |> PhoenixKit.boot()

Non-standard shapes (custom variable names, piped form, calls wrapped
in `case`/`with`) are left untouched and surface as an Igniter warning
with manual-edit instructions.

# `add_boot_hook`

Add the `PhoenixKit.boot/1` call to the parent app's `Application.start/2`.

Returns the igniter unchanged when:
  * The parent app has no `lib/<app>/application.ex` (unusual setup)
  * `PhoenixKit.boot` is already in the file (idempotent re-run)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
