# `mix hammer.install`
[🔗](https://github.com/ExHammer/hammer/blob/v7.5.0/lib/mix/tasks/hammer.install.ex#L39)

Installs Hammer: generates a rate limiter module and adds it to the supervision tree

Generates `MyApp.RateLimit` (`use Hammer, backend: ...`) and adds it as a child of
the application supervisor. Hammer has no global configuration: limits are defined at
each call site with `MyApp.RateLimit.hit(key, scale, limit)`, so after installing,
see the Hammer tutorial for how to compose keys and wire the limiter into a plug.

## Example

```sh
mix hammer.install --backend ets
```

## Options

* `--backend` or `-b` - The backend to use. One of `ets` (default), `atomic` or `redis`.
  `redis` also adds the `hammer_backend_redis` dependency.

---

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