[{"data":1,"prerenderedAt":301},["ShallowReactive",2],{"docs-\u002Fagent":3},{"id":4,"title":5,"body":6,"description":293,"extension":294,"meta":295,"navigation":296,"path":297,"seo":298,"stem":299,"__hash__":300},"docs\u002Fdocs\u002Fagent.md","CLI Agent",{"type":7,"value":8,"toc":285},"minimark",[9,14,34,37,42,98,101,103,107,115,140,162,164,168,171,187,190,192,196,250,252,256,281],[10,11,13],"h1",{"id":12},"cli-agent-overview","CLI Agent — Overview",[15,16,17,18,22,23,27,28,33],"p",{},"The ",[19,20,21],"strong",{},"Cachely Agent"," (",[24,25,26],"code",{},"@synchronized-studio\u002Fcmsassets-agent",") is a CLI that automatically integrates the ",[29,30,32],"a",{"href":31},"\u002Fdocs\u002Fgetting-started#3-install-the-response-transformer","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.",[35,36],"hr",{},[38,39,41],"h2",{"id":40},"what-it-does","What it does",[43,44,45,52,70,84],"ul",{},[46,47,48,51],"li",{},[19,49,50],{},"Detects"," your stack — framework (Nuxt, Next, Remix, Astro, SvelteKit, Express, Hono, Fastify) and CMS (Prismic, Contentful, Sanity, Shopify, Cloudinary, Imgix, or generic S3\u002FR2\u002FGCS origins)",[46,53,54,57,58,61,62,65,66,69],{},[19,55,56],{},"Finds injection points"," — fetch calls, loaders, ",[24,59,60],{},"useAsyncData","\u002F",[24,63,64],{},"useFetch",", ",[24,67,68],{},"getServerSideProps",", API routes, composables",[46,71,72,75,76,79,80,83],{},[19,73,74],{},"Installs"," ",[24,77,78],{},"@synchronized-studio\u002Fresponse-transformer"," and applies the correct options (including ",[24,81,82],{},"cmsAssetsUrl"," for Nuxt via runtime config when needed)",[46,85,86,89,90,93,94,97],{},[19,87,88],{},"Adds"," a ",[24,91,92],{},"cmsassets:transform"," script to ",[24,95,96],{},"package.json"," so you can re-run when you add new CMS-backed code",[15,99,100],{},"Idempotent and safe to re-run: already-patched files are skipped.",[35,102],{},[38,104,106],{"id":105},"quick-start","Quick start",[15,108,109,110,114],{},"From your project root, after you've ",[29,111,113],{"href":112},"\u002Fdocs\u002Fgetting-started#2-create-a-tenant","created a tenant"," and know your Cachely URL:",[116,117,122],"pre",{"className":118,"code":119,"language":120,"meta":121,"style":121},"language-bash shiki shiki-themes github-dark","npx @synchronized-studio\u002Fcmsassets-agent init\n","bash","",[24,123,124],{"__ignoreMap":121},[125,126,129,133,137],"span",{"class":127,"line":128},"line",1,[125,130,132],{"class":131},"svObZ","npx",[125,134,136],{"class":135},"sU2Wk"," @synchronized-studio\u002Fcmsassets-agent",[125,138,139],{"class":135}," init\n",[15,141,142,143,146,147,153,154,157,158,161],{},"You'll be prompted for your tenant slug so the agent can set ",[24,144,145],{},"CMS_ASSETS_URL"," (or configure Nuxt runtime config). Use the slug from your ",[29,148,152],{"href":149,"rel":150},"https:\u002F\u002Fapp.cachely.io\u002Ftenants",[151],"nofollow","dashboard"," (e.g. ",[24,155,156],{},"my-project"," → ",[24,159,160],{},"https:\u002F\u002Fmy-project.cmsassets.com",").",[35,163],{},[38,165,167],{"id":166},"re-run-after-code-changes","Re-run after code changes",[15,169,170],{},"When you add new pages, composables, or API routes that fetch CMS data:",[116,172,174],{"className":118,"code":173,"language":120,"meta":121,"style":121},"npm run cmsassets:transform\n",[24,175,176],{"__ignoreMap":121},[125,177,178,181,184],{"class":127,"line":128},[125,179,180],{"class":131},"npm",[125,182,183],{"class":135}," run",[125,185,186],{"class":135}," cmsassets:transform\n",[15,188,189],{},"Only files that are not yet transformed will be patched.",[35,191],{},[38,193,195],{"id":194},"cli-agent-section","CLI Agent section",[43,197,198,227,243],{},[46,199,200,204,205,208,209,65,212,65,215,65,218,65,221,65,224],{},[29,201,203],{"href":202},"\u002Fdocs\u002Fagent\u002Fcommands","Commands & options"," — ",[24,206,207],{},"init"," flags, ",[24,210,211],{},"scan",[24,213,214],{},"plan",[24,216,217],{},"apply",[24,219,220],{},"verify",[24,222,223],{},"doctor",[24,225,226],{},"rollback",[46,228,229,204,233,65,236,65,239,242],{},[29,230,232],{"href":231},"\u002Fdocs\u002Fagent\u002Fpatch-mode","Patch mode & AI",[24,234,235],{},"ast",[24,237,238],{},"ai",[24,240,241],{},"hybrid",", and optional AI verification",[46,244,245,249],{},[29,246,248],{"href":247},"\u002Fdocs\u002Fagent\u002Fframeworks","Supported frameworks"," — Nuxt 2\u002F3, Next, Remix, Astro, SvelteKit, Express-style",[35,251],{},[38,253,255],{"id":254},"next-steps","Next steps",[43,257,258,267,274],{},[46,259,260,264,265],{},[29,261,263],{"href":262},"\u002Fdocs\u002Fgetting-started","Getting Started"," — Create a tenant and set ",[24,266,145],{},[46,268,269,273],{},[29,270,272],{"href":271},"\u002Fdocs\u002Flimits","Limits & Usage"," — Bandwidth and request quotas",[46,275,276,280],{},[29,277,279],{"href":278},"\u002Fdocs\u002Fbilling","Billing"," — Free and Pro plans",[282,283,284],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":121,"searchDepth":286,"depth":286,"links":287},2,[288,289,290,291,292],{"id":40,"depth":286,"text":41},{"id":105,"depth":286,"text":106},{"id":166,"depth":286,"text":167},{"id":194,"depth":286,"text":195},{"id":254,"depth":286,"text":255},"Automate Cachely integration with one CLI command. Detects your framework and CMS, patches source files, and adds a re-run script to package.json.","md",{},true,"\u002Fdocs\u002Fagent",{"title":5,"description":293},"docs\u002Fagent","zeA_zrWDFl68ivB6RGgulFwkx4Wqj5gRLpeFoC651gw",1777579477594]