{"_id":"@caretcms/caretize","_rev":"6-e59e74a06682e0700e1c72f095ea744c","name":"@caretcms/caretize","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@caretcms/caretize","version":"0.1.0","keywords":["astro","cms","caret","codemod","cli","data-caret","inline-editing"],"license":"MIT","_id":"@caretcms/caretize@0.1.0","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/caretize#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"bin":{"caretize":"dist/cli.js"},"dist":{"shasum":"31f5d006d83a5cb855f3a22adf187c6d32fcdfdd","tarball":"https://registry.npmjs.org/@caretcms/caretize/-/caretize-0.1.0.tgz","fileCount":102,"integrity":"sha512-maViXwYer5S9FkQv5vS4kG+rCBwlfXoIOx9yCdv6uJFDXUiNPhLzsthma0ed/KDnoiqoHVHrKq5Yy926DNNbpw==","signatures":[{"sig":"MEYCIQDQQ4HSU7PMPjM0MF7vGV0u6KxQLdXJqoHwf7zDZnwSvAIhAJkTmBo8c/yYj/a+4qlDhwhE7AS5u44nSogLiFjK3VCf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314743},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"14a7b1c33f6e7746d72c2765cfa1e738c884d177","scripts":{"build":"tsc -p tsconfig.build.json && chmod +x dist/cli.js","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/caretize"},"_npmVersion":"11.11.0","description":"CLI that scans an Astro project and interactively adds data-caret attributes, turning a static site into a CaretCMS-editable one.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"@astrojs/compiler":"2.13.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"6.0.3","@types/node":"25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/caretize_0.1.0_1781230335802_0.21652229430562464","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@caretcms/caretize","version":"0.1.2","keywords":["astro","cms","caret","codemod","cli","data-caret","inline-editing"],"license":"MIT","_id":"@caretcms/caretize@0.1.2","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/caretize#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"bin":{"caretize":"dist/cli.js"},"dist":{"shasum":"87e2b542d4b4e3a8bd14855f6853d2edd2797f91","tarball":"https://registry.npmjs.org/@caretcms/caretize/-/caretize-0.1.2.tgz","fileCount":126,"integrity":"sha512-gShksoY/RzkCs5ihosMErupQ+7dQoz9J0uJAG7FRdcLADj+rSNrTjFxvnN0bl2vpfIqB7zzp63icXi6MjAjjzw==","signatures":[{"sig":"MEUCIEaE4JADFx1j5iJFsRwF8YV7DjbmTjFH92LTQkO+jRRiAiEAqYc246dWorrxAWa4Im0GBuDrLM3XDuCh1ki4ThoNVv0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":461860},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"5aafc6eddcc87dd769a30ac4746f5c39bf1db6e4","scripts":{"build":"tsc -p tsconfig.build.json && chmod +x dist/cli.js","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/caretize"},"_npmVersion":"11.11.0","description":"CLI that scans an Astro project and interactively adds data-caret attributes, turning a static site into a CaretCMS-editable one.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"@astrojs/compiler":"2.13.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"6.0.3","@types/node":"25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/caretize_0.1.2_1782334127141_0.9497806651583249","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@caretcms/caretize","version":"0.2.0","keywords":["astro","cms","caret","codemod","cli","data-caret","inline-editing"],"license":"MIT","_id":"@caretcms/caretize@0.2.0","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/caretize#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"bin":{"caretize":"dist/cli.js"},"dist":{"shasum":"5d8266c6da294db101636a81a645bad1dee61ae0","tarball":"https://registry.npmjs.org/@caretcms/caretize/-/caretize-0.2.0.tgz","fileCount":126,"integrity":"sha512-hMqRNKcIAXXo6qc8b76EP+BowQaf1jrkTC/P93qiI/V8BmkvrAXkk+ezyp9y0+DvXivU5Fg36QDwUQXsZS1s2A==","signatures":[{"sig":"MEUCIQCttH9w0yQ0YxwrL7QTK5+k7ILoC5+8DNzyB7us2HO3SgIgdGvL/O1HbYGTcnFgRkudtwV7KYpHdv55NfOsoXD7W7g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":462707},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"beba21e3c4b85faff5639c50625948bc987837ac","scripts":{"build":"tsc -p tsconfig.build.json && chmod +x dist/cli.js","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json","prepublishOnly":"node scripts/check-version.mjs && npm run clean && npm run build"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/caretize"},"_npmVersion":"11.16.0","description":"CLI that scans an Astro project and interactively adds data-caret attributes, turning a static site into a CaretCMS-editable one.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@astrojs/compiler":"4.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"6.0.3","@types/node":"25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/caretize_0.2.0_1785859352091_0.9706153451857618","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@caretcms/caretize","version":"0.3.0","keywords":["astro","cms","caret","codemod","cli","data-caret","inline-editing"],"license":"MIT","_id":"@caretcms/caretize@0.3.0","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/caretize#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"bin":{"caretize":"dist/cli.js"},"dist":{"shasum":"ccd9350a0366da29c5b8711376e4d1acefeb4a03","tarball":"https://registry.npmjs.org/@caretcms/caretize/-/caretize-0.3.0.tgz","fileCount":127,"integrity":"sha512-V2TqQLShIoPMtl+mK7gZ95aBRPBmpPAcIuFYGYHLJlNMPTjQl4ZloNWDu9XbMds22tuXCAzmj/JJJoLEDaIjjg==","signatures":[{"sig":"MEQCIEEjDrOomNYD4nPAO8I/yrG7jOw1/fNlhMm0miXK7/L+AiB14XAyvG8aJstFgfY5hKjk2iFqs8afKsIojb+/vBiYxA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":463775},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"22f207684c1cb9b895212eeb0a5519dc6d24b7b5","scripts":{"build":"tsc -p tsconfig.build.json && chmod +x dist/cli.js","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json","prepublishOnly":"node scripts/check-version.mjs && npm run clean && npm run build"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/caretize"},"_npmVersion":"11.16.0","description":"CLI that scans an Astro project and interactively adds data-caret attributes, turning a static site into a CaretCMS-editable one.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@astrojs/compiler":"4.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"6.0.3","@types/node":"25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/caretize_0.3.0_1787228426955_0.3937128564317889","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@caretcms/caretize","version":"0.4.0","keywords":["astro","cms","caret","codemod","cli","data-caret","inline-editing"],"license":"MIT","_id":"@caretcms/caretize@0.4.0","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/caretize#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"bin":{"caretize":"dist/cli.js"},"dist":{"shasum":"131a6ce4118bfe70422b3485acd6a46877217dcc","tarball":"https://registry.npmjs.org/@caretcms/caretize/-/caretize-0.4.0.tgz","fileCount":127,"integrity":"sha512-tHzG3Gmy0gcP1BNbw9iXui5hGdacPDNvo/5DLivEWJIcu4aU+3RhN6Gq4bCVMM29Rn3n9796SluzJWTdBe+34Q==","signatures":[{"sig":"MEUCIQDmkB5ws2k0An5jll3HV2lf2csVxctFRm6+AeWBVUvQFQIgepRmFisyu8pKmPCMTi7ALVAxdeIyjSekOcx+Hu66XBY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":463793},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1974191daab1f4eb2aec475a22fcb671d279b525","scripts":{"build":"tsc -p tsconfig.build.json && chmod +x dist/cli.js","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json","prepublishOnly":"node scripts/check-version.mjs && npm run clean && npm run build"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/caretize"},"_npmVersion":"11.16.0","description":"CLI that scans an Astro project and interactively adds data-caret attributes, turning a static site into a CaretCMS-editable one.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@astrojs/compiler":"4.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"6.0.3","@types/node":"25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/caretize_0.4.0_1789323412261_0.4257114901340513","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@caretcms/caretize","version":"0.5.0","type":"module","description":"CLI that scans an Astro project and interactively adds data-caret attributes, turning a static site into a CaretCMS-editable one.","license":"MIT","keywords":["astro","cms","caret","codemod","cli","data-caret","inline-editing"],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/caretize#readme","repository":{"type":"git","url":"git+https://github.com/web-stacked/caretcms.git","directory":"packages/caretize"},"bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"caretize":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json && chmod +x dist/cli.js","typecheck":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"node scripts/check-version.mjs && npm run clean && npm run build"},"publishConfig":{"access":"public"},"dependencies":{"@astrojs/compiler":"4.0.0"},"devDependencies":{"@types/node":"25.6.0","typescript":"6.0.3"},"gitHead":"1191d9f19f96d3aec856412b1a0799ff3d9ff357","_id":"@caretcms/caretize@0.5.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-ELaq5Q/YVdTn/TqDzgpow4H9i0AoxC9gOxcpl6NbOJlGgoxe6ot6GsVadnxu356Y+AtQx1iP0IWVHlmID+s/ow==","shasum":"77c7be9e39049caea897ba135070e9dd9b786e79","tarball":"https://registry.npmjs.org/@caretcms/caretize/-/caretize-0.5.0.tgz","fileCount":127,"unpackedSize":463793,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDphp7dboQdkpOjE/UShcyMH4002ySIOhmK5boNh6YdRwIhAKdX2dxrsdO7zKZSn+A2Gji2mJmSmE0wTvRxCXbmgjvl"}]},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"directories":{},"maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/caretize_0.5.0_1789347437658_0.4907462242204019"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-12T02:12:15.685Z","modified":"2026-09-14T00:57:18.006Z","0.1.0":"2026-06-12T02:12:15.943Z","0.1.2":"2026-06-24T20:48:47.317Z","0.2.0":"2026-08-04T16:02:32.239Z","0.3.0":"2026-08-20T12:20:27.114Z","0.4.0":"2026-09-13T18:16:52.440Z","0.5.0":"2026-09-14T00:57:17.820Z"},"bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"license":"MIT","homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/caretize#readme","keywords":["astro","cms","caret","codemod","cli","data-caret","inline-editing"],"repository":{"type":"git","url":"git+https://github.com/web-stacked/caretcms.git","directory":"packages/caretize"},"description":"CLI that scans an Astro project and interactively adds data-caret attributes, turning a static site into a CaretCMS-editable one.","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"readme":"# @caretcms/caretize\n\nMake an existing Astro site editable with [CaretCMS](https://github.com/web-stacked/caretcms): `caretize` scans your `.astro` templates and inserts `data-caret` attributes (plus `editable()` wraps for data arrays), turning static markup into inline-editable content — no schema or config rewrite required.\n\nThe static HTML you already have *is* the seed content: CaretCMS renders the original text until an editor saves an override, so caretize only has to mark what's editable.\n\n```sh\n# in your Astro project root — set CaretCMS up first (deps + astro.config + .env)\nnpx @caretcms/caretize init\n\n# preview what would be tagged, write nothing\nnpx @caretcms/caretize --dry-run\nnpx @caretcms/caretize --diff\n\n# default: apply safe edits, show a diff you can --restore\nnpx @caretcms/caretize\n\n# approve each change before writing\nnpx @caretcms/caretize --review\n```\n\n`init` is optional but is the fastest path on a project that hasn't wired\nCaretCMS yet: it installs `@caretcms/core`, wires `caret()` into `astro.config`, and\nscaffolds a `.env` with a generated `CARET_SESSION_SECRET`.\n\n- **Static Astro projects** (default): `caret()` auto-selects static delivery — no SSR adapter.\n- **Server projects** (`output: \"server\"` already): keeps or adds adapter + `caret()`.\n\nAn existing config is only edited via verified pure insertions (shown as a diff you\nconfirm, backed up first); when its shape isn't safe to touch automatically it prints\na snippet to paste instead.\n\n## What it does\n\nBy default caretize **optimistically applies** high-confidence candidates, then shows a before→after diff. Use `--review` to approve each binding interactively:\n\n```\nsrc/pages/index.astro\n  <h1> \"Launch faster with Acme\"\n  + data-caret=\"pages::home::launch_faster_with_acme\"  (high)\n  [a]ccept [s]kip [e]dit [A]ll [S]kip-file [q]uit >\n```\n\n- **Tags** pure-text leaf elements (`h1`–`h6`, `p`, `li`, `a`, `button`, …) and `<img>` `src` — exactly the set the CaretCMS rewrite engine can render, nothing more.\n- **Names fields from content** (`\"Our Programs 🎨\"` → `our_programs`); prose tags keep role names. Names are deterministic and never collide with existing bindings, so re-runs are idempotent.\n- **Wraps data arrays** (`const faqs = [...]` → `editable(\"pages::home::faqs\", [...])`) so list content is editable too.\n- **Flags what it can't tag** (loops, expressions, mixed markup) and tells you which flag unlocks each.\n\n## Safety model\n\n- **Nothing unsafe is written.** Every output is verified in memory first: it must re-parse as valid Astro and be a pure insertion of the original (your bytes survive untouched, in order).\n- **All-or-nothing:** if any file fails verification, the run aborts having written nothing.\n- **Backups:** every written file is first copied to `.caret/.caretize-bak/`; `caretize --restore` reverts the most recent run. Git is the real undo — caretize warns when your tree is dirty.\n- Multibyte-safe: offsets are computed and spliced on UTF-8 buffers (emoji/em-dashes can't corrupt a tag).\n\n## Options\n\n```\ncaretize [path] [options]\ncaretize init                wire CaretCMS into the project, then tag\n\n  init                     set up CaretCMS first: install @caretcms/core, wire\n                           caret() into astro.config (auto static delivery by default;\n                           server projects get SSR adapter wiring), scaffold .env\n  path                     file or directory to scan (default: src/)\n  --review                 approve each change before writing; richer tiers still\n                           offered at the end\n  --dry-run                print the plan, write nothing\n  --diff                   preview exact before→after, write nothing\n  -y, --yes                auto-accept all suggestions at/above min-confidence\n  --min-confidence <lvl>   high (default) | medium | low\n  --no-images              skip <img> elements\n  --no-props               skip hoisting static component-prop strings to editable()\n  --bind-collections       bind getCollection().map() loops in place — a leaf\n                           element rendering {item.data.field} gets a per-row\n                           data-caret (direct-render only; props stay flagged)\n  --bind-routes            bind a dynamic collection-detail route ([slug].astro)\n                           to its current entry via getStaticPaths props\n  --rich                   also tag mixed-content blocks whose markup is\n                           sanitizer-safe inline formatting (data-caret-rich)\n  --rich-class             also tag rich blocks whose inline children carry a\n                           class — implies --rich; class round-trips once blessed\n                           via caret({ allowedClasses }) (hint names which)\n  --all                    every opt-in tier at once: --bind-collections,\n                           --bind-routes, --rich, --rich-class, AND\n                           --min-confidence low\n  --scope <collection::id> override the inferred scope (validated against the\n                           runtime grammar: ^[a-z][a-z0-9_-]*$ :: ^[a-z0-9][a-z0-9_-]*$)\n  --report <file>          write a JSON report\n  --restore                restore the most recent backup, then exit\n```\n\n## After caretize\n\n1. Run `npx @caretcms/caretize init` if CaretCMS is not wired yet.\n2. Run `npx @caretcms/caretize` to tag content.\n3. Run `npm run dev`.\n4. Sign in at `/admin` — with no `CARET_EDIT_PASSWORD` set, a temporary dev password is printed in your terminal.\n5. Click any tagged element to edit it in place; the Studio lives at `/admin/cms`.\n6. Use Preview / Publish / Discard in the editor toolbar for draft workflow.\n\nRequires [`@caretcms/core`](https://www.npmjs.com/package/@caretcms/core) wired into `astro.config.mjs` (caretize's preflight checks this and tells you if it isn't).\n\n**Static Astro sites:** use `caret()` (caretize `init` does this by default). CaretCMS auto-selects static delivery for static Astro output. Edit locally in dev; after Publish, rebuild so stored content is baked into static HTML. See [static delivery docs](https://github.com/web-stacked/caretcms/blob/main/docs/static-delivery.md).\n\n**Server sites:** use `output: \"server\"` with an SSR adapter and `caret()` for per-request rewriting in production.\n\nMIT © CaretCMS contributors\n","readmeFilename":"README.md"}