# `LLMDB.History.Migrator`
[🔗](https://github.com/agentjido/llm_db/blob/main/lib/llm_db/history/migrator.ex#L1)

One-time migration from Git-tracked metadata history into snapshot-store artifacts.

The migrator walks reachable metadata commits, reconstructs canonical snapshots,
materializes immutable snapshot artifacts by content hash, deduplicates adjacent
identical states, and then rebuilds local history artifacts from the resulting
snapshot observation chain.

Direct use is documentation-deprecated in favor of
`mix llm_db.history.migrate_git`.

# `summary`

```elixir
@type summary() :: %{
  commits_scanned: non_neg_integer(),
  commits_processed: non_neg_integer(),
  snapshots_written: non_neg_integer(),
  unique_snapshots_written: non_neg_integer(),
  events_written: non_neg_integer(),
  output_dir: String.t(),
  snapshots_dir: String.t(),
  snapshot_index_path: String.t(),
  latest_path: String.t(),
  from_snapshot_id: String.t() | nil,
  to_snapshot_id: String.t() | nil
}
```

# `run`

```elixir
@spec run(keyword()) :: {:ok, summary()} | {:error, term()}
```

---

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