RAGit
CommandsMigrate

migrate from-json-store

Convert the legacy JSON store into the canonical zvec layout

What It Does

migrate from-json-store reads the legacy JSON-backed store and rewrites its documents, chunks, and snapshot data into the current canonical storage layout.

When To Use / When Not To Use

When to use it

  • status or init indicates that a legacy JSON store still exists.
  • You are upgrading an older repository layout to the current store contract.

When not to use it

  • The repository is already using the canonical store.
  • Your legacy source is sqlite-vss export data instead. Use migrate from-sqlitevss.

Syntax

pnpm ragit migrate from-json-store [--dry-run] [--cwd <path>]

Arguments And Options

  • --dry-run: Count what would be migrated without writing the canonical store.
  • --cwd <path>: Run against another repository.

Input And Output Contract

  • Input is flag-based only.
  • Output is a raw JSON object with mode, docs, chunks, and optional snapshotSha.
  • --dry-run is the safe first call for automation.

Examples

Human terminal flow:

pnpm ragit migrate from-json-store --dry-run

Agent-oriented flow:

pnpm ragit migrate from-json-store --dry-run

Failures And Cautions

  • The command fails if the legacy JSON store file is missing.
  • Treat migration as a write operation even though it prints raw JSON instead of the shared CLI envelope.