# `Cheer.Command`
[🔗](https://github.com/joshrotenberg/cheer/blob/v0.2.2/lib/cheer/command.ex#L1)

Behaviour and macros for defining CLI commands.

A command is a module that declares its name, description, arguments, options,
and subcommands. Commands compose into trees of arbitrary depth.

## Example

    defmodule MyApp.CLI.Deploy do
      use Cheer.Command

      command "deploy" do
        about "Deploy to an environment"

        subcommand MyApp.CLI.Deploy.Staging
        subcommand MyApp.CLI.Deploy.Production
      end
    end

Leaf commands (those with no subcommands) must implement `run/2`.
Branch commands (those with subcommands) route to children automatically.

# `run`
*optional* 

```elixir
@callback run(args :: map(), raw :: [String.t()]) :: term()
```

Called when this command is matched and has no further subcommands to dispatch to.
Receives parsed arguments/options and raw remaining argv.

---

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