# `mix mob.plugin.keygen`
[🔗](https://github.com/genericjam/mob_dev/blob/master/lib/mix/tasks/mob.plugin.keygen.ex#L1)

Generates a per-plugin Ed25519 keypair and writes:

- `~/.mob/keys/<plugin_name>.priv` — base64-encoded raw 32-byte private
  key, mode 0600.
- `priv/mob_plugin.pub` in the plugin directory — base64-encoded raw
  32-byte public key.

The public key file ships with the plugin (committed to source
control); the private key never leaves the author's machine.

    mix mob.plugin.keygen [--plugin <dir>] [--force]

## Options

  * `--plugin <dir>` — plugin directory; defaults to the current
    working directory.
  * `--force` — overwrite an existing `~/.mob/keys/<name>.priv`.
    Refused by default to prevent an accidental key rotation.

---

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