Commands & options


init — main entry point

npx @synchronized-studio/cmsassets-agent init

Runs the full flow: scan → plan → install transformer → apply patches → add cmsassets:transform script.

init options

OptionDescription
--dry-runShow which files would be patched without writing changes
--yesSkip confirmation prompt (CI-friendly)
--slug <slug>Your tenant slug (e.g. my-project) so the agent can set CMS_ASSETS_URL
--cms <type>Override CMS: prismic, contentful, sanity, shopify, cloudinary, imgix, generic

Examples:

# Preview first
npx @synchronized-studio/cmsassets-agent init --dry-run

# Non-interactive with slug
npx @synchronized-studio/cmsassets-agent init --yes --slug my-project

# Force Prismic
npx @synchronized-studio/cmsassets-agent init --cms prismic

Advanced commands

Use these when you want to run only part of the pipeline or inspect the plan.

CommandDescription
scan --dir .Scan the project and list injection points (no install, no patches)
plan --dir .Generate a plan file for review without applying
apply --dir .Apply patches (installs the transformer if needed)
verify --dir .Run lint / build / test to verify the integration
doctor --dir .Diagnose project setup and compatibility
rollback --dir .Undo the last apply (restore patched files from backup)

All commands accept --dir <path>; default is current directory.


Re-run script

After init, the agent adds to your package.json:

"scripts": {
  "cmsassets:transform": "cmsassets-agent apply --dir ."
}

Run npm run cmsassets:transform whenever you add new CMS-backed code. Only files that are not yet transformed will be patched.


← CLI Agent overview · Patch mode & AI →

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