# `Alaja.CLI.ErrorHandler`
[🔗](https://github.com/Lorenzo-SF/alaja/blob/2.1.0/lib/alaja/cli/error_handler.ex#L1)

Error handling for CLI commands.

Provides formatted error messages, suggestions,
and appropriate exit codes.

# `flag_errors`

```elixir
@spec flag_errors([String.t()]) :: {:error, atom()}
```

Prints flag validation errors and exits.

# `format_error`

```elixir
@spec format_error(String.t(), String.t()) :: {:error, atom()}
```

Prints a formatted error message for the CLI.

# `missing_args`

```elixir
@spec missing_args(String.t(), [atom()]) :: {:error, atom()}
```

Shows error for missing required positional arguments.

# `no_command`

```elixir
@spec no_command([map()]) :: {:error, :no_command}
```

Shows error when no command is given.

# `no_handler`

```elixir
@spec no_handler(String.t()) :: {:error, :no_handler}
```

Shows error when a command has no run handler.

# `unknown_command`

```elixir
@spec unknown_command(String.t(), [map()]) :: {:error, :unknown_command}
```

Handles unknown command by showing suggestions.

---

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