# `mix lightning.adaptors.snapshot`
[🔗](https://github.com/OpenFn/lightning/blob/main/lib/mix/tasks/lightning.adaptors.snapshot.ex#L1)

Fetches every `@openfn/language-*` adaptor straight from npm via
`Lightning.Adaptors.NPM` and writes the full records to a JSON file, in
the shape `Lightning.Adaptors.Catalogue.upsert_adaptor/1` accepts.

Nothing here touches the catalogue, so this works on an instance with
no database yet. It is the cold-start way to produce a snapshot.
`mix lightning.adaptors.dump` is the equivalent for an instance whose
catalogue is already populated. Either file can be read back by
`mix lightning.adaptors.import`.

## Usage

    mix lightning.adaptors.snapshot
    mix lightning.adaptors.snapshot --path snapshot.json

Without `--path`, writes to `adaptor_registry_cache.json` in this
instance's `priv` directory.

# `run`

---

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