mix tlx.gen.from_live_view (TLX v0.5.2)

Copy Markdown

Generate a TLX spec skeleton from a Phoenix LiveView module.

Usage

mix tlx.gen.from_live_view MyAppWeb.FleetLive
mix tlx.gen.from_live_view MyAppWeb.FleetLive --output fleet_spec.ex
mix tlx.gen.from_live_view MyAppWeb.FleetLive --format codegen

Parses the module's source code to extract fields (from mount/3), event handlers, and info handlers via AST analysis. Generates either a TLX.Patterns.OTP.GenServer module (default) or a defspec skeleton via codegen.

Options

  • --output, -o — write to a file instead of stdout
  • --format, -f — output format: pattern (default) or codegen