Components / cms-transfer
Import and export
Import an export file or markdown files after seeing what each would change; export every document as markdown.
With the shadcn CLI
npx shadcn add https://agent-cms-docs.vercel.app/r/cms-transfer.jsonWith the agent-cms CLI
npx @mainsoft/agent-cms add cms-transferNo live demo: an import writes documents, and the demo is shared by every visitor. Add the screen to your app, or run the example app (examples/next). Open the editor demo
Usage#
// app/admin/transfer/page.tsx
"use client";
import { CmsTransfer } from "@/components/cms/cms-transfer";
export default function Page() {
return <CmsTransfer />;
}The sidebar shows "Import and export" to admins. Import: choose an export file (.json) or markdown files, pick what happens when the address exists, and read the table (new document, v1 → v2, skipped, cannot import with the reason). Untick what you do not want, then import: everything arrives as a draft. Export: pick a collection or all, with or without drafts.
Files in the media library travel with the CLI (export --with-files), not with this screen.
See Export and import.
note
From 0.13.0.