Skip to content
agent-cms
Admin screens / Admin screens

Admin screens / admin-screens

Admin screens

Copy the screens into your app, theme them, and keep them up to date.

Updated Nov 21, 2026by docs seedVersion 5
On this page

The screens are source files you copy into your app and then own, like shadcn/ui. They use your shadcn/ui parts and talk to the CMS through createRestClient from @mainsoft/agent-cms/client.

Add them#

With the shadcn CLI, from this site's registry:

npx shadcn add https://agent-cms-docs.vercel.app/r/cms-doc-editor.json

Or with the agent-cms CLI:

npx @mainsoft/agent-cms add cms-shell cms-doc-list cms-doc-editor cms-versions cms-keys cms-audit cms-command
npx @mainsoft/agent-cms add cms-media cms-files   # with a media library (0.10.0 and later)
npx @mainsoft/agent-cms add cms-trash cms-releases cms-preview-comments   # trash, releases, comments on preview links (0.10.0 and later)
npx @mainsoft/agent-cms add cms-webhooks                                # webhooks (0.12.0 and later)
npx @mainsoft/agent-cms add cms-dashboard cms-automations cms-roles cms-transfer   # dashboard, automations, roles, import and export (0.13.0 and later)

Files go to <components>/cms/. The shadcn parts and the screens an item needs come along. Browse every screen with a live demo in Components.

Wire them#

tsx
<CmsProvider baseUrl="/api/cms">
  <CmsShell title="Admin" LinkComponent={Link} extraNav={[{ label: "App", items: [{ label: "Reports", href: "/admin/reports" }] }]}>
    <CmsDocList collection="posts" hrefFor={(c, s) => `/admin/${c}/${s}`} />
  </CmsShell>
</CmsProvider>

extraNav adds your app's own screens to the sidebar. UI text is English; pass messages={ko} from cms-messages for Korean.

Theme them#

The screens use the shadcn variables (--background, --primary, --radius, fonts). Change those and the screens follow. This site's admin is the same screens with its own variables; the gallery switches between the two looks.

Update them#

npx @mainsoft/agent-cms add --diff      # what a new release would change in your copies
npx @mainsoft/agent-cms add --update    # update files you did not edit; yours get a .new copy

agent-cms.json records what was copied. --diff and --update only know about copies made with agent-cms add.