mix bb_jido.add_action (bb_jido v0.1.2)

Copy Markdown View Source

Scaffolds a Jido action module

Creates a new module that uses Jido.Action, with a starter schema and a run/2 callback returning {:ok, %{}}.

Examples

mix bb_jido.add_action MyApp.Actions.PickObject
mix bb_jido.add_action MyApp.Actions.MovePose --safety-aware
mix bb_jido.add_action MyApp.Actions.Teleop --name teleop_step

Arguments

The first positional argument is the module name for the new action (required).

Options

  • --name - The Jido name: string for the action (defaults to a snake_cased version of the module's last segment).
  • --description - The Jido description: string.
  • --safety-aware - Mix in BB.Jido.Action.SafetyAware so the action refuses to run unless BB.Safety.state(robot) == :armed. Adds a :robot field to the schema.