# `mix posthog.public_api`
[🔗](https://github.com/posthog/posthog-elixir/blob/v2.23.4/lib/mix/tasks/posthog.public_api.ex#L1)

Checks the committed public API snapshot.

The snapshot is generated from compiled BEAM metadata. Public modules are
discovered from the current Mix application. `PostHog.*` modules and
documented `Mix.Tasks.Posthog.*` modules are included. `Code.fetch_docs/1` is
used to identify documented modules and function visibility, and `__info__/1`
is used to enumerate exported functions and macros. Mix tasks also include
their task name, shortdoc, and module documentation text so command/options
documentation changes are checked.

    mix posthog.public_api --check
    mix posthog.public_api --update

## Options

  * `--check` - Compare the generated snapshot with the committed snapshot.
    This is the default.
  * `--update` - Regenerate the committed snapshot.
  * `--snapshot` - Snapshot path. Defaults to `public_api.snapshot`.

---

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