Installs demo_director into a Phoenix application.
Run via:
mix igniter.install demo_directorThe task does three things:
- Adds
import DemoDirector.Routerand ademo_director "/demo-director"macro call inside anif Application.compile_env(:my_app, :dev_routes) do ... endblock in your router (creating the block if absent). The scope is not piped through:browserbecause the playback POST endpoint must bypassprotect_from_forgery. - Appends a marked instructions section to
AGENTS.md(always) and toCLAUDE.md(only if it already exists, or if a.claude/directory is present). - Prints a post-install message reminding you of the remaining
manual steps: adding the playback socket to your endpoint,
setting the
:pubsubconfig, and rendering the overlay component in your layout. We don't auto-edit those because endpoint and layout structure vary too much across apps.
Sections written to AGENTS.md / CLAUDE.md are wrapped in
<!-- BEGIN demo_director --> / <!-- END demo_director -->
markers, so re-running the task replaces the section in place
rather than appending a duplicate.