CLI Agent — Overview
The CMS Assets Agent (@synchronized-studio/cmsassets-agent) is a CLI that automatically integrates the response transformer into your project. Instead of manually adding imports and wrapping fetch calls, you run a single command; the agent scans your codebase, installs the transformer, and patches the right files.
What it does
- Detects your stack — framework (Nuxt, Next, Remix, Astro, SvelteKit, Express, Hono, Fastify) and CMS (Prismic, Contentful, Sanity, Shopify, Cloudinary, Imgix, or generic S3/R2/GCS origins)
- Finds injection points — fetch calls, loaders,
useAsyncData/useFetch,getServerSideProps, API routes, composables - Installs
@synchronized-studio/response-transformerand applies the correct options (includingcmsAssetsUrlfor Nuxt via runtime config when needed) - Adds a
cmsassets:transformscript topackage.jsonso you can re-run when you add new CMS-backed code
Idempotent and safe to re-run: already-patched files are skipped.
Quick start
From your project root, after you've created a tenant and know your CMS Assets URL:
npx @synchronized-studio/cmsassets-agent init
You'll be prompted for your tenant slug so the agent can set CMS_ASSETS_URL (or configure Nuxt runtime config). Use the slug from your dashboard (e.g. my-project → https://my-project.cmsassets.com).
Re-run after code changes
When you add new pages, composables, or API routes that fetch CMS data:
npm run cmsassets:transform
Only files that are not yet transformed will be patched.
CLI Agent section
- Commands & options —
initflags,scan,plan,apply,verify,doctor,rollback - Patch mode & AI —
ast,ai,hybrid, and optional AI verification - Supported frameworks — Nuxt 2/3, Next, Remix, Astro, SvelteKit, Express-style
Next steps
- Getting Started — Create a tenant and set
CMS_ASSETS_URL - Limits & Usage — Bandwidth and request quotas
- Billing — Free and Pro plans