Components / cms-empty
Empty collection
New document, and how to write with an agent instead (CLI one-liner, MCP URL, API key link).
With the shadcn CLI
npx shadcn add https://agent-cms-docs.vercel.app/r/cms-empty.jsonWith the agent-cms CLI
npx @mainsoft/agent-cms add cms-emptyLive demoRuns on a demo database that resets every 30 minutes.
No documents yet
Write with an agent
CLI
npx @mainsoft/agent-cms put posts ./post.mdMCP
/api/demo/mcpUsage#
<CmsEmpty collection="posts" onNewDocument={() => router.push("/admin/posts/new")} keysHref="/admin/keys" />CmsDocList shows it by itself when a collection is empty; use it directly when you build your own list.
Install#
npx @mainsoft/agent-cms add cms-emptyIt also needs CmsProvider from cms-lib around your admin:
<CmsProvider baseUrl="/api/cms">{children}</CmsProvider>