Supported frameworks

The agent detects your framework and CMS, then applies the right kind of patch (e.g. wrap a return, add a transform option, or wrap a loader).


Nuxt 3

  • Pages / composablesuseAsyncData, useFetch. Agent adds a transform option that runs the response transformer with cmsAssetsUrl from useRuntimeConfig().public.cmsAssetsUrl. It can inject runtimeConfig.public.cmsAssetsUrl in nuxt.config if missing.
  • Server routesserver/api/** and server/routes/** — return statements that return CMS data are wrapped with the transformer.

Nuxt 2

  • PagesasyncData hook: the return value inside the hook is wrapped.
  • Vuex store — Actions that fetch CMS data and return or commit that data: agent can wrap the return or the value passed to commit('SET_STATE', { value: ... }).

Next.js

  • API routesapp/api/**/route.ts or pages/api/**return or res.json() that return CMS data are wrapped.
  • getServerSideProps / getStaticProps — Return value is wrapped.
  • App Router lib — Return statements in lib/ (or similar) that return CMS data are detected. App Router page components are not auto-patched (too many edge cases); prefer API or lib layer.

Remix

  • Loaders — Return value of loader is wrapped with the transformer.

Astro

  • Frontmatter — Assignments like const data = await fetch(...) in the frontmatter block are wrapped so the fetched data is transformed before use.

SvelteKit

  • Load+page.server.ts / +layout.server.ts: return value of load is wrapped.
  • Lib — Return statements in src/lib/ that return CMS data are supported.

Express / Hono / Fastify

  • Route handlers — Handlers that return JSON (e.g. res.json(data)) are detected; the agent wraps the value passed to res.json(...) (or equivalent) with the transformer.

CMS detection

The agent looks for common CMS SDK usage (Prismic, Contentful, Sanity, Shopify, Cloudinary, Imgix) in your code. It also detects generic S3, R2, and GCS origin patterns automatically. You can override with --cms prismic (or contentful, sanity, shopify, cloudinary, imgix, generic) if auto-detection is wrong or you want to force a specific CMS type.


← Patch mode & AI · CLI Agent overview

Need help understanding this?Ask CMS Assets Copilot about features, setup, or integrations.
Ask Copilot →