Skip to content
agent-cms

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.json

With the agent-cms CLI

npx @mainsoft/agent-cms add cms-empty
Live demo
Runs on a demo database that resets every 30 minutes.

No documents yet

Write with an agent

CLI
npx @mainsoft/agent-cms put posts ./post.md
MCP
/api/demo/mcp

Usage#

tsx
<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-empty

It also needs CmsProvider from cms-lib around your admin:

tsx
<CmsProvider baseUrl="/api/cms">{children}</CmsProvider>