# `mix flicker.install`
[🔗](https://github.com/team-alembic/flicker/blob/v0.1.0/lib/mix/tasks/flicker.install.ex#L4)

Installs Flicker into a Phoenix app.

## Recommended installation

    mix igniter.install flicker

This fetches Flicker as a dependency and then runs this task.

## What it does

1. Adds `:flicker` to the formatter's `import_deps`, so `mix format`
   picks up Flicker's `Flicker.select/1` call formatting.
2. Adds a `config :flicker, default_limit: ..., default_debounce: ...`
   block to `config/config.exs` — only the keys not already configured.
3. Wires the keyboard-nav colocated hook into `assets/js/app.js` using
   `igniter_js`'s AST codemods: an
   `import {hooks as flickerHooks} from "phoenix-colocated/flicker"`
   and a `...flickerHooks` spread merged into the `LiveSocket` `hooks`
   option, alongside the host's own colocated hooks.

If step 3 can't parse your `app.js` or find a `LiveSocket` (a
hand-rolled bundler setup, for instance), a notice with the two manual
edits is printed instead of failing.

4. Registers Flicker's templates as a Tailwind source so its utility
   classes aren't purged. On a Tailwind v4 setup (an `@import
   "tailwindcss"` in `assets/css/app.css`) this adds an
   `@source "../../deps/flicker";` directive; on a v3 setup (a
   `content: [...]` array in `assets/tailwind.config.js`) it adds a
   `"../deps/flicker/**/*.*ex"` glob to that array.

If neither is found, a notice with the manual edit is printed instead.

Pass `--daisyui` to also add a `@plugin "daisyui";` directive to a
Tailwind v4 `app.css`, for hosts using `Flicker.Theme.daisy_ui()`. Off
by default — daisyUI is an opt-in preset, not a Flicker requirement.

---

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