Installs BB.TUI into a project
Imports the package's formatter rules and prints a launch notice for the configured robot module.
When no robot module is present yet, the installer offers to compose
bb.install to scaffold one. Pass --auto-bb to skip the prompt in
non-interactive contexts.
With --ssh, the installer appends a supervised {BB.TUI, robot: …}
child to the application that boots an SSH daemon on application
start. Use this when the dashboard should be reachable remotely.
With --nerves, the installer registers BB.TUI.subsystem/1 under
config :nerves_ssh, :subsystems in config/runtime.exs. Use this
on Nerves devices that already run nerves_ssh so the dashboard
rides on the existing daemon instead of opening a second SSH port.
With --web, the installer serves the dashboard in the browser through
the optional phoenix_ex_ratatui dependency: it adds the dependency,
generates a use BB.TUI.Live LiveView under the web namespace
(MyAppWeb.RobotLive for MyApp.Robot), mounts it with a live
route inside the router's :browser scope (/robot by default, or
--path), and registers the JS hook in assets/js/app.js. This needs
a Phoenix router in the project; without one the installer prints the
manual wiring instead of guessing.
Without --ssh, --nerves, or --web, no supervision is wired up:
launch the dashboard on demand with mix bb.tui or BB.TUI.run/1
from IEx. Auto-claiming the local terminal would fight an IEx session
for stdin/stdout.
Examples
mix igniter.install bb_tui
mix igniter.install bb_tui --robot MyApp.Arm
mix igniter.install bb_tui --auto-bb
mix igniter.install bb_tui --ssh
mix igniter.install bb_tui --ssh --port 2222
mix igniter.install bb_tui --ssh --user pilot --password secret
mix igniter.install bb_tui --nerves
mix igniter.install bb_tui --web
mix igniter.install bb_tui --web --path /dashboard
Options
--robot- The robot module (defaults to{AppPrefix}.Robot).--auto-bb- When the robot module is missing, composebb.installwithout prompting.--ssh- Append a supervised SSH-mode{BB.TUI, …}child to the application's supervision tree. Idempotent.--port- SSH daemon port (default2222). Ignored without--ssh.--user- SSH username (defaultadmin). Ignored without--ssh.--password- SSH password (defaultadmin). Ignored without--ssh.--nerves- AppendBB.TUI.subsystem(<Robot>)toconfig :nerves_ssh, :subsystemsinconfig/runtime.exs. Idempotent.--web- Addphoenix_ex_ratatui, generate aBB.TUI.LiveLiveView, mount it in the Phoenix router, and register the JS hook. Idempotent.--path- URL path for the browser dashboard (defaults to the robot's last name segment,/robotforMyApp.Robot). Ignored without--web.