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

Populates Lightning from a declarative scenario file.

Creates users (with optional API tokens), credentials and projects, and
provisions workflows through the same engine as the `/api/provision` HTTP
API. Idempotent: re-running the same scenario converges instead of
duplicating. See `Lightning.Kickstart` for the file format and semantics.

The database must already be migrated (`mix ecto.migrate`). Kickstarting is
a dev/test facility — see `Lightning.Kickstart` — so this task is the only
way in; there is no release equivalent.

## Usage

    mix lightning.kickstart SCENARIO_FILE [OPTIONS]

## Arguments

  * `SCENARIO_FILE` - Path to a `.yaml`, `.yml` or `.json` scenario file

## Options

  * `--manifest PATH` - Also write a JSON manifest (record ids, API tokens,
    webhook paths) for consumption by scripts or test harnesses

## Examples

    mix lightning.kickstart bin/e2e.d/scenarios/example.yaml
    mix lightning.kickstart state.yaml --manifest /tmp/manifest.json

---

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