{
  "slug": "store/migration",
  "title": "Persist to Store Migration",
  "description": "Move from legacy Cuitty Persist names to the canonical Cuitty Store SDK, DSL, CLI, and docs paths.",
  "url": "https://cuitty.com/docs/store/migration",
  "markdown_url": "https://cuitty.com/docs/store/migration.md",
  "json_url": "https://cuitty.com/docs/store/migration.json",
  "frontmatter": {
    "title": "Persist to Store Migration",
    "description": "Move from legacy Cuitty Persist names to the canonical Cuitty Store SDK, DSL, CLI, and docs paths.",
    "order": 5,
    "section": "Store",
    "updatedAt": "2026-06-18"
  },
  "headings": [
    {
      "depth": 1,
      "slug": "persist-to-store-migration",
      "text": "Persist to Store Migration"
    },
    {
      "depth": 2,
      "slug": "package-imports",
      "text": "Package Imports"
    },
    {
      "depth": 2,
      "slug": "core-aggregator",
      "text": "Core Aggregator"
    },
    {
      "depth": 2,
      "slug": "dsl-blocks",
      "text": "DSL Blocks"
    },
    {
      "depth": 2,
      "slug": "cli-commands",
      "text": "CLI Commands"
    },
    {
      "depth": 2,
      "slug": "paths-and-redirects",
      "text": "Paths And Redirects"
    },
    {
      "depth": 2,
      "slug": "migration-checklist",
      "text": "Migration Checklist"
    }
  ],
  "body_markdown": "# Persist to Store Migration\n\nCuitty Persist is now Cuitty Store. Store is the canonical name for the local-first storage SDK, DSL block, CLI surface, docs, and marketing pages.\n\nLegacy Persist imports and routes remain compatibility aliases during the rebrand window, but new code and docs should use Store names.\n\n## Package Imports\n\n```ts\n// Before\nimport { createPersist } from \"@cuitty/persist\";\n\nconst persist = await createPersist({ workspace: \"acme\" });\nconst tasks = persist.records(\"tasks\");\n\n// After\nimport { createStore } from \"@cuitty/store\";\n\nconst store = await createStore({ workspace: \"acme\" });\nconst tasks = store.records(\"tasks\");\n```\n\n## Core Aggregator\n\n```ts\nconst cuitty = createCuitty({\n  products: [\"store\", \"observe\"],\n});\n\nconst store = await cuitty.store();\n```\n\n`cuitty.persist()` stays available as a deprecated compatibility alias when either the legacy Persist client or the Store client is installed.\n\n## DSL Blocks\n\n```hcl\n# Before\npersist \"todos\" {\n  store \"todos\" { class = \"record\" }\n}\n\n# After\nstore \"todos\" {\n  store \"todos\" { class = \"record\" }\n}\n```\n\nThe DSL still recognizes `persist` blocks so existing workspaces can validate while you migrate.\n\n## CLI Commands\n\n```bash\n# Before\ncui persist init my-store\ncui persist sync --peer alice@cuitty.dev\n\n# After\ncui store init my-store\ncui store sync --peer alice@cuitty.dev\n```\n\nPersist command aliases stay wired for compatibility, but Store is the command shown in docs and examples.\n\n## Paths And Redirects\n\n| Legacy | Canonical |\n| --- | --- |\n| `/product/persist` | `/product/store` |\n| `/docs/persist` | `/docs/store` |\n| `/docs/persist/*` | `/docs/store/*` |\n| `persist.one` | `store.cuitty.com` |\n\nThe legacy paths redirect with `308` status codes.\n\n## Migration Checklist\n\n1. Replace `@cuitty/persist` imports with `@cuitty/store`.\n2. Replace `createPersist` calls with `createStore`.\n3. Rename `persist` DSL blocks to `store`.\n4. Replace `cui persist` command usage with `cui store`.\n5. Update product links from `/product/persist` to `/product/store`.\n6. Keep only explicit compatibility notes for legacy Persist aliases.",
  "links_out": []
}