API Reference
Complete reference for configuration, the CLI, and the options shared by every field.
cms.config.ts
Every configuration option, type, and default.
CLIsetup, update-sections, db-config, set-master-admin, fix-master-admin.
Common Field Optionsname, label, required, defaultValue, order, conditionalRules, adminGenerated, localized.
Package entry points
What developers building a CMS typically import:
| Import | Exports |
|---|---|
nextjs-cms/core/config | defineConfig, config types |
nextjs-cms/core/sections | simpleSection, hasItemsSection, categorySection, hook types |
nextjs-cms/core/fields | All field helpers, fieldGroup, and, or |
nextjs-cms/core/types | ConditionalRule, ConditionalRulesConfig, and other shared types |
nextjs-cms/translations/base/en | The English admin dictionary |
nextjs-cms/plugins/define | definePlugin (for plugin authors) |
nextjs-cms/plugins/client | usePluginTRPC (for plugin authors) |
nextjs-cms/plugins/derive | derivePluginName (for plugin authors) |
nextjs-cms/api/plugin | router, publicProcedure, privateProcedure, pluginProcedure (for plugin authors) |
nextjs-cms/db/client | db, the CMS's Drizzle client (for hooks and plugins) |
The package exports more entry points (api/server, auth, core/submit, core/factories, ...). Those are used by the admin application itself and are documented in the Contributing docs.