@synchronized-studio/cmsassets-agent
v0.6.2
Published
CLI agent that auto-integrates @synchronized-studio/response-transformer into any JS/TS project.
Maintainers
Readme
@synchronized-studio/cmsassets-agent
CLI agent that auto-integrates @synchronized-studio/response-transformer into any JS/TS project.
Quick start
npx @synchronized-studio/cmsassets-agent initThis single command will:
- Scan your project (detect framework, CMS, injection points)
- Install
@synchronized-studio/response-transformer - Patch your source files with the transformer calls
- Add a
cmsassets:transformnpm script for easy re-runs
Re-run after code changes
npm run cmsassets:transformOptions
# Preview changes without applying
npx @synchronized-studio/cmsassets-agent init --dry-run
# Skip confirmation prompt (CI-friendly)
npx @synchronized-studio/cmsassets-agent init --yes
# Set your tenant slug
npx @synchronized-studio/cmsassets-agent init --slug my-project
# Override CMS type
npx @synchronized-studio/cmsassets-agent init --cms prismicAdvanced usage
For more control, use the individual commands:
# Scan only
npx @synchronized-studio/cmsassets-agent scan --dir .
# Generate a plan file for review
npx @synchronized-studio/cmsassets-agent plan --dir .
# Apply patches (installs transformer by default)
npx @synchronized-studio/cmsassets-agent apply --dir .
# Verify integration (lint, build, test)
npx @synchronized-studio/cmsassets-agent verify --dir .
# Diagnose project setup
npx @synchronized-studio/cmsassets-agent doctor --dir .
# Rollback last apply
npx @synchronized-studio/cmsassets-agent rollback --dir .Patch mode (optional)
Choose how patching is performed:
--patch-mode ast-> AST-only patching--patch-mode ai-> AI-first patching (requiresOPENAI_API_KEY)--patch-mode hybrid-> default mode
Example:
npx @synchronized-studio/cmsassets-agent init --patch-mode aiPublishing
cd packages/cmsassets-agent
npm run build
npm publishopenai is an optional dependency — users who want AI patching must install it themselves.
