# `mix bb_jido.add_action`
[🔗](https://github.com/beam-bots/bb_jido/blob/main/lib/mix/tasks/bb_jido.add_action.ex#L6)

Scaffolds a Jido action module

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

## Examples

```bash
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.

---

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