# `mix mutare.install`
[🔗](https://github.com/foxbenjaminfox/mutare/blob/v0.5.1/lib/mix/tasks/mutare.install.ex#L2)

Install Mutare and auto-configure its framework integrations.

    mix igniter.install mutare

Adds `:mutare` to your `:dev`/`:test` dependencies (`runtime: false`), then looks at what your project already depends on and wires up the matching companion packages — so a Plug/Phoenix/Ecto/Oban/Decimal/Swoosh/Gettext app gets framework-aware mutants, and a Phoenix app with browser-driven tests gets per-test selection for them, without any manual configuration:

| Detected dependency                               | Package added              | Wired into                                                             |
| ------------------------------------------------- | -------------------------- | ---------------------------------------------------------------------- |
| `:plug` / `:bandit` / `:plug_cowboy` / `:phoenix` | `mutare_plug`              | `:mutators` — `Mutare.Plug.all/0`                                      |
| `:phoenix`                                        | `mutare_phoenix`           | `:mutators` — `Mutare.Phoenix.all/0`; `:extensions` — `Mutare.Phoenix` |
| `:phoenix_live_view`                              | `mutare_phoenix_live_view` | `:mutators` — `Mutare.Phoenix.LiveView.all/0`                          |
| `:ecto_sql` / `:phoenix_ecto` / `:ecto`           | `mutare_ecto`              | `:mutators` — `{Mutare.Ecto, repo: YourRepo}`                          |
| `:oban` / `:oban_pro`                             | `mutare_oban`              | `:mutators` — `Mutare.Oban.all/0`                                      |
| `:decimal`                                        | `mutare_decimal`           | `:mutators` — `Mutare.Decimal.all/0`                                   |
| `:swoosh` / `:phoenix_swoosh`                     | `mutare_swoosh`            | `:mutators` — `Mutare.Swoosh.all/0`                                    |
| `:phoenix_swoosh`                                 | `mutare_phoenix_swoosh`    | `:mutators` — `Mutare.Phoenix.Swoosh.all/0`                            |
| `:gettext`                                        | `mutare_gettext`           | `:extensions` — `Mutare.Gettext`                                       |
| `:phoenix_ecto`                                   | `mutare_phoenix_ecto`      | `:extensions` — `Mutare.Phoenix.Ecto`                                  |

Each detected package is added as a `:dev`/`:test` dependency and wired into a generated `.mutare.exs`: a mutator package extends the `:mutators` list (alongside the `:builtins` group token, which keeps Mutare's own families on), while a non-mutating extension joins the `:extensions` list: `mutare_gettext` defines how the built-in mutators handle a library's compile-time syntax, and `mutare_phoenix_ecto` tells the coverage probe which test sent each request a browser-driven test makes, from the SQL sandbox metadata phoenix_ecto already reads. `mutare_phoenix` does both: its families join `:mutators`, and its front module — a `Mutare.CallRouting` extension that keeps Phoenix's compile-time macros (the router DSL, `~H`) out of the mutation set — joins `:extensions`. Nothing detected? You still get a starter `.mutare.exs` and a ready-to-run `mix mutare`.

If you already have a `.mutare.exs`, it is left untouched and the recommended `:mutators` / `:extensions` keys are printed as a notice for you to merge in by hand.

If the project depends on [usage_rules](https://hexdocs.pm/usage_rules), `:mutare` is added to `usage_rules: [skills: [package_skills: …]]` in `project/0`, so `mix usage_rules.sync` installs the agent skill Mutare ships. The installer does not run the sync itself.

## Options

  * `--repo MyApp.Repo` — the Ecto repo to configure `mutare_ecto` with. When omitted the repo is detected from your project (you are prompted if there is more than one); if none is found a `YourApp.Repo` placeholder is written and a warning tells you to edit it.

---

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