Nexus CMS

Configuration

Complete nexus.config.ts reference — every option and what lives elsewhere.

nexus.config.ts (also .mjs / .js / .json) is loaded by the CLI (generate / watch / check / doctor). Use defineConfig from @nexus-cms/core for typing.

nexus.config.ts
import { defineConfig } from "@nexus-cms/core";

export default defineConfig({
  include: ["app/**/*.{tsx,jsx}", "components/**/*.{tsx,jsx}"],
  exclude: ["**/node_modules/**", "**/*.test.*", "**/*.stories.*"],
  schemaOutput: ".nexus/cms-schema.json",
  locales: ["en"],
  breakpoints: [375, 768, 1280],

  features: {
    text: true,
    image: true,
    link: true,
    visibility: true,
    collectionReorder: true,
    collectionAddRemove: true,
    seo: true,
    versions: true,
    locales: true,
  },

  naming: {
    stripSuffixes: ["Section"],
    overrides: { Hero: "Hero banner" },
  },

  backend: {
    adapter: "filament",
    baseUrl: process.env.NEXT_PUBLIC_NEXUS_API_URL,
    projectKey: process.env.NEXT_PUBLIC_NEXUS_PROJECT,
    tokenEnv: "NEXUS_API_TOKEN",
    syncIntervalSeconds: 600,
  },

  licenseKey: process.env.NEXUS_LICENSE_KEY,
});

Options in nexus.config.ts

Scan & schema

OptionDefaultWhat it does
includeapp/**/*.{tsx,jsx}, src/**/*.{tsx,jsx}, components/**/*.{tsx,jsx}Globs the CLI scans for editable regions.
exclude**/node_modules/**, **/*.test.*, **/*.stories.*Extra globs skipped (on top of // @cms-ignore).
schemaOutput.nexus/cms-schema.jsonWhere nexus generate writes the schema.

Locales & layout hints

OptionDefaultWhat it does
locales["en"]Site locales. First entry is the default.
breakpoints[375, 768, 1280]Documented viewport widths for overlay layout. Accepted in config today; not yet consumed by the runtime overlay.

features (all default true)

Compiler still emits regions when a flag is off — only the editor is gated.

FlagWhen false
textText / richtext regions are not editable.
imageImage swap / upload disabled.
linkLink label/href editing disabled.
visibilityShow/hide toggles hidden.
collectionReorderCollection reorder controls hidden.
collectionAddRemoveAdd/remove items hidden (also Pro-licensed).
seoSEO panel hidden.
versionsVersions panel hidden (also Pro-licensed).
localesLocale switcher / i18n editing hidden (also Pro-licensed).

License still gates Pro flags via applyLicenseToFlags even if config sets them true.

naming

OptionWhat it does
stripSuffixesStrip these suffixes from component names when deriving region labels (e.g. "Section"Hero from HeroSection).
overridesMap ComponentName → display name (e.g. { Hero: "Hero banner" }).

backend

OptionDefaultWhat it does
adapter"filament" | "http" | "memory" (declared intent for tooling / docs).
baseUrlBackend API base URL.
projectKeyProject id on the backend.
tokenEnv"NEXUS_API_TOKEN"Name of the env var holding the server token (never inlined to the client).
syncIntervalSeconds600Hint for client background refetch interval.

Wiring the actual adapter is still done in app code (createHttpAdapter / createMemoryAdapter + <CmsProvider> / <NexusProvider>). Config alone does not mount storage.

License

OptionDefaultWhat it does
licenseKeyKey from the Dashboard (e.g. NEXUS-PRO-…). Selects feature tier.

Not configured in nexus.config.ts

These are controlled elsewhere:

JSX comment directives (source)

DirectiveWhereEffect
// @cms-ignoreFile topSkip entire file.
// @cms-readonlyFile topRegions discovered but not editable.
// @cms-name(…)File topOverride auto-derived page/section name.
// @cms-locales(en,ar)File topPer-file locale set.
{/* @cms-ignore */}Above elementSkip that node.
{/* @cms-readonly */}Above elementRegion read-only.
{/* @cms-name(…) */}Above elementRegion display name.
{/* @cms-richtext */} / {/* @cms-unite */}Above elementOne text field (collapse Highlighter/motion splits).
{/* @cms-section */}Above elementHideable page section (also auto for <section> / <article>).
{/* @cms-layout(bento|alternating|stack|grid) */}Above collectionHow cloned items inherit layout classes.

See Comment directives.

<CmsProvider> / <NexusProvider> props (runtime)

PropNotes
schemaLoaded JSON from schemaOutput.
adapterConcrete storage (memory / HTTP / Filament client).
pageCurrent route key (e.g. "/").
editModeOverlay on/off (often ?edit=1).
initialContentSSR no-flash content.
localeInitial locale.
features / licenseKey / syncIntervalSecondsCan override config at runtime.
authorLabel on publish.
onSaved / onExitApp callbacks.

withNexus(nextConfig, options) (bundler)

Separate from nexus.config.ts. Loader options only:

OptionEffect
stripSuffixesSame idea as naming.stripSuffixes for the transform.
nameOverridesSame idea as naming.overrides.
excludeExtra path substrings / regexes to skip in the bundler (always skips node_modules).

Env vars (host app / SaaS — not Nexus CMS content config)

Examples for apps/web: MONGODB_URI, AUTH_SECRET, Filament NEXUS_API_TOKEN / NEXT_PUBLIC_NEXUS_*. These are application secrets, not nexus.config.ts fields.

Not available as config today

CapabilityStatus
Theme / overlay colors / toolbar layoutHardcoded in @nexus-cms/react styles
Custom editor panels / pluginsNot pluggable via config
Scheduled publish / A-B / audit logLicense feature names exist; no features.* toggles yet
Roles / permissions / multi-user ACLNot in config
Media CDN / upload limitsAdapter-specific, not config
Page list / routesDiscovered from source + schema, not a config array
SEO field schema customizationFixed SEO panel fields
breakpoints driving the overlayDeclared only; unused by runtime
Auto-mounting backend.adapterYou wire the adapter in React

Feature flags vs license

Flags are resolved against your license. versions, locales, and collectionAddRemove are Pro features — turning a flag on later needs no region rewrites, but the key/tier must allow it.

On this page