<a id="hook-command-is-leader"></a>

# `is-leader`

## Summary

Prints application leadership status.

## Usage

`is-leader [options]`

### Options

| Flag             | Default   | Usage                                   |
|------------------|-----------|-----------------------------------------|
| `--format`       | smart     | Specify output format (json|smart|yaml) |
| `-o`, `--output` |           | Specify an output file                  |

## Examples

```none
LEADER=$(is-leader)
if [ "${LEADER}" == "True" ]; then
  # Do something a leader would do
fi
```

## Details

`is-leader` prints a boolean indicating whether the local unit is guaranteed to
be application leader for at least 30 seconds;  if it fails, you should assume that
there is no such guarantee.
