@se-studio/contentful-cms 3.15.1 → 3.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @se-studio/contentful-cms Changelog
2
2
 
3
+ ## 3.15.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 2a42881: publish plan --id no longer keeps ids from earlier plans on a long-lived host, and it publishes only the named entries. An open page or --from-session still publishes what that page needs. --with-parents opts into the old parent republish.
8
+
3
9
  ## 3.15.1
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/commands/release.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAGvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4XzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyB9D"}
1
+ {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/commands/release.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAGvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2YzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0B9D"}
@@ -10,6 +10,13 @@ import { buildRevalidateRequest } from '../publish/revalidate-request.js';
10
10
  import { getPlanStore } from '../publish/store.js';
11
11
  import { getRuntimeContext } from '../runtime/context.js';
12
12
  import { requireSession } from '../session/store.js';
13
+ function collectIds(value, previous = []) {
14
+ return [...previous, value];
15
+ }
16
+ /** Named --id values stay on those ids. An open page or --from-session still walks. */
17
+ function exactIds(opts) {
18
+ return (opts.id?.length ?? 0) > 0 && !opts.fromSession && !opts.withParents;
19
+ }
13
20
  function rootOpts(cmd) {
14
21
  let current = cmd;
15
22
  while (current?.parent)
@@ -82,7 +89,8 @@ async function makePublishPlan(opts, cmd) {
82
89
  const { cma, spaceId } = await openCma(rootOpts(cmd));
83
90
  const ids = await targetIds(cma, opts, cmd);
84
91
  const roots = extraRoots();
85
- const nodes = await cma.loadNodes(ids, roots);
92
+ const namedOnly = exactIds(opts);
93
+ const nodes = await cma.loadNodes(ids, roots, { walk: !namedOnly });
86
94
  const parentsByEntryId = new Map();
87
95
  for (const id of ids.slice(0, MAX_TARGETS)) {
88
96
  const node = nodes.get(id);
@@ -95,7 +103,9 @@ async function makePublishPlan(opts, cmd) {
95
103
  .map((id) => classifyContentType(nodes.get(id)?.contentType, roots));
96
104
  const upstreamRootIds = [];
97
105
  let upstreamTruncated = false;
98
- if (classes.length > 0 && classes.every((contentClass) => contentClass === 'embedded')) {
106
+ if (!namedOnly &&
107
+ classes.length > 0 &&
108
+ classes.every((contentClass) => contentClass === 'embedded')) {
99
109
  const seenUpstream = new Set();
100
110
  for (const id of ids.slice(0, MAX_TARGETS)) {
101
111
  const upstream = await cma.loadUpstream(id, roots);
@@ -120,6 +130,7 @@ async function makePublishPlan(opts, cmd) {
120
130
  targetIds: ids,
121
131
  parentsByEntryId,
122
132
  upstreamRootIds,
133
+ walkLinks: !namedOnly,
123
134
  truncated: ids.length > MAX_TARGETS,
124
135
  upstreamTruncated,
125
136
  });
@@ -265,19 +276,19 @@ async function applyPlan(planId, cmd) {
265
276
  results,
266
277
  }, null, isJsonMode() ? 2 : undefined));
267
278
  }
268
- function registerAction(program, name, description, make) {
279
+ function registerAction(program, name, description, make, planFlags) {
269
280
  const group = program.command(name).description(description);
270
- group
281
+ const plan = group
271
282
  .command('plan')
272
283
  .description('Read-only plan. Nothing is published.')
273
- .option('--id <entryId>', 'Entry or asset id. Repeat to add more.', (value, previous) => {
274
- previous.push(value);
275
- return previous;
276
- }, [])
284
+ .option('--id <entryId>', 'Entry or asset id. Repeat to add more.', collectIds, [])
277
285
  .option('--content-type <id>', 'All draft or changed entries of this content type, for example schema')
278
286
  .option('--since <iso>', 'With --content-type, only entries updated at or after this time')
279
- .option('--from-session', 'Use entries in the open cms-edit session')
280
- .action(async (opts, cmd) => {
287
+ .option('--from-session', 'Use entries in the open cms-edit session');
288
+ if (planFlags?.withParents) {
289
+ plan.option('--with-parents', 'Also publish linked drafts and parent pages. Default is the named ids only.');
290
+ }
291
+ plan.action(async (opts, cmd) => {
281
292
  try {
282
293
  printPlan(await make(opts, cmd));
283
294
  }
@@ -323,7 +334,7 @@ function registerAction(program, name, description, make) {
323
334
  });
324
335
  }
325
336
  export function registerReleaseCommands(program) {
326
- registerAction(program, 'publish', 'Plan and publish Contentful entries. Requires a Contentful role that can publish, then an explicit yes.', makePublishPlan);
337
+ registerAction(program, 'publish', 'Plan and publish Contentful entries. Requires a Contentful role that can publish, then an explicit yes.', makePublishPlan, { withParents: true });
327
338
  registerAction(program, 'unpublish', 'Plan and unpublish the named entries only. Does not unpublish children.', (opts, cmd) => makeEntryPlan('unpublish', opts, cmd));
328
339
  registerAction(program, 'archive', 'Plan and archive the named entries. Published entries are unpublished first.', (opts, cmd) => makeEntryPlan('archive', opts, cmd));
329
340
  registerAction(program, 'revalidate', 'Plan and refresh production cache for pages without publishing.', makeRevalidatePlan);
@@ -1 +1 @@
1
- {"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/commands/release.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAmB,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAA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AAY,EACZ,iEAAiE,EACjE,kBAAkB,CACnB,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /** SDK `application` value. Becomes `app cms-edit/<version>` in X-Contentful-User-Agent. */
2
- export declare const CMA_APPLICATION = "cms-edit/3.15.1";
2
+ export declare const CMA_APPLICATION = "cms-edit/3.15.2";
3
3
  export declare function cmaClientOptions(accessToken: string): {
4
4
  accessToken: string;
5
5
  application: string;
@@ -1 +1 @@
1
- {"version":3,"file":"help-topics.d.ts","sourceRoot":"","sources":["../../src/generated/help-topics.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAmmyG,CAAC;AAC5pyG,eAAO,MAAM,yBAAyB,YAAI,wBAAwB,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,EAAC,kBAAkB,EAAC,uBAAuB,EAAC,kBAAkB,EAAC,QAAQ,EAAC,gBAAgB,EAAC,mBAAmB,EAAC,kBAAkB,EAAC,uBAAuB,EAAC,aAAa,EAAC,iBAAiB,EAAC,OAAO,EAAC,YAAY,EAAC,QAAQ,EAAC,UAAU,EAAC,kBAAkB,EAAC,SAAS,EAAC,oBAAoB,EAAC,UAAU,CAAU,CAAC"}
1
+ {"version":3,"file":"help-topics.d.ts","sourceRoot":"","sources":["../../src/generated/help-topics.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAu7yG,CAAC;AACh/yG,eAAO,MAAM,yBAAyB,YAAI,wBAAwB,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,EAAC,kBAAkB,EAAC,uBAAuB,EAAC,kBAAkB,EAAC,QAAQ,EAAC,gBAAgB,EAAC,mBAAmB,EAAC,kBAAkB,EAAC,uBAAuB,EAAC,aAAa,EAAC,iBAAiB,EAAC,OAAO,EAAC,YAAY,EAAC,QAAQ,EAAC,UAAU,EAAC,kBAAkB,EAAC,SAAS,EAAC,oBAAoB,EAAC,UAAU,CAAU,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Generated by scripts/generate-embedded-assets.mjs — do not edit manually.
2
- export const EMBEDDED_HELP_TOPICS = { "article-tags-from-json": "# cms-edit article-tags-from-json — Batch Article Tagging\n\n`article-tags-from-json` sets the `tags` link array on one or more articles from a JSON file. Tag slugs are resolved via the local index — run `cms-edit index sync` first.\n\n```bash\ncms-edit index sync\ncms-edit article-tags-from-json --json '{...}' --dry-run\ncms-edit article-tags-from-json --json '{...}'\n```\n\nAll writes create **drafts** only.\n\n**Batch behaviour:** Processes every article in the file. Failures on one article do not stop the rest — the command exits non-zero if any item failed and prints which slugs succeeded vs failed.\n\n---\n\n## JSON schema\n\n```jsonc\n{\n \"articles\": [\n {\n \"articleSlug\": \"resources/blog/my-post\",\n \"tagSlugs\": [\"asco-2025\", \"oncology\"],\n \"append\": false\n },\n {\n \"articleSlug\": \"resources/blog/another-post\",\n \"tagSlugs\": [\"press-release\"],\n \"append\": true\n }\n ]\n}\n```\n\n| Key | Required | Description |\n|---|---|---|\n| `articleSlug` | Yes | Article slug (with or without leading `/`) |\n| `tagSlugs` | Yes | Tag slugs to apply |\n| `append` | No | When `true`, append to existing tags (deduped). Default: replace |\n\n---\n\n## Session alternative (single article)\n\n```bash\ncms-edit open --article-slug resources/blog/my-post\ncms-edit set @p0 tags <id1>,<id2> --links\ncms-edit diff && cms-edit save\n```\n\nResolve tag IDs: `cms-edit resolve --tag-slug <slug> --json`\n\n---\n\n## Related commands\n\n| Command | Purpose |\n|---|---|\n| `cms-edit create tag` | Create a new tag |\n| `cms-edit create taxonomy-from-json` | Bootstrap tagTypes and tags |\n| `cms-edit help taxonomy-from-json` | Taxonomy batch import |", "asset-review": "# Asset review\n\n`cms-edit asset review` audits visual assets (images, videos, Lottie JSON) from the local index.\n\n## Sync first\n\n```bash\ncms-edit index sync\n```\n\nDefault: **Preview API** (includes drafts). Use `--published` on sync/review for delivery-only content.\n\n## Run\n\n```bash\ncms-edit asset review\ncms-edit --json-output asset review --space brightline > media-review.json\ncms-edit --json-output asset review --include-usage --usage-limit 5\ncms-edit --json-output asset review --include-usage --include-passing --usage-limit 0 > image-inventory.json\n```\n\n`--include-usage` adds slug-bearing page/article ancestry per asset (slower; uses CMA walk-up). By default only the first **50** assets in the report get usages (`--usage-limit 50`). Raise the limit for larger batches, or pass `--usage-limit 0` for unlimited (fine locally; hosted MCP may timeout on large spaces). Use with `--include-passing` for a full image inventory (replaces the old `audit images` command).\n\n## Checks\n\n- Filename quality (stock IDs, camera defaults, generic names)\n- Alt text (`description` on asset)\n- Dimensions (max width, default 2000px; SVG/Lottie skipped)\n- File size (defaults: 800 KB images, 8 MB video, 400 KB Lottie)\n- Animated GIF (`image/gif`)\n- No media wrapper (warning — may still be used in rich text)\n\n## Options\n\n| Flag | Default |\n|------|---------|\n| `--max-width` | 2000 |\n| `--max-image-kb` | 800 |\n| `--max-video-mb` | 8 |\n| `--max-lottie-kb` | 400 |\n| `--include-passing` | off (failures only) |\n| `--include-usage` | off (no usage ancestry in JSON) |\n| `--usage-limit` | 50 when `--include-usage` is set (`0` = unlimited) |\n| `--published` | off (Preview index) |\n\nExit code **1** when any asset has failing issues.\n\n## Spreadsheet\n\nUse the **contentful-cms-media-review** skill with `--json` output to build an Excel workbook.\n\n## Fix alt text\n\n```bash\ncms-edit asset set-description <asset-id> \"Descriptive alt text\"\n```", "batch-run": "# cms-edit batch run — JSON Operation Scripts\n\n`batch run` executes a sequence of `cms-edit` operations from a JSON file. It is best suited for **patching fields on existing entries** — for creating complete new pages, use `create from-json` instead.\n\n```bash\ncms-edit batch run --json '[...]'\ncms-edit batch run --json '[...]' --dry-run # validate without saving\n```\n\n---\n\n## Batch File Format\n\nA batch file is a JSON array of operation objects:\n\n```json\n[\n { \"cmd\": \"open\", \"args\": [\"/solutions\"] },\n { \"cmd\": \"set\", \"args\": [\"@c1\", \"heading\", \"New Heading\"] },\n { \"cmd\": \"rtf\", \"args\": [\"@c2\", \"body\", \"Updated body.\\n\\nSecond paragraph.\"] },\n { \"cmd\": \"save\" }\n]\n```\n\nEach operation has:\n\n| Field | Type | Description |\n|---|---|---|\n| `cmd` | string | The operation to execute (see Supported Commands) |\n| `args` | string[] | Positional arguments (same as CLI args) |\n| `opts` | object | Named options (same as CLI flags, without `--`) |\n| `onError` | `\"stop\"` \\| `\"continue\"` | What to do if this step fails. Default: `\"stop\"` |\n| `as` | string | Variable name to bind the ref assigned by an `add` op (e.g. `\"$item\"`) |\n\n---\n\n## Supported Commands\n\n### `open`\nLoad a page or article by slug.\n```json\n{ \"cmd\": \"open\", \"args\": [\"/solutions\"] }\n```\n\n### `set`\nSet a scalar field on an entry.\n```json\n{ \"cmd\": \"set\", \"args\": [\"@c1\", \"heading\", \"New Heading\"] }\n{ \"cmd\": \"set\", \"args\": [\"@c2\", \"backgroundColour\", \"Navy\"] }\n{ \"cmd\": \"set\", \"args\": [\"@c3\", \"heading\", null] }\n```\n\n### `rtf`\nSet a rich text field from a markdown string.\n```json\n{ \"cmd\": \"rtf\", \"args\": [\"@c2\", \"body\", \"## Heading\\n\\nParagraph text.\"] }\n```\n\n### `rtf-replace`\nFind and replace text within an existing rich text field.\n```json\n{\n \"cmd\": \"rtf-replace\",\n \"args\": [\"@c2\", \"body\"],\n \"opts\": {\n \"find\": \"old phrase\",\n \"replacePlain\": \"new phrase\",\n \"mode\": \"all\"\n }\n}\n```\nOptions: `find` (required), `replacePlain`, `replaceMarkdown`, `mode` (`\"all\"` or `\"exactlyOne\"`), `ignoreMarks`, `tableCol`, `tableRow`, `section`.\n\n### `add`\nCreate a new entry and link it into the tree.\n```json\n{ \"cmd\": \"add\", \"args\": [\"HeroSimple\", \"component\"] }\n{ \"cmd\": \"add\", \"args\": [\"Generic\", \"component\"], \"opts\": { \"parent\": \"@c3\" } }\n{ \"cmd\": \"add\", \"args\": [\"Generic\", \"component\"], \"opts\": { \"after\": \"@c5\" } }\n{ \"cmd\": \"add\", \"args\": [\"Generic\", \"component\"], \"opts\": { \"target\": \"topContent\" } }\n```\nOptions: `parent` (ref of a collection to add inside), `after` (ref to insert after), `target` (field name, default `\"content\"`), `existingId` (link an existing entry instead of creating).\n\n### `links-add`\nCreate a new CTA link and attach it to an entry's `links` field.\n```json\n{ \"cmd\": \"links-add\", \"args\": [\"@c1\"], \"opts\": { \"type\": \"external\", \"label\": \"Learn More\", \"href\": \"https://example.com\", \"variant\": \"link\" } }\n{ \"cmd\": \"links-add\", \"args\": [\"@c1\"], \"opts\": { \"type\": \"internal\", \"label\": \"Contact\", \"slug\": \"/contact\" } }\n```\nOptions: `type`, `label`, `href`, `slug`, `id`, `assetId`, `variant`.\n\n### `save`\nWrite all modified entries to Contentful as drafts.\n```json\n{ \"cmd\": \"save\" }\n```\n\n---\n\n## Variable Binding — Safe `add` + `set` Patterns\n\n**The problem:** After an `add parent @cN` operation, all entries that come after `@cN` in the depth-first tree are renumbered. Any `set` using a hardcoded `@cM` ref may then target the wrong entry, and the batch reports `✓` — a silent false positive.\n\n**The solution:** Use `\"as\": \"$varname\"` on the `add` op to capture the assigned ref, then use `\"$varname\"` in subsequent `set`/`rtf` args:\n\n```json\n[\n { \"cmd\": \"open\", \"args\": [\"/solutions/hepatology\"] },\n {\n \"cmd\": \"add\",\n \"args\": [\"Generic\", \"component\"],\n \"opts\": { \"parent\": \"@c3\" },\n \"as\": \"$item1\"\n },\n { \"cmd\": \"set\", \"args\": [\"$item1\", \"heading\", \"2017 — Cohort Launch\"] },\n { \"cmd\": \"rtf\", \"args\": [\"$item1\", \"body\", \"The cohort was established.\\n\\nInitial enrolment began.\"] },\n {\n \"cmd\": \"add\",\n \"args\": [\"Generic\", \"component\"],\n \"opts\": { \"parent\": \"@c3\" },\n \"as\": \"$item2\"\n },\n { \"cmd\": \"set\", \"args\": [\"$item2\", \"heading\", \"2019 — First Publication\"] },\n { \"cmd\": \"save\" }\n]\n```\n\n`$item1` and `$item2` always refer to the entries that were just created, regardless of how subsequent adds shift ref numbers.\n\n---\n\n## Ref Renumbering — What Happens Under the Hood\n\nAfter any `add parent @cN`, refs are reassigned in depth-first traversal order from the root. Items that came *after* `@cN` in the tree get bumped forward.\n\n**Example:** Page with 10 entries (`@c0`–`@c9`). Timeline collection is `@c8`, Disease Areas is `@c9`.\n\n| After add | New item ref | Disease Areas ref |\n|---|---|---|\n| Initial | — | @c9 |\n| Add 1 to @c8 | @c9 | @c10 |\n| Add 2 to @c8 | @c10 | @c11 |\n| Add 3 to @c8 | @c11 | @c12 |\n\nIf you write `set @c10 heading \"...\"` after Add 1, you are setting Disease Areas — not the new item. The batch reports `✓` because the field was set successfully, just on the wrong entry.\n\n**The tool warns when this happens:**\n```\n ✓ [3] add — Created component \"Generic\" as @c9 (ID: abc123)\n ⚠ Refs renumbered after add-to-parent. Use \"as\": \"$varname\" on the add op and \"$varname\" in subsequent args to avoid ref drift.\n```\n\n---\n\n## Safe Patterns\n\n### Pattern A — Variable binding (recommended)\nUse `\"as\": \"$name\"` and `\"$name\"` in args. Refs always point to the right entry.\n\n### Pattern B — All adds first, then sets\nDo all `add` operations in one batch. Re-snapshot to see final refs. Write a second batch with `set`/`rtf` on the stable refs.\n\n```bash\n# Batch 1: add all items\ncms-edit batch run --json '[...]'\n\n# Inspect final refs\ncms-edit snapshot\n\n# Batch 2: set fields using the stable refs from snapshot\ncms-edit batch run --json '[...]'\n```\n\n### Pattern C — Append to end only\nIf new items go at the end of the tree (after all existing entries), no existing refs are displaced. Use `after` to append at the tail.\n\n### Pattern D — Use `create from-json` for new pages\nFor building complete page trees from scratch, `create from-json` is safer than a `run` batch — it manages internal refs automatically and validates slugs before writing.\n\n---\n\n## Complete Example — Patching Fields on an Existing Page\n\n```json\n[\n { \"cmd\": \"open\", \"args\": [\"/solutions\"] },\n { \"cmd\": \"set\", \"args\": [\"@c1\", \"heading\", \"Evidence-Driven Solutions\"] },\n { \"cmd\": \"set\", \"args\": [\"@c1\", \"preHeading\", \"What We Do\"] },\n {\n \"cmd\": \"rtf\",\n \"args\": [\n \"@c2\",\n \"body\",\n \"We partner with life sciences companies.\\n\\nOur platform integrates real-world data across disease areas.\"\n ]\n },\n { \"cmd\": \"save\" }\n]\n```\n\nRun:\n```bash\ncms-edit batch run --json '[...]' --dry-run # validate first\ncms-edit batch run --json '[...]' # apply\ncms-edit open --page-slug /solutions # inspect result\n```\n\n---\n\n## Error Handling\n\nBy default, execution stops on the first error. Use `\"onError\": \"continue\"` to keep running:\n\n```json\n[\n { \"cmd\": \"open\", \"args\": [\"/solutions\"] },\n { \"cmd\": \"set\", \"args\": [\"@c99\", \"heading\", \"Test\"], \"onError\": \"continue\" },\n { \"cmd\": \"save\" }\n]\n```\n\nThe final exit code is non-zero if any step failed, even with `\"continue\"`.\n", "batch": "# Batch edit by entry ID\n\nEdit multiple Contentful entries by ID with scalar field updates. Useful for link variant sweeps, media flags (`autoplay`/`loop`), navigation tweaks, and other standalone updates.\n\n## Sessions\n\n| Context | What happens |\n|---------|----------------|\n| Default CLI (`--session` omitted) | Uses session name **`batch`** (does not touch a separate page session) |\n| Page session already open (e.g. MCP `_mcp`) | `batch set` **stages into that page session** — same `diff` / `save` as article work. Do **not** re-`open`. Do **not** `batch discard` (use `cms-edit discard` only if abandoning everything). |\n| Explicit isolation | `cms-edit --session link-sweep batch set …` |\n\nYou can also stay on the page session without `batch`:\n\n```bash\ncms-edit set <entryId>:autoplay=true <entryId>:loop=true\n# or\ncms-edit set <entryId> autoplay true\n```\n\n## Workflow\n\n```bash\n# Queue scalar field updates (one or more entryId:field=value tokens)\ncms-edit batch set 3my7n2M84OrhOaaSLHVHvo:variant=link 7MjsLmOq52CR9C5xrYlcub:variant=button\n\n# Review pending changes\ncms-edit batch diff\n\n# Write all changes as drafts (single save)\ncms-edit batch save\n\n# Or discard without saving (pure batch sessions only)\ncms-edit batch discard\n```\n\nMid-page (MCP / open article session):\n\n```bash\ncms-edit batch set 5uMh54rIsJRFRQSXDuJiG:autoplay=true\ncms-edit diff\ncms-edit save\n```\n\n## Token format\n\n```\n<entryId>:<fieldId>=<value>\n```\n\n- **entryId** — Contentful entry ID (alphanumeric, optional `_`/`-`, length 1–64; **not** fixed at 22 characters)\n- **fieldId** — field name on that entry's content type\n- **value** — literal token (no shell quotes needed for simple strings). Coercion follows the field type from Contentful:\n - **Symbol** / **Text** — always stored as strings (e.g. `order=42` stays `\"42\"`)\n - **Integer** / **Number** — parsed as numbers\n - **Boolean** — `true` / `false`\n - **null** — literal `null`\n - Fields with enum validations (e.g. `variant`) must match allowed values\n\nExamples:\n\n```bash\ncms-edit batch set abcdefghijklmnopqrstuv:variant=link\ncms-edit batch set 5uMh54rIsJRFRQSXDuJiG:autoplay=true\ncms-edit batch set abcdefghijklmnopqrstuv:cmsLabel=Footer CTA\n```\n\n## Link variant sweep\n\nWhen you already know link entry IDs (from `cms-edit read @cN links` or `cms-edit links list @cN`):\n\n```bash\ncms-edit batch set \\\n idOne123456789012345678:variant=link \\\n idTwo123456789012345678:variant=button\ncms-edit batch diff\ncms-edit batch save\n```\n\nWhen a page is already open, prefer `cms-edit links set @cN <index> variant link` instead.\n\n## Content type schema cache\n\nField types and enum validations are loaded from the Contentful Management API. Results are cached:\n\n- In the **session file** (`contentTypes` on the session) so `batch set` → save reuse schema without extra API calls\n- On disk at `~/.contentful-cms/content-types/<spaceId>/<environment>/` (24-hour TTL)\n\n## v1 limits\n\n- **Scalar fields only** — no rich text, entry links, asset links, or link arrays\n- **Draft-only** — same as `cms-edit save`; never publishes\n- **No cross-entry link arrays** — use page session + `cms-edit set --links` for parent arrays\n- **Partial save on failure** — if one entry fails during `batch save`, earlier entries may already be saved; the CLI lists failures and reminds you to run diff for remaining changes\n", "bulk-rtf-replace": "# cms-edit bulk-rtf-replace — Sitewide Rich Text Find-Replace\n\n`bulk-rtf-replace` finds plain text in Rich Text fields across page and article entry trees (including linked components and collections) and replaces it in one pass.\n\n```bash\ncms-edit bulk-rtf-replace --find \"Old Company Name\" --replace-plain \"New Company Name\" --dry-run\ncms-edit bulk-rtf-replace --find \"Old Company Name\" --replace-plain \"New Company Name\"\n```\n\n**Always dry-run first** and confirm the match count with the user before saving.\n\nAll saves create **drafts** only.\n\n---\n\n## How it works\n\n1. Fetches root entries (`page` and `article` by default) from Contentful\n2. For each root, loads the full linked entry tree\n3. Scans every Rich Text field on every entry in the tree\n4. Applies `replace-plain` (same engine as `cms-edit rtf replace`)\n5. Saves each modified entry as a draft\n\n---\n\n## Options\n\n| Option | Description |\n|---|---|\n| `--find <text>` | Plain text to find (required) |\n| `--replace-plain <text>` | Plain text replacement (required) |\n| `--include <types>` | Root content types (default: `page,article`) |\n| `--prefix <slug>` | Only roots whose slug starts with this prefix (e.g. `/blog`) |\n| `--limit <n>` | Max root entries total across all `--include` types (default: 500) |\n| `--dry-run` | Report matches without saving |\n\n---\n\n## Scoped replace\n\n```bash\n# Blog articles only\ncms-edit bulk-rtf-replace \\\n --find \"2024\" \\\n --replace-plain \"2025\" \\\n --include article \\\n --prefix resources/blog \\\n --dry-run\n```\n\n---\n\n## JSON output\n\n```bash\nCMS_EDIT_JSON=1 cms-edit bulk-rtf-replace --find \"foo\" --replace-plain \"bar\" --dry-run\n```\n\nDry-run response includes `entriesWithMatches`, `matches`, and per-entry `changes`.\n\n---\n\n## When to use sessions instead\n\nFor a **small** number of entries, or when you need `diff` review per page:\n\n```bash\ncms-edit open --page-slug /about\ncms-edit rtf replace @c1 body --find \"…\" --replace-plain \"…\"\ncms-edit diff && cms-edit save\n```\n\nFor **scalar** fields on many entries, prefer `cms-edit batch set`.\n\n---\n\n## Related resources\n\n- Editor task: `task-bulk-find-replace` (confirmation gates)\n- `cms-edit search <text>` — discover affected entries before bulk replace", "create-editor-entries": "# cms-edit create — banners, variants, tests, custom types\n\nThese commands create **drafts**. Nothing is published.\n\n| Command | Opens a session | Idempotent key |\n|---|---|---|\n| `create banner` | No | `--if-not-exists` matches `cmsLabel` |\n| `create page-test` | No | `--if-not-exists` matches `cmsLabel` |\n| `create page-variant` | Yes | `--if-not-exists` matches slug |\n| `create custom-type` | Yes | `--if-not-exists` matches slug |\n\nEnums (`theme`, `placement`, `dismissType`) are read from the live content type. `placement` is set only when that field exists.\n\n## Banner\n\nBanners are site-wide. The site loads every `banner` entry. Targeting is `showOn`, `hideOn`, and URL patterns.\n\n```bash\ncms-edit create banner --cms-label \"Spring promo\" --message \"Free delivery this week\" \\\n --theme Information --cta-text \"Shop\" --cta-external https://example.com/shop\n```\n\n## Page variant and alternate content\n\nA variant points at an original page. Content swaps are `alternatePageContent` entries on `alternativeContents`, not a second page body. Omit `--replacement-id` to remove the source block.\n\n```bash\ncms-edit create page-variant --cms-label \"Home B\" --slug home-b --original-page / \ncms-edit add \"Hero swap\" --content-type alternatePageContent --source-id <componentId> --replacement-id <otherId>\ncms-edit save\n```\n\nOn a page variant, `add` accepts only `alternatePageContent`. A component or collection belongs on the original page.\n\n## Page test\n\n```bash\ncms-edit create page-test --cms-label \"Home hero test\" --control <pageId> \\\n --variant <pageVariantId> --enabled\n```\n\n## Custom type\n\nRequired featured image. The new entry opens as the session root so `add` can fill `topContent` or `indexPageTopContent`.\n\n```bash\ncms-edit create custom-type --cms-label \"People\" --name \"People\" --slug people \\\n --index-page-name \"Team\" --index-page-title \"Team\" --index-page-description \"The team\" \\\n --featured-image <assetId>\n```\n\n## Open existing entries\n\n```bash\ncms-edit open --banner-label \"Spring promo\"\ncms-edit open --page-test-label \"Home hero test\"\ncms-edit open --custom-type-slug people\ncms-edit open --page-variant-slug home-b\n```\n", "create-from-json": "# cms-edit create from-json — Complete Guide\n\n`create from-json` creates a complete new page or article — including all components, collections, and CTA links — from `--json`, `--json-base64`, or **`--staged`** (hosted). It is the recommended way to create new pages on hosted MCP.\n\n**Agents:** do not use a local `cms-edit` binary, `--file`, or stdin. **Fields over ~8k must not go through `--json` / `--json-base64` / `--content`.** Hosted MCP rejects those over 8192 bytes. Write the JSON on disk → `cms_edit_request_staged_upload` with `kind=json` → curl → `create from-json --staged <id> --dry-run --strict`. Dry-run peeks without consuming the slot. If the wrapper schema has no `kind`, use `cms_edit` `[\"staged-upload\", \"request\", \"--kind\", \"json\", \"--file-name\", \"...\", \"--mime\", \"application/json\"]`, then curl, then `create from-json --staged`.\n\nAlso: `export from-json` (open session → same JSON with `existingId` / `version`) and `apply from-json` (`--staged` supported).\n\n```\ncms_edit [\"help\", \"create-from-json\"]\ncms_edit_help { \"topic\": \"create-from-json\" }\ncms_edit [\"create\", \"from-json\", \"--json\", \"{...}\", \"--dry-run\", \"--strict\"]\n# or, when the payload is over 8k:\ncms_edit [\"create\", \"from-json\", \"--staged\", \"<id>\", \"--dry-run\", \"--strict\"]\n```\n\n## Validation traps (fail before CMA)\n\n- Nested tree key is **`components`**, not `content` (`content` is a page field — empty page).\n- Discriminator is **`type`**, not `componentType` / `collectionType`.\n- **`components` must be non-empty**.\n- Unknown nested keys fail (`html` vs `htmlContent` — run `schema htmlComponent` for this space). Put vendor libraries on `fields.externalScripts` (string array), not inside HTML.\n- CTA text is **`label`**, not `linkText`.\n- Quoted `set @c1:field=\"value\"` is rejected (quotes would be stored). Use `[\"set\", \"@c1\", \"field\", \"value\"]`.\n\nDry-run does not call CMA (slug checks use the local CDA index).\n\n---\n\n```bash\ncms-edit create from-json --json '{...}'\ncms-edit create from-json --json '{...}' --dry-run # validate without writing\ncms-edit create from-json --json '{...}' --strict # fail on unknown JSON keys\ncms-edit create from-json --json '{...}' --if-not-exists # return existing ID when slug exists\n```\n\nRun `cms-edit index sync` before using any `*AssetFilename` shorthand (index-backed exact `file.fileName` lookup).\n\n---\n\n## Full JSON Schema\n\n```jsonc\n{\n // \"page\" (default) or \"article\". Auto-detected as \"article\" if articleTypeId is present.\n \"type\": \"page\",\n\n // Required. The URL slug. A single leading slash is stripped silently (`/home` → `home`).\n // Trailing or extra slashes still warn. Store CMS slugs without a leading slash.\n \"slug\": \"/solutions/hepatology\",\n\n // Required. The page title (also used as cmsLabel if cmsLabel is omitted).\n \"title\": \"Hepatology Solutions\",\n\n // Optional. SEO meta description.\n \"description\": \"Evidence generation for hepatology research.\",\n\n // Optional. Override the Contentful entry label shown in the entry list.\n \"cmsLabel\": \"Hepatology Solutions Page\",\n\n // Page-only: link to an existing template entry by ID.\n \"templateId\": \"4xKpzQ2abc123\",\n\n // Page/article: featured image — asset ID (either key; warn if both differ).\n \"featuredImage\": \"7yBnmR9xyz456\",\n // \"featuredImageId\": \"7yBnmR9xyz456\", // alias\n\n // Exact Contentful asset fileName (requires cms-edit index sync).\n // \"featuredImageAssetFilename\": \"hero.jpg\",\n\n // Article-only: download asset (ID or fileName shorthands).\n // \"download\": \"assetId\",\n // \"downloadAssetFilename\": \"report.pdf\",\n\n // Page-only: whether the page is indexed by search engines (default: not set = inherit).\n \"indexed\": true,\n\n // Page-only: whether the page is hidden from the sitemap (default: false).\n \"hidden\": false,\n\n // Article-only (required for articles): one of articleTypeId, articleTypeSlug, or articleTypeName.\n // Prefer slug for marketers: cms-edit list --type articleType\n \"articleTypeSlug\": \"resources/blog\",\n\n // Article-only: publication date in YYYY-MM-DD format. Defaults to today.\n \"date\": \"2025-01-15\",\n\n // Array of components to create and link to the page's content field.\n \"components\": [\n // ... see Component Schema below\n ]\n}\n```\n\n---\n\n## Explicit link shorthands (no guessing)\n\nUse **named keys** only — the CLI does not infer whether a string is an asset ID, Media entry ID, or file name.\n\n### Page / article (top-level)\n\n| JSON key | Sets field | Value |\n|----------|------------|-------|\n| `featuredImage` or `featuredImageId` | `featuredImage` | Asset ID |\n| `featuredImageAssetFilename` | `featuredImage` | Exact asset `fileName` (index) |\n| `download` or `downloadId` | `download` | Asset ID (article) |\n| `downloadAssetFilename` | `download` | Exact asset `fileName` (article) |\n| `icon` / `iconId` / `iconAssetFilename` | `icon` | Asset (article, when field exists) |\n| `templateId` | `template` | Entry ID |\n| `articleTypeId` | `articleType` | Entry ID (articles) |\n| `topContentIds`, `visualsIds`, … | See `cms-edit help fields-taxonomy` | Entry ID arrays |\n| `tagSlugs` | `tags` | Tag slug strings (articles). `tagsIds` is rejected. |\n\n### Component `fields`\n\n| JSON key | Sets field | Value |\n|----------|------------|-------|\n| `visualId` | `visual` | Media / video entry ID |\n| `visual` (string) | `visual` | Entry ID only (same as `visualId`) |\n| `visualAssetId` | `visual` | Asset ID when the field is an Asset link |\n| `visualAssetFilename` | `visual` | Exact asset `fileName` → reuse or create Media |\n| `visualMediaName` | (with `visualAssetFilename`) | Optional Media entry name when creating (default: **asset title**) |\n| `visualMedia` | `visual` | `{ \"assetId\", \"name\", \"position?\", \"width?\" }` — always creates Media; `name` should match asset title unless you need a distinct wrapper label |\n| `mobileVisualId`, `mobileVisualAssetFilename`, … | `mobileVisual` | Same pattern |\n\nUnknown top-level or `fields` keys that are not on the content type: **warning** by default; use `--strict` or `--dry-run` to **fail** instead.\n\n### Comparison with `taxonomy-from-json`\n\n| | `taxonomy-from-json` | `create from-json` |\n|--|----------------------|-------------------|\n| Unknown fields on dry-run | Error (strict) | Error (strict) |\n| Unknown fields on create | Warn | Warn |\n| `--strict` on create | — | Supported |\n\n---\n\n## Component Schema\n\nEach item in `components` (and `items` for collections) follows this shape:\n\n```jsonc\n{\n // --- Option A: Create a new entry ---\n\n // Contentful content type ID. One of: component, collection, externalComponent, person\n // Default: \"component\"\n \"contentType\": \"component\",\n\n // The type discriminator value (e.g. HeroSimple, TextBlock, CardGrid).\n // Run `cms-edit schema types <content-type>` to see valid values.\n \"type\": \"HeroSimple\",\n\n // Optional. Human-readable label in Contentful's entry list. Defaults to `type`.\n \"cmsLabel\": \"Homepage Hero\",\n\n // Which field on the parent to attach to. Default: \"content\" (page) or \"contents\" (collection).\n // Use \"topContent\" or \"bottomContent\" for template slots.\n \"target\": \"content\",\n\n // Scalar and rich text fields to set. See \"Field Values\" section below.\n \"fields\": {\n \"heading\": \"Welcome to Hepatology\",\n \"preHeading\": \"Our Speciality\",\n \"body\": \"We have been building cohorts...\\n\\nWith over a decade of experience.\",\n \"backgroundColour\": \"Navy\",\n \"textColour\": \"White\"\n },\n\n // CTA link entries to create and attach to the component's `links` field.\n \"links\": [\n // ... see Link Schema below\n ],\n\n // Child items for collection components. Same schema as a component.\n \"items\": [\n // ... nested components\n ],\n\n // --- Option B: Link an existing entry (no fields set) ---\n // \"existingId\": \"4xKpzQ2abc123\",\n // \"comment\": \"Shared footer CTA — managed separately\"\n}\n```\n\n---\n\n## Field Values\n\nFields in the `fields` object accept several value formats.\n\n### Strings — Automatic RichText Conversion\n\n**The tool uses the Contentful content model to determine if a field is RichText.** For confirmed RichText fields, any string is always converted to a RichText document — no special markers needed.\n\nFor fields where the schema is unavailable, the tool falls back to a heuristic. To trigger Markdown conversion in the heuristic path, use one of these markers:\n\n| Marker | Example | Produces |\n|---|---|---|\n| `\\n\\n` (double newline) | `\"First.\\n\\nSecond.\"` | Two paragraphs |\n| `- ` (list item) | `\"- Item one\\n- Item two\"` | Unordered list |\n| `# ` (heading) | `\"# Heading\\n\\nBody.\"` | Heading + paragraph |\n| `**text**` | `\"**bold** text\"` | Bold inline |\n| `> ` (blockquote) | `\"> A quote\"` | Blockquote |\n\n**For single-sentence body fields:** Always include `\\n\\n` at the end to ensure conversion:\n```json\n\"body\": \"Pedestal Health has been building cohorts in this space for over a decade.\\n\\n\"\n```\n\n### Explicit Format Object\n\nUse an explicit format wrapper to be unambiguous:\n```jsonc\n\"body\": { \"value\": \"Plain text paragraph.\", \"format\": \"text\" }\n\"body\": { \"value\": \"## Heading\\n\\nContent.\", \"format\": \"markdown\" }\n\"body\": { \"value\": \"<p>HTML content</p>\", \"format\": \"html\" }\n```\n\nAccepted formats: `\"text\"`, `\"markdown\"`, `\"html\"`, `\"json\"` (raw Contentful RichText document).\n\n### Other Value Types\n\n```jsonc\n\"indexed\": true, // boolean\n\"heading\": null, // null clears the field\n\"someNumber\": 42 // number\n```\n\n---\n\n## Link Schema\n\n```jsonc\n{\n // Link type. One of: \"external\" (default), \"internal\", \"download\", \"blank\"\n \"type\": \"internal\",\n\n // Display label for the CTA button.\n \"label\": \"Learn More\",\n\n // For \"internal\": resolve by slug (preferred) or by entry ID.\n \"slug\": \"/solutions/hepatology\",\n // \"id\": \"4xKpzQ2abc123\", // alternative to slug\n\n // For \"external\": the URL.\n // \"href\": \"https://example.com\",\n\n // For \"download\": the asset ID.\n // \"assetId\": \"7yBnmR9xyz456\",\n\n // Link to an existing link entry (skips creation).\n // \"existingId\": \"2aZxQw1def789\"\n}\n```\n\n---\n\n## Critical Rules\n\n### Rule 1: Create Leaf Pages First\n\nInternal links resolve at creation time. If page A links to page B and B does not yet exist in Contentful, the creation fails and **page A is left partially created** (the page entry exists but with no content).\n\n**Always create leaf pages (the targets of links) before the pages that link to them.**\n\n```bash\n# Wrong order: /solutions links to /solutions/hepatology which doesn't exist yet\ncms-edit create from-json --json '{...}' # FAILS mid-run\n\n# Correct order: leaf page first, parent page second\ncms-edit create from-json --json '{...}' # succeeds\ncms-edit create from-json --json '{...}' # succeeds — slug resolves\n```\n\nUse `--dry-run` to catch missing slugs before writing anything (see below).\n\n### Rule 2: Always Run --dry-run First\n\n`--dry-run` validates the plan without creating anything in Contentful. It prints the component tree and checks that all internal link slugs exist:\n\n```bash\ncms-edit create from-json --json '{...}' --dry-run\n```\n\nExample output when a slug is missing:\n```\n[dry-run] Would create page:\n slug: /solutions\n title: Solutions\n ...\n\n✗ Internal link slug not found in Contentful: \"/solutions/hepatology\"\n✗ Internal link slug not found in Contentful: \"/solutions/dermatology\"\n Create the target pages first, then re-run. See: cms-edit help create-from-json\n```\n\n### Rule 3: Use body Strings Consistently\n\nEven if a body field is short, include `\\n\\n` at the end to ensure the string is treated as a paragraph of rich text:\n\n```jsonc\n// Good — explicit double newline ensures conversion\n\"body\": \"A single-sentence description.\\n\\n\"\n\n// Also good — multi-paragraph body\n\"body\": \"First paragraph.\\n\\nSecond paragraph.\"\n\n// Risky for heuristic-path fields — no markers, may pass as plain string\n\"body\": \"A single-sentence description.\"\n```\n\n---\n\n## Recovery: Partial Page Created\n\nIf a run fails mid-way (e.g. a missing internal link slug), the page entry is already in Contentful but with no content. The error message shows the page ID:\n\n```\n✗ Component creation failed: No entry found with slug \"/solutions/hepatology\".\n✗ The page entry was already created in Contentful (partial state) — ID: 4xKpzQ2abc123, slug: /solutions\n Inspect with: cms-edit open --page-slug /solutions\n Remove with: delete the entry in Contentful at https://app.contentful.com/spaces/...\n Tip: run with --dry-run first to validate all internal link slugs exist.\n```\n\nOptions:\n1. Delete the partial entry in Contentful, fix the dependency order, and re-run.\n2. Repair the partial entry using `cms-edit batch run` with targeted `set`/`rtf` operations.\n3. Use `cms-edit open --page-slug /solutions` + individual `add` operations to rebuild the content.\n\n---\n\n## Complete Example\n\nA two-component page:\n\n```json\n{\n \"type\": \"page\",\n \"slug\": \"/solutions/hepatology\",\n \"title\": \"Hepatology Solutions\",\n \"description\": \"Evidence generation for hepatology research.\",\n \"components\": [\n {\n \"contentType\": \"component\",\n \"type\": \"HeroSimple\",\n \"cmsLabel\": \"Hepatology Hero\",\n \"fields\": {\n \"heading\": \"Hepatology Evidence Generation\",\n \"preHeading\": \"Our Speciality\",\n \"body\": \"We have been building cohorts in hepatology for over a decade.\\n\\nOur work spans NASH, HCC, and liver transplantation.\",\n \"backgroundColour\": \"Navy\",\n \"textColour\": \"White\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"Contact Us\", \"slug\": \"/contact\" }\n ]\n },\n {\n \"contentType\": \"collection\",\n \"type\": \"CardGrid\",\n \"cmsLabel\": \"Hepatology Capabilities\",\n \"fields\": {\n \"heading\": \"What We Offer\"\n },\n \"items\": [\n {\n \"contentType\": \"component\",\n \"type\": \"Generic\",\n \"cmsLabel\": \"Capability — Cohort Building\",\n \"fields\": {\n \"heading\": \"Cohort Building\",\n \"body\": \"- Disease characterization\\n- Protocol design\\n- Long-term follow-up\"\n }\n },\n {\n \"contentType\": \"component\",\n \"type\": \"Generic\",\n \"cmsLabel\": \"Capability — Evidence Review\",\n \"fields\": {\n \"heading\": \"Evidence Review\",\n \"body\": \"Systematic literature reviews and meta-analyses.\\n\\nSuitable for regulatory submission.\"\n }\n }\n ]\n }\n ]\n}\n```\n\nRun:\n```bash\ncms-edit create from-json --json '{...}' --dry-run # validate first\ncms-edit create from-json --json '{...}' # create for real\ncms-edit open --page-slug /solutions/hepatology # inspect result\n```\n\n---\n\n## After Creation\n\nOnce created:\n1. Run `cms-edit open --page-slug /<slug>` to inspect the result.\n2. Fix any field values with `cms-edit set` or `cms-edit rtf`.\n3. Publish in the Contentful web app when ready.\n\nThe tool prints the Contentful web app URL for the new entry after creation.\n\n---\n\n## HtmlComponent example\n\nRun `schema htmlComponent` first. Field ids below are the core names; some spaces use `htmlContent` / `cssContent` / `jsContent` instead (or dual-write both). Vendor libraries belong on `externalScripts`, not inside HTML.\n\n```json\n{\n \"type\": \"page\",\n \"slug\": \"/lab/html-widget\",\n \"title\": \"HTML widget\",\n \"components\": [\n {\n \"contentType\": \"htmlComponent\",\n \"cmsLabel\": \"Widget — jsPDF demo\",\n \"fields\": {\n \"rawHtml\": \"<div class=\\\"widget\\\"><button type=\\\"button\\\" class=\\\"export\\\">Export</button></div>\",\n \"customJs\": \"hcRoot.querySelector('.export').addEventListener('click', function () { window.jspdf.jsPDF(); });\",\n \"externalScripts\": [\"/html-components/widget/jspdf.umd.min.js\"],\n \"markdownContent\": \"Export widget\"\n }\n }\n ]\n}\n```\n", "fields-article": "# cms-edit — Article Field Reference\n\nAn `article` entry is a blog post, news item, or publication. It has a slug, date, article type classification, and usually a `content` array of body components.\n\nRead `cms-edit://customer/articles` for site-specific playbooks (press releases, publications, tag rules).\n\n---\n\n## Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3` |\n| `title` | Text | Yes | Display title and on-page heading. Also the document `<title>` when `metaTitle` is empty |\n| `metaTitle` | Text | No | Optional search-result title (`<title>`, Open Graph, Twitter). Does not change the on-page heading |\n| `description` | Text | No | SEO meta description — keep under ~160 characters when used for meta |\n| `subtitle` | Text | No | Display line on news/publication heroes (site-specific) |\n| `cmsLabel` | Text | No | Label in Contentful's entry list. Defaults to `title` |\n| `date` | Date | Yes | Publication date in `YYYY-MM-DD` format. Defaults to today in `create from-json` |\n| `articleType` | Link (Entry) | Yes | Link to an `articleType` entry (categorises the article) |\n| `tags` | Array of Links | No | Tag entries (often drives URL topic segment when primary tag is in slug) |\n| `content` | Array of Links | No | Body components — see [Template hierarchy](#template-hierarchy) before adding heroes |\n| `template` | Link (Entry) | No | Per-article layout override (rare); overrides `articleType.articleTemplate` |\n| `featuredImage` | Link (Asset) | No | Often used for OpenGraph / social sharing — prefer **landscape** (wider than tall) |\n| `visuals` | Array of Links | No | Media entries — on many sites drives on-page hero and listing thumbnails |\n| `download` | Link (Asset) | No | Downloadable file (e.g. PDF poster) |\n| `icon` | Link (Asset) | No | Icon asset |\n| `authors` | Array of Links | No | Person entries (ordered bylines) |\n| `externalLink` | Text | No | External URL (e.g. DOI, journal link) |\n| `indexed` | Boolean | Yes | Search indexing (default `true`) |\n| `hidden` | Boolean | Yes | Sitemap visibility (default `false`) |\n\n### `featuredImage` vs `visuals`\n\nOn sites that use **both** fields, they often serve different purposes:\n\n| Field | Typical use |\n|-------|-------------|\n| `visuals` | On-page hero image and listing/card thumbnail |\n| `featuredImage` | OpenGraph and social sharing cards (landscape) |\n\nRead `cms-edit://customer/articles` and `defaults` for site rules. When the playbook requires both, set each explicitly — do not omit `featuredImage` expecting inheritance to fill gaps on listing or OG surfaces.\n\n---\n\n## Template hierarchy\n\nRendered article layout is assembled from the article entry **and** a resolved **template** entry:\n\n1. Article `template` field (if set) — takes precedence\n2. Else linked `articleType` → `articleTemplate` field\n\nTemplate entries provide `preContent` and `postContent` arrays that wrap the article's `content` field. On many marketing sites, **heroes and shells live in the template**, not in per-article `content`.\n\nBefore adding components to an article:\n\n```bash\ncms-edit list --type articleType\n# Note articleTemplate on the target type, then inspect that template:\ncms-edit peek --id <template-entry-id>\n```\n\n**Do not duplicate** hero or layout components in `content` when the resolved template's `preContent` / `postContent` already provides them. The site playbook (`cms-edit://customer/articles`) lists which component types belong in `content` (e.g. rich text only).\n\n> **Note:** `articleType.articlePageTopContent` exists in Contentful on some spaces but is **not** read by the standard article converter — use `articleTemplate` → `preContent` instead.\n\n---\n\n## Finding article types (required)\n\n```bash\ncms-edit list --type articleType\n```\n\nEvery article must link to an **articleType**. Prefer slug-based lookup for marketers:\n\n- CLI: `--article-type-slug resources/blog` or `--article-type-name \"Blog\"`\n- JSON: `articleTypeSlug` or `articleTypeName` (or `articleTypeId` if you have the ID)\n\n---\n\n## Listing Recent Articles\n\nSort by publication `date` (matches the website), not `sys.updatedAt`:\n\n```bash\ncms-edit list --type article --sort date -n 10\ncms-edit search \"keyword\" --type article\ncms-edit list --type article --sort date\n```\n\nTo find **draft** articles: `cms-edit list --type article --sort date` (preview index includes drafts), then `cms-edit peek --article-slug <slug>` or `cms-edit open --id <id>`. `peek` and `open` load draft content — only `list --published` is published-only.\n\n---\n\n## Reading Article Fields\n\n```bash\ncms-edit open --article-slug /news/2025-hepatology-study\ncms-edit read @c0 # all fields\ncms-edit read @c0 date\ncms-edit read @c0 description\n```\n\n---\n\n## Setting Article Fields\n\n```bash\ncms-edit set @c0 title \"Updated Article Title\"\ncms-edit set @c0 description \"New meta description.\"\ncms-edit set @c0 date \"2025-06-01\"\n```\n\n---\n\n## Adding Content to an Article\n\nCheck [Template hierarchy](#template-hierarchy) and the site articles playbook first.\n\n```bash\n# Add a component to the article's content array\ncms-edit add TextBlock component\n\n# Add a collection\ncms-edit add CardGrid collection\n\n# Insert after a specific component\ncms-edit add Generic component --after @c3\n```\n\nRename component `cmsLabel` from defaults like \"New Article rich text\" to a descriptive label (site playbook may specify a pattern).\n\n---\n\n## In create from-json\n\n```json\n{\n \"type\": \"article\",\n \"slug\": \"news/2025-hepatology-study\",\n \"title\": \"New Hepatology Cohort Study Published\",\n \"description\": \"A landmark study on hepatology cohort data.\",\n \"date\": \"2025-06-01\",\n \"articleTypeSlug\": \"resources/blog\",\n \"featuredImageAssetFilename\": \"hero-landscape.jpg\",\n \"visualsIds\": [\"<media-entry-id>\"],\n \"components\": [\n {\n \"contentType\": \"component\",\n \"type\": \"TextBlock\",\n \"fields\": {\n \"heading\": \"Study Overview\",\n \"body\": \"The study included 1,200 patients.\\n\\nResults showed significant improvement.\",\n \"cmsLabel\": \"News — New Hepatology Cohort Study Published\"\n }\n }\n ]\n}\n```\n\nAuto-detection: if `articleTypeId` is present and `type` is omitted, the entry is automatically created as an article.", "fields-collection": "# cms-edit — Collection Field Reference\n\nA `collection` entry is a group of components — a card grid, timeline, category explorer, etc. The `collectionType` field picks which visual layout to use. Children are stored in the `contents` field.\n\n---\n\n## Fields\n\n| Field | Type | Description |\n|---|---|---|\n| `cmsLabel` | Text | Human-readable label in Contentful's entry list |\n| `collectionType` | Text | Variant discriminator — e.g. `CardGrid`, `Timeline`, `CategoryExplorer`. Run `cms-edit types` to see valid values |\n| `heading` | Text | Section heading |\n| `preHeading` | Text | Small label above the heading. Rendered as `<p>`, not a heading tag |\n| `postHeading` | Text | Small label below the heading. Rendered as `<p>`, not a heading tag |\n| `body` | RichText | Introductory body text for the collection |\n| `links` | Array of Links | CTA link entries for the collection as a whole |\n| `contents` | Array of Links | The child component/collection entries in display order |\n| `backgroundColour` | Text | Named background colour |\n| `textColour` | Text | Named text colour |\n\n---\n\n## Reading Collection Fields\n\n```bash\ncms-edit open --page-slug /solutions\ncms-edit snapshot\n# A collection appears as a nested group in the tree, e.g.:\n# @c3 collection [draft] CardGrid\n# @c4 component [draft] Card — Hepatology\n# @c5 component [draft] Card — Dermatology\n\ncms-edit read @c3 # all fields on the collection\ncms-edit read @c3 heading # just the heading\n```\n\n---\n\n## Setting Collection Fields\n\n```bash\ncms-edit set @c3 heading \"Our Solutions\"\ncms-edit set @c3 preHeading \"What We Do\"\ncms-edit rtf @c3 body \"An overview of our capabilities.\\n\\nSelect a speciality below.\"\ncms-edit set @c3 backgroundColour \"Grey\"\n```\n\n---\n\n## Adding Child Items\n\n```bash\n# Add a new child component inside a collection\ncms-edit add Generic component --parent @c3\n\n# Re-snapshot after add — refs are renumbered\ncms-edit snapshot\n\n# Then set fields on the new child\ncms-edit set @c4 heading \"New Card Heading\"\n```\n\n**Important:** After any `add --parent` operation, all entries that come after the collection in the depth-first tree are renumbered. Always re-snapshot or use variable binding in `run` batches. See `cms-edit help run`.\n\n---\n\n## Reordering Children\n\n```bash\n# Move a child to a specific position (0-indexed) within its parent\ncms-edit move @c5 0 # move to first position\ncms-edit move @c4 2 # move to third position\n```\n\n---\n\n## Removing a Child\n\n```bash\ncms-edit remove @c5 # unlinks from parent; does not delete the entry\n```\n\n---\n\n## In create from-json\n\nCollections use `\"contentType\": \"collection\"` and their children go in `\"items\"`. The `items` array maps to the `contents` field in Contentful:\n\n```json\n{\n \"contentType\": \"collection\",\n \"type\": \"CardGrid\",\n \"cmsLabel\": \"Solutions Cards\",\n \"fields\": {\n \"heading\": \"Our Solutions\",\n \"preHeading\": \"What We Offer\",\n \"body\": \"Choose a speciality area below.\\n\\n\",\n \"backgroundColour\": \"Grey\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"See All Solutions\", \"slug\": \"/solutions\" }\n ],\n \"items\": [\n {\n \"contentType\": \"component\",\n \"type\": \"Generic\",\n \"cmsLabel\": \"Card — Hepatology\",\n \"fields\": {\n \"heading\": \"Hepatology\",\n \"body\": \"Evidence generation for liver disease.\\n\\n\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"Learn More\", \"slug\": \"/solutions/hepatology\" }\n ]\n },\n {\n \"contentType\": \"component\",\n \"type\": \"Generic\",\n \"cmsLabel\": \"Card — Dermatology\",\n \"fields\": {\n \"heading\": \"Dermatology\",\n \"body\": \"Real-world data for skin conditions.\\n\\n\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"Learn More\", \"slug\": \"/solutions/dermatology\" }\n ]\n }\n ]\n}\n```\n\n**Note:** Internal links in `items[].links` must resolve — the target pages must exist in Contentful before running `create from-json`. Use `--dry-run` to validate all slugs first. See `cms-edit help create-from-json`.\n", "fields-component": "# cms-edit — Component Field Reference\n\nA `component` entry is an individual content section — a hero, text block, card, timeline item, etc. The `componentType` field picks which visual variant to render.\n\n---\n\n## Fields\n\n| Field | Type | Description |\n|---|---|---|\n| `cmsLabel` | Text | Human-readable label in Contentful's entry list |\n| `componentType` | Text | Variant discriminator — e.g. `HeroSimple`, `TextBlock`, `Generic`. Run `cms-edit schema types component` to see valid values |\n| `heading` | Text | Main heading text |\n| `preHeading` | Text | Small label above the heading. Rendered as `<p>`, not a heading tag |\n| `postHeading` | Text | Small label below the heading. Rendered as `<p>`, not a heading tag |\n| `body` | RichText | Main body content. Accepts markdown in `create from-json` and `run rtf` |\n| `links` | Array of Links | CTA link entries attached to this component |\n| `visual` | Link (Asset or Entry) | Primary visual: image asset or responsive visual entry |\n| `mobileVisual` | Link (Asset or Entry) | Alternative visual for mobile viewports |\n| `backgroundColour` | Text | Named colour. Run `cms-edit schema colours` to see valid values |\n| `textColour` | Text | Named colour for text. Run `cms-edit schema colours` to see valid values |\n\nNot all components use all fields — unused fields are simply null.\n\n---\n\n## Reading Component Fields\n\n```bash\ncms-edit open --page-slug /solutions/hepatology\ncms-edit snapshot\ncms-edit read @c1 # all fields on the first component\ncms-edit read @c1 heading # just the heading\ncms-edit read @c1 body # rich text summary\n```\n\n---\n\n## Setting Scalar Fields\n\n```bash\ncms-edit set @c1 heading \"New Heading\"\ncms-edit set @c1 preHeading \"Our Speciality\"\ncms-edit set @c1 postHeading null # clear the field\ncms-edit set @c1 backgroundColour \"Navy\"\ncms-edit set @c1 textColour \"White\"\n```\n\n---\n\n## Setting Rich Text (body)\n\n```bash\n# Inline markdown\ncms-edit rtf @c1 body \"## Overview\\n\\nFirst paragraph.\\n\\nSecond paragraph.\"\n\n# From a file\ncms-edit rtf @c1 body --content \"# ...\"\n\n# Find and replace within existing rich text\ncms-edit rtf replace @c1 body --find \"old text\" --replace-plain \"new text\"\n```\n\n**Rich text rules:**\n- Single sentences must include `\\n\\n` to be converted to a paragraph: `\"One sentence.\\n\\n\"`\n- The `body` field is always RichText — the schema ensures correct conversion\n- Headings, lists, bold, italic, and links are all supported in markdown\n\n**Markdown examples:**\n```\n# Heading 1\n## Heading 2\n\nPlain paragraph text.\n\n**Bold text** and _italic text_.\n\n- List item one\n- List item two\n - Nested item\n\n[Link text](https://example.com)\n\n> A blockquote\n```\n\n---\n\n## Managing CTA Links\n\n```bash\n# List existing links\ncms-edit links list @c1\n\n# Add a new external link\ncms-edit links add @c1 --type external --label \"Learn More\" --href \"https://example.com\"\n\n# Add an internal link (resolves slug to entry)\ncms-edit links add @c1 --type internal --label \"Our Team\" --slug /about/team\n\n# Add a download link\ncms-edit links add @c1 --type download --label \"Download PDF\" --asset-id <assetId>\n\n# Set link variant (text link vs button — see cms-edit schema link)\ncms-edit links set @c1 0 variant link\n\n# Remove a link (by index)\ncms-edit links remove @c1 0\n\n# Reorder links\ncms-edit links move @c1 1 0 # move index 1 to index 0\n```\n\n---\n\n## Setting Visuals\n\n```bash\n# Link an asset directly\ncms-edit set @c1 visual --asset <assetId>\n\n# Search for assets\ncms-edit asset search \"hepatology\"\n\n# Get asset info\ncms-edit asset info <assetId>\n```\n\n---\n\n## In create from-json\n\n```json\n{\n \"contentType\": \"component\",\n \"type\": \"HeroSimple\",\n \"cmsLabel\": \"Homepage Hero\",\n \"fields\": {\n \"heading\": \"Headline text\",\n \"preHeading\": \"Label above\",\n \"postHeading\": \"Label below\",\n \"body\": \"Opening paragraph.\\n\\nSecond paragraph.\",\n \"backgroundColour\": \"Navy\",\n \"textColour\": \"White\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"Learn More\", \"slug\": \"/about\" },\n { \"type\": \"external\", \"label\": \"Contact\", \"href\": \"https://example.com/contact\" }\n ]\n}\n```\n\nUse explicit visual shorthands in `fields` (see `cms-edit help create-from-json`). Examples:\n\n```json\n\"fields\": {\n \"visualId\": \"<existing-media-entry-id>\",\n \"visualAssetFilename\": \"hero.jpg\",\n \"visualMedia\": { \"assetId\": \"<asset-id>\", \"name\": \"Homepage Hero\", \"position\": \"Middle\", \"width\": 40 }\n}\n```\n\n**Media entry `name`:** This is the label editors see in Contentful's entry list. Set it to the **linked asset's title** (same as `asset info` / Contentful asset title). Do not use `visual-{assetId}`, `Wrapper for {assetId}`, or raw filenames.\n\nDo not put a bare filename on `visual` — use `visualAssetFilename`. Requires `cms-edit index sync` for `*AssetFilename` keys.\n", "fields-html-component": "# cms-edit — HtmlComponent Field Reference\n\nAn `htmlComponent` entry is developer-authored HTML, optional scoped CSS, optional inline JS, and optional **external script URLs**. It is not a registered `component` variant.\n\nRun `cms-edit schema htmlComponent` for this space’s field IDs. Some spaces dual-write legacy names (`htmlContent` / `cssContent` / `jsContent`) plus core ids (`rawHtml` / `customCss` / `customJs`). **`externalScripts` is the same id on every space.** Unknown JSON keys fail (`html` vs `htmlContent`).\n\nSee `cms-edit://customer/task-create-html-component` for the full create playbook.\n\n---\n\n## Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `cmsLabel` | Symbol | Yes | Internal label. Set immediately. |\n| `rawHtml` / `htmlContent` | Text | Yes | Markup. No `<script src>`. |\n| `customCss` / `cssContent` | Text | No | Auto-scoped to `[data-hc-id]`. |\n| `customJs` / `jsContent` | Text | No | Inline JS via `next/script`. Scope queries to injected `hcRoot`. |\n| `externalScripts` | Array of Symbol | No | Allowlisted script URLs loaded **before** `customJs`. Max 10. |\n| `markdownContent` | Text | No | Plain text for search / markdown export. |\n| `scriptStrategy` | Symbol | No | `afterInteractive` (default), `lazyOnload`, `beforeInteractive`. Applies to externals and inline JS. |\n| `isHero` | Boolean | No | `true` when the HTML contains the page `<h1>`. |\n| `fullWidth` | Boolean | No | Viewport-breakout layout when the site renderer supports it. |\n| `excludeFromSearch` | Boolean | No | Skip search even if `markdownContent` is set. |\n| `loadScriptOnce` | Boolean | No | Dedupe inline script id per entry (default true). External URLs already share one `next/script` id per URL. |\n\n---\n\n## `externalScripts` allowlist\n\nAlways allowed: same-origin paths matching `/html-components/` + a `.js` filename (no `..`, no query, no hash). Prefer files in the site repo at `public/html-components/<feature>/….js`.\n\nHTTPS URLs are allowed only when the hostname is in `CmsRendererConfig.htmlComponentExternalScriptHosts`. If the site has CSP, that host must also be in `script-src`. If the host is not allowlisted, **stop** — do not invent a CDN load.\n\nRejected: `http:`, `javascript:`, `//…`, path traversal, query/hash on same-origin paths. Disallowed URLs are not loaded (preview/dev may warn). Duplicates are dropped at render. `customJs` waits until every listed src is ready; a failed src skips inline JS.\n\nDo **not** put libraries in HTML `<script>` tags or `createElement('script')` inside `customJs`.\n\n---\n\n## Setting fields\n\nHTML/CSS/JS (long text). Hosted MCP max **8192 bytes** inline — over that, staged upload:\n\n```\ncms_edit_request_staged_upload { \"fileName\": \"hero.js\", \"mimeType\": \"text/javascript\", \"kind\": \"text\" }\n# curlCommand\ncms_edit [\"set\", \"@cN\", \"customJs\", \"--staged\", \"<uploadId>\"]\n```\n\nTiny snippets only:\n\n```\ncms_edit [\"set\", \"@cN\", \"rawHtml\", \"--content-base64\", \"<b64>\"]\n```\n\nContentful Text is ~**50k characters**. Confirm with `[\"read\", \"@cN\", \"--hash\"]`. `diff` summarizes long fields (bytes, sha256, head).\n\n`externalScripts` is an array — **not** a scalar string. Scalar `set` is rejected.\n\n```\ncms_edit [\"set\", \"@cN\", \"externalScripts\", \"--json\", \"[\\\"/html-components/feature/lib.js\\\"]\"]\n```\n\nOn `create from-json`:\n\n```json\n{\n \"contentType\": \"htmlComponent\",\n \"cmsLabel\": \"Pricing grid\",\n \"fields\": {\n \"rawHtml\": \"<div class=\\\"hc-root\\\">…</div>\",\n \"customJs\": \"hcRoot.querySelector('.buy')\",\n \"externalScripts\": [\"/html-components/pricing-grid/lib.js\"],\n \"markdownContent\": \"Pricing grid\"\n }\n}\n```\n\nUse this space’s field ids from `schema htmlComponent` (`rawHtml` vs `htmlContent`). Dual-write both when the schema shows both.\n\n---\n\n## Related\n\n- `cms-edit://customer/task-create-html-component`\n- `cms-edit help create-from-json`\n- `cms-edit schema htmlComponent`\n", "fields-page": "# cms-edit — Page Field Reference\n\nA `page` entry is the root of a web page's content tree. It has a slug, metadata, and arrays of content components.\n\n---\n\n## Top-Level Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3`. Use `index` for the home page. |\n| `title` | Text | Yes | Display title and on-page heading. Also the document `<title>` when `metaTitle` is empty |\n| `metaTitle` | Text | No | Optional search-result title (`<title>`, Open Graph, Twitter). Does not change the on-page heading |\n| `description` | Text | No | SEO meta description |\n| `cmsLabel` | Text | No | Label shown in Contentful's entry list. Defaults to `title` |\n| `indexed` | Boolean | No | Whether the page is indexed by search engines |\n| `hidden` | Boolean | No | Whether the page is excluded from the sitemap |\n| `template` | Link (Entry) | No | Link to a `template` entry for shared layout slots |\n| `featuredImage` | Link (Asset) | No | Featured image asset for social sharing |\n\n---\n\n## Content Arrays\n\nA page has three content slot arrays. Components are rendered in order within each slot.\n\n| Field | Type | Description |\n|---|---|---|\n| `topContent` | Array of Links | Content rendered above the main content area (e.g. sticky nav, announcement bar) |\n| `content` | Array of Links | Main content area. **Default target for `add` and `create from-json`** |\n| `bottomContent` | Array of Links | Content rendered below the main content area (e.g. newsletter signup) |\n\nEach array entry is a link to a `component`, `collection`, or `externalComponent` entry.\n\n---\n\n## Reading Page Fields\n\n```bash\ncms-edit open --page-slug /solutions\ncms-edit read @c0 # read all fields on the page entry\ncms-edit read @c0 title # read just the title\ncms-edit read @c0 slug\n```\n\n---\n\n## Setting Page Fields\n\n```bash\ncms-edit set @c0 title \"New Title\"\ncms-edit set @c0 description \"Updated SEO description.\"\ncms-edit set @c0 indexed true\ncms-edit set @c0 hidden false\n```\n\n---\n\n## Linking a Template\n\nTo link a template to a page, use the template entry ID:\n\n```bash\ncms-edit set @c0 template --link <templateEntryId>\n```\n\nOr in `create from-json`:\n```json\n{\n \"slug\": \"/new-page\",\n \"title\": \"New Page\",\n \"templateId\": \"<templateEntryId>\"\n}\n```\n\nFind template IDs with:\n```bash\ncms-edit list --type template\n```\n\n---\n\n## Adding Content to a Page\n\n```bash\n# Add a new component to the default content array\ncms-edit add HeroSimple component\n\n# Add to topContent\ncms-edit add AnnouncementBar component --target topContent\n\n# Add to bottomContent\ncms-edit add NewsletterSignup component --target bottomContent\n\n# Insert after a specific entry\ncms-edit add TextBlock component --after @c3\n```\n\n---\n\n## In create from-json\n\n```json\n{\n \"type\": \"page\",\n \"slug\": \"/solutions/hepatology\",\n \"title\": \"Hepatology Solutions\",\n \"description\": \"Evidence generation for hepatology research.\",\n \"cmsLabel\": \"Hepatology Solutions Page\",\n \"templateId\": \"optionalTemplateId\",\n \"featuredImage\": \"<asset-id>\",\n \"featuredImageAssetFilename\": \"social-share.jpg\",\n \"indexed\": true,\n \"hidden\": false,\n \"components\": [\n {\n \"contentType\": \"component\",\n \"type\": \"HeroSimple\",\n \"target\": \"content\",\n \"fields\": { \"heading\": \"Hepatology Solutions\" }\n }\n ]\n}\n```\n", "fields-taxonomy": "# cms-edit — Taxonomy Field Reference\n\nTaxonomy entries (`tagType`, `articleType`, `tag`) can be created as **drafts** with the CLI. Use `--json-file` for full field control, or `--slug` / `--name` for minimal creates.\n\n```bash\ncms-edit create tag-type --slug conference-venue --name \"Conference Venue\"\ncms-edit create article-type --slug resources/publications --name \"Publications\"\ncms-edit create tag --slug poster-presentation --name \"Poster Presentation\" --tag-type presentation-type\ncms-edit create tag --slug easl-congress-2026 --name \"EASL Congress 2026\" --tag-type publication-source \\\n --description \"Research presented at EASL Congress 2026.\" --featured-image <logoAssetId>\n\n# Idempotent import helpers\ncms-edit create tag-type --slug conference-venue --name \"Conference Venue\" --if-not-exists\ncms-edit resolve --tag-type-slug presentation-type\n```\n\nAll creates are draft-only. See `cms-edit help taxonomy-from-json` for batch bootstrap.\n\n---\n\n## tagType fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `name` | Text | Yes | Display name |\n| `slug` | Text | No | URL slug without leading or trailing slash. Example: `part1/part2`. Optional. |\n| `show` | Boolean | No | Whether tags of this type show visually on cards/detail |\n| `template` | Link (Entry) | No | Template for tag detail pages |\n| `topContent` | Array of Links | No | Content above main area on tag detail |\n| `menu` | Link (Entry) | No | Navigation entry |\n| `footer` | Link (Entry) | No | Footer navigation entry |\n| `indexPageTemplate` | Link (Entry) | No | Template for tag-type index page |\n| `indexPageTopContent` | Array of Links | No | Top content on tag-type index |\n\n---\n\n## articleType fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `name` | Text | Yes | Display name |\n| `cmsLabel` | Text | Yes | Label in Contentful entry list (defaults to `--name`) |\n| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3`. Use `index` for the home page. |\n| `indexPageTitle` | Text | Yes | Title on article index page (defaults to `--name`) |\n| `metaTitle` | Text | No | Optional search-result title for the index. Does not change the on-page heading |\n| `indexPageDescription` | Text | Yes | Description on article index (defaults to `\"\"`) |\n| `featuredImage` | Link (Asset) | No | Featured image for index/social |\n| `menu` | Link (Entry) | No | Navigation entry |\n| `footer` | Link (Entry) | No | Footer navigation entry |\n| `indexPageTemplate` | Link (Entry) | No | Template for article index |\n| `indexPageTopContent` | Array of Links | No | Top content on article index |\n| `indexPageStructuredData` | Array of Links | No | Schema entries for index page |\n| `visuals` | Array of Links | No | Media/externalVideo entries |\n| `articleTemplate` | Link (Entry) | No | Template for article detail pages |\n| `articlePageTopContent` | Array of Links | No | Top content on article detail |\n| `structuredData` | Array of Links | No | Schema entries for article pages |\n| `backgroundColour` | Symbol | No | Valid values: `cms-edit schema colours` |\n| `textColour` | Symbol | No | Valid values: `cms-edit schema colours` |\n| `indexed` | Boolean | Yes | Search indexing (default: `true`) |\n| `hidden` | Boolean | Yes | Sitemap visibility (default: `false`) |\n| `indexPageHidden` | Boolean | No | Hide article index page |\n| `articlePageHidden` | Boolean | No | Hide article detail pages |\n| `flags` | Array of Symbols | No | e.g. `\"Sticky nav\"` |\n| `searchTemplate` | Link (Entry) | No | Template for search results |\n| `searchTopContent` | Array of Links | No | Top content on search results |\n| `breadcrumbTitle` | Text | No | Override for breadcrumb label |\n\n---\n\n## tag fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `cmsLabel` | Text | Yes | Label in Contentful (defaults to `--name`) |\n| `name` | Text | Yes | Display name and on-page heading |\n| `metaTitle` | Text | No | Optional search-result title. Does not change the on-page heading |\n| `tagType` | Link (Entry) | Yes | Parent tagType entry |\n| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2`. |\n| `description` | Text | No | Short description |\n| `featuredImage` | Link (Asset) | No | Featured image |\n| `visuals` | Array of Links | No | Media/externalVideo entries |\n| `menu` | Link (Entry) | No | Navigation entry |\n| `footer` | Link (Entry) | No | Footer navigation entry |\n| `template` | Link (Entry) | No | Template for tag detail |\n| `topContent` | Array of Links | No | Top content on tag detail |\n| `structuredData` | Array of Links | No | Schema entries |\n| `backgroundColour` | Symbol | No | Valid values: `cms-edit schema colours` |\n| `textColour` | Symbol | No | Valid values: `cms-edit schema colours` |\n| `indexed` | Boolean | Yes | Search indexing (default: `true`) |\n| `hidden` | Boolean | Yes | Sitemap visibility (default: `false`) |\n| `show` | Boolean | No | Visual display on cards/detail |\n| `breadcrumbTitle` | Text | No | Override for breadcrumb label |\n\nTags require `--tag-type <slug>` or `--tag-type-id <id>` (or `tagTypeSlug` / `tagTypeId` in JSON).\n\n---\n\n## JSON file shape\n\nUse `--json-file` with any taxonomy create command. CLI flags override JSON values.\n\n```jsonc\n{\n \"fields\": {\n \"name\": \"Poster Presentation\",\n \"slug\": \"poster-presentation\",\n \"description\": \"Poster session at ASCO 2025\",\n \"show\": true,\n \"indexed\": true,\n \"hidden\": false,\n \"backgroundColour\": \"White\",\n \"textColour\": \"Navy\"\n },\n \"tagTypeSlug\": \"presentation-type\",\n \"featuredImageId\": \"abc123\",\n \"templateId\": \"tmpl456\",\n \"topContentIds\": [\"comp1\", \"comp2\"]\n}\n```\n\n### Link shorthands\n\nThese top-level keys resolve to Contentful Entry/Asset links (same conventions as `create from-json`):\n\n| Shorthand | Resolves to field |\n|---|---|\n| `tagTypeId`, `tagTypeSlug` | `tagType` (tags only) |\n| `templateId` | `template` |\n| `indexPageTemplateId` | `indexPageTemplate` |\n| `articleTemplateId` | `articleTemplate` |\n| `searchTemplateId` | `searchTemplate` |\n| `menuId` | `menu` |\n| `footerId` | `footer` |\n| `featuredImageId` | `featuredImage` |\n| `topContentIds` | `topContent` |\n| `indexPageTopContentIds` | `indexPageTopContent` |\n| `articlePageTopContentIds` | `articlePageTopContent` |\n| `searchTopContentIds` | `searchTopContent` |\n| `structuredDataIds` | `structuredData` |\n| `indexPageStructuredDataIds` | `indexPageStructuredData` |\n| `visualsIds` | `visuals` |\n\n---\n\n## Common options\n\n| Option | Description |\n|---|---|\n| `--slug <slug>` | Required URL slug |\n| `--name <name>` | Required display name |\n| `--cms-label <label>` | CMS label (articleType/tag; defaults to name) |\n| `--description <desc>` | Short description (tags only) |\n| `--featured-image <asset-id>` | Asset ID for featured image (tags only) |\n| `--json-file <path>` | Full field spec (see above) |\n| `--if-not-exists` | Return existing entry ID when slug matches (exit 0) |\n| `--dry-run` | Validate field build and link resolution without writing |\n\n**Idempotency:** `--if-not-exists` checks Contentful then creates. They work for **sequential** import scripts. Do not run two creates for the same slug in parallel — both may succeed. Re-run with `--if-not-exists` to converge.\n\nUse `CMS_EDIT_JSON=1` or `--json-output` for machine-readable output: `{ ok, id, slug, contentType, status: \"created\"|\"existing\"|\"dry-run\" }` (`id` is empty on dry-run).\n", "fields": "# cms-edit — Content Type Field Reference\n\nThis page lists the content types managed by `cms-edit` and links to their field references.\n\n---\n\n## Content Types\n\n| Content Type | Used For | Detail |\n|---|---|---|\n| `page` | Web pages with a slug and content tree | `cms-edit help fields-page` |\n| `article` | Blog posts and news items | `cms-edit help fields-article` |\n| `htmlComponent` | Developer-authored HTML / CSS / JS blocks | `cms-edit help fields-html-component` |\n| `collection` | Groups of components (card grids, timelines, etc.) | `cms-edit help fields-collection` |\n| `link` | CTA button entries | Managed via `cms-edit links` |\n| `template` | Reusable page shell (header, footer slots) | Used via `templateId` in `create from-json` |\n| `navigation` | Site navigation entries | Managed via `cms-edit nav` |\n| `banner` | Site-wide announcement | `cms-edit help create-editor-entries` |\n| `pageVariant` | Alternate version of a page | `cms-edit help create-editor-entries` |\n| `pageTest` | A/B test configuration | `cms-edit help create-editor-entries` |\n| `customType` | Routable directory (people, tags, …) | `cms-edit help create-editor-entries` |\n| `alternatePageContent` | One block swap on a page variant | `cms-edit add` on a page variant |\n\n---\n\n## Type Discriminators\n\nMany content types have a `*Type` field that picks a specific variant:\n\n| Content Type | Discriminator Field | Values |\n|---|---|---|\n| `component` | `componentType` | `HeroSimple`, `TextBlock`, `CardGrid`, `Generic`, etc. |\n| `collection` | `collectionType` | `CardGrid`, `Timeline`, `CategoryExplorer`, etc. |\n\nRun `cms-edit schema types <content-type>` to see all valid discriminator values for the current space.\n\n---\n\n## Colour Fields\n\nThe `backgroundColour` and `textColour` fields accept named values, not hex codes.\n\nRun `cms-edit schema colours` to see valid values for the current space.\n\nCommon values: `\"Navy\"`, `\"White\"`, `\"Grey\"`, `\"Black\"`, `\"Brand\"`.\n\n---\n\n## Ref Addressing\n\nWhen a session is open (after `cms-edit open`), entries are addressed by `@ref`:\n\n- `@c0` — the root page/article entry\n- `@c1`, `@c2`, ... — entries in depth-first traversal order\n\nRun `cms-edit snapshot` to see current refs.\n\n---\n\n## Field Detail Pages\n\n- `cms-edit help fields-page` — page entry fields\n- `cms-edit help fields-article` — article entry fields\n- `cms-edit help fields-component` — component entry fields\n- `cms-edit help fields-html-component` — HtmlComponent (raw HTML, `externalScripts`)\n- `cms-edit help fields-collection` — collection entry fields\n", "index-sync": "# Content index sync\n\ncms-edit keeps a **local SQLite index** per space/environment for fast asset, media, and **content catalog** discovery. The default index is built from the **Content Preview API** (draft content) — matching cms-edit’s draft-only workflow.\n\n## What gets indexed\n\n| Table | Content |\n|-------|---------|\n| `assets` | All CDN assets (filename, title, MIME, dimensions) |\n| `media` | Media wrapper entries linked to assets |\n| `reference_entries` | Content catalog metadata (no content trees) |\n\nCatalog and media pages use Contentful `select` + `include=0` so only index fields are fetched.\nThat keeps responses under Contentful’s ~7 MB limit on large spaces (e.g. many articles with rich text).\n\n### Catalog content types (schema v5)\n\nTypically fewer than ~1000 rows each: `page`, `article`, `pageVariant`, `template`, `articleType`, `tagType`, `tag`, `navigation`, `navigationItem`, `banner`, `pageTest`, `customType`.\n\nSchema v5 adds `banner`, `pageTest`, and `customType` to the existing columns (`cmsLabel`, and `slug` when the type has one). A version bump rebuilds the index.\n\nEach catalog row stores:\n\n| Column | Purpose |\n|--------|---------|\n| `slug` | Normalized URL slug when the type has `slug` |\n| `label` | List line: `title`, `name`, or template cmsLabel |\n| `cmsLabel` | `cmsLabel` when present (page, article, pageVariant, tag, template, banner, pageTest, customType) |\n| `tagTypeSlug` | Parent tag type slug (tags only) |\n| `articleTypeSlug` | Parent article type slug (articles only) |\n| `date` | Publication date `YYYY-MM-DD` (articles only; schema v4) |\n\n## When you need it\n\nThese commands **require** a built index:\n\n- `cms-edit asset search` (title, `--filename`, `--filename-match`)\n- `cms-edit asset audit`\n- `cms-edit list --type media --asset-id <id>`\n- `cms-edit list --type media --asset-filename …` / `--asset-filename-match …`\n- `cms-edit asset upload --if-exists-by-filename` (lookup uses the index)\n- `*AssetFilename` keys in `create from-json`\n\nCatalog commands **prefer** the index when present (CMA fallback if a row is missing):\n\n- `cms-edit list --type page|article|pageVariant|template|articleType|tagType|tag|navigation|navigationItem`\n- `cms-edit open`, `cms-edit resolve`, `cms-edit nav open` — see [lookup.md](./lookup.md)\n- `cms-edit create … --if-not-exists` for taxonomy\n- `tagTypeSlug` / `tagTypeName` shorthands in JSON create flows\n\nFor `--type template`, `--slug` filters by **cmsLabel** (not URL slug).\n\nUse `--force-cma` on `list` to bypass the catalog and paginate via CMA.\n\n## Commands\n\n```bash\n# Full rebuild (draft/preview content — default)\ncms-edit index sync\n\n# Progress on stderr (per-page fetches, catalog types, SQLite write)\ncms-edit index sync --verbose\n# Same via env (also applies to automatic background sync):\nLOG_CMS_INDEX=1 cms-edit index sync\n\n# Check freshness and row counts\ncms-edit index status\n\n# Browse index contents in the terminal\ncms-edit index dump\ncms-edit index dump --all\ncms-edit index dump --type image/ -n 20\ncms-edit index dump --assets-only --skip 50\ncms-edit index dump --reference-only\ncms-edit index dump --reference-type page\n\n# Published content only (separate database file suffix -published)\ncms-edit index sync --published\ncms-edit index status --published\n```\n\nIndex path: `~/.contentful-cms/index/<spaceId>/<environment>/media.db` (add `-published` suffix for published-only mode).\n\n## Automatic sync (simplicity)\n\nCommands that depend on the index call **`ensureContentIndex`** internally. You do not need to run `index sync` first in normal agent workflows.\n\n| Condition | Auto-sync behaviour |\n|-----------|---------------------|\n| Index missing | **Hydrate** from shared cache blob if valid, else **full** rebuild |\n| Schema version outdated (e.g. v2 → v3) | **Full** rebuild |\n| Committed write invalidated index (incremental) | **Incremental** upsert on next index command |\n| Committed write invalidated index (full — slug change or catalog delete) | **Full** rebuild on next index command |\n| Last sync older than **24 hours** | **Incremental** upsert (`sys.updatedAt[gte]` last `syncedAt`) |\n| Index fresh | No sync |\n\nManual `cms-edit index sync` always performs a **full** rebuild.\n\n**Invalidation (lazy, no thrashing):** `save`, `create page|article|…`, `asset upload`, and similar **committed** writes mark the index dirty (Redis on hosted MCP; `invalidation.json` locally). They do **not** sync immediately. The next `list`, `open`, `asset search`, etc. refreshes the index. In-session `set` / `rtf` edits do **not** invalidate.\n\n**Shared cache (hosted MCP):** After sync, the SQLite file is gzipped into Redis (~sub-MB for typical spaces). Cold serverless instances restore from Redis instead of re-fetching all assets from the Preview API.\n\n**Incremental limitations:** Only rows changed since the last sync are fetched. Entries deleted in Contentful may remain in the index until the next **full** invalidation/sync. Duplicate slug/label/cmsLabel rows in the index cause lookup commands to fail with an explicit error (fix in Contentful, then full sync).\n\n**Single writer:** File lock beside `media.db` plus a shared Redis lock on hosted MCP. If another sync is in progress, the command **fails immediately** (exit code 1). Stale file locks (>30 min or dead pid) are removed automatically.\n\n## Preview / delivery API token\n\nThe management token cannot call the CDN. For default `index sync`:\n\n| Config field | Purpose |\n|--------------|---------|\n| `previewAccessToken` | Explicit Preview API token (`${CONTENTFUL_PREVIEW_ACCESS_TOKEN}`) |\n| *(auto)* | Linked preview key from a space delivery key via CMA |\n\nFor `index sync --published`:\n\n| Config field | Purpose |\n|--------------|---------|\n| `deliveryAccessToken` | Explicit CDA token (`${CONTENTFUL_ACCESS_TOKEN}`) |\n| `deliveryApiKeyName` | Pick a space delivery key by name via CMA |\n| *(auto)* | First delivery key matching the configured environment |\n| `autoCreateDeliveryApiKey` | Create `cms-edit-index` key if none match (needs PAT permissions; warns when used) |\n\nIf CMA cannot read API keys, set `previewAccessToken` or `deliveryAccessToken` manually.\n\n## Typical workflow before imports\n\n```bash\ncms-edit index sync\ncms-edit asset search --filename-match 'istock.*'\ncms-edit list --type page\ncms-edit list --type article --article-type-name \"Publications\"\ncms-edit resolve --tag-type-slug topic\ncms-edit open --page-slug /about\n```\n\nSee [lookup.md](./lookup.md) for all `open` / `resolve` flags. See [MEDIA_INDEX_PLAN.md](../MEDIA_INDEX_PLAN.md) for architecture details.\n", "index": "# cms-edit — Help Index\n\n`cms-edit` is an opinionated CLI for reading and editing Contentful content across SE Studio apps. It provides a snapshot → ref → edit → save workflow. **Saves create drafts.** Publish, unpublish, and archive use a plan and an explicit yes, and only when the Contentful role allows it.\n\n---\n\n## How to Get Help\n\n| Command | What you get |\n|---|---|\n| `cms-edit` | Command list + one-line descriptions |\n| `cms-edit <command> --help` | Options and synopsis for a command |\n| `cms-edit guide [topic]` | Short getting-started markdown for hosted MCP (`overview`, `workflow`, `commands`, `troubleshooting`, `hosted`) |\n| `cms-edit help <topic>` | Detailed CLI playbooks with examples (this index lists topics) |\n\nAvailable topics for `cms-edit help <topic>`:\n\n| Topic | Contents |\n|---|---|\n| `workflow` | Standard editing workflow — open, snapshot, edit, save |\n| `create-from-json` | Create a new page or article from a JSON file (single-shot) |\n| `create-editor-entries` | Create banners, page variants, page tests, and custom types |\n| `taxonomy-from-json` | Batch-create tagType, articleType, and tag entries from JSON |\n| `person-from-json` | Batch-create person/author entries from JSON |\n| `article-tags-from-json` | Set tags on multiple articles from JSON |\n| `bulk-rtf-replace` | Find-replace plain text across Rich Text fields in entry trees |\n| `batch` | Edit multiple entries by Contentful entry ID, then save once |\n| `batch-run` | Execute a JSON script of operations (`batch run --json`) |\n| `fields` | Overview of all content types |\n| `fields-page` | All fields on a `page` entry |\n| `fields-article` | All fields on an `article` entry |\n| `fields-component` | All fields on a `component` entry |\n| `fields-html-component` | HtmlComponent fields including `externalScripts` |\n| `fields-collection` | All fields on a `collection` entry |\n| `fields-taxonomy` | All fields on `tagType`, `articleType`, and `tag` entries |\n| `index-sync` | Build and use the local content index (CDA sync) |\n| `patterns` | Census published page/article stacks (Delivery API) |\n| `asset-review` | Visual asset quality review (filename, alt, size, dimensions) |\n| `lookup` | Flat flags for `open`, `resolve`, and `nav open` |\n| `publish` | Plan, then publish, unpublish, archive, or revalidate |\n\n---\n\n## Quick-Start One-Liners\n\n```bash\n# See what pages exist (catalog index; auto-syncs if needed)\ncms-edit list --type page\n\n# Open a page and inspect it\ncms-edit open --page-slug /about\ncms-edit snapshot\n\n# Edit a field\ncms-edit set @c1 heading \"New heading\"\ncms-edit save\n\n# Create a complete new page from a JSON definition\ncms-edit create from-json --json '{...}'\n\n# Validate a JSON file without writing anything\ncms-edit create from-json --json '{...}' --dry-run\n\n# Bootstrap taxonomy for import scripts\ncms-edit create taxonomy-from-json --json '{...}' --if-not-exists\n\n# Import authors from JSON\ncms-edit create person-from-json --json '{...}' --if-not-exists\n\n# Bulk retag articles\ncms-edit article-tags-from-json --json '{...}'\n\n# Sitewide rich-text find-replace (dry-run first)\ncms-edit bulk-rtf-replace --find \"Old\" --replace-plain \"New\" --dry-run\n\n# Run a batch of edits\ncms-edit batch run --json '[...]'\n```\n\n---\n\n## Commands by Category\n\n### Navigation & Discovery\n\n**Content discovery** uses the local catalog index (`index sync`) and `list --type <type>`. Catalog types: `page`, `article`, `pageVariant`, `template`, `articleType`, `tagType`, `tag`, `navigation`, `navigationItem`, `banner`, `pageTest`, `customType`. Other types (e.g. `person`): `list --type <type>` via the Contentful API.\n\n| Command | Description |\n|---|---|\n| `open --page-slug <slug>` | Load a page into the session (see `help lookup`) |\n| `open --resume` | Re-print active session; **keeps** staged edits (no refetch) |\n| `open --overwrite --confirm-discard …` | Replace session even if dirty (discards staged field edits) |\n| `set <ref\\|id> <field> <value>` | Set field; bare entry IDs allowed mid-session |\n| `set <id>:field=value …` | Scalar multi-set by entry ID (stays on current session) |\n| `open --id <id>` | Load by Contentful entry ID |\n| `peek --page-slug <slug>` | Print content tree + root field values without creating a session |\n| `peek --id <id>` | Same by Contentful entry ID |\n| `snapshot` | Re-print the current session's content tree with @refs |\n| `read [@ref] [field]` | Read fields from the active session (@refs from snapshot) |\n| `read <id> --id [field]` | Read entry fields by ID without an open session |\n| `list --type <ct>` | List catalog entries (page, article, pageVariant, template, taxonomy, nav, …) |\n| `search <query>` | Full-text search across entries |\n| `resolve <id>` | Resolve a Contentful entry or asset ID |\n| `resolve --page-slug <slug>` | Resolve an entry by flat lookup flag (no session); see `help lookup` |\n| `create tag-type\\|tag\\|article-type … --if-not-exists` | Idempotent taxonomy create (returns existing entry if slug matches) |\n| `schema types <content-type>` | List valid type-discriminator values |\n| `schema colours` | List valid backgroundColour / textColour values |\n| `schema <content-type>` | Display field definitions for a content type |\n| `health` | Check Contentful API connectivity |\n\n### Editing\n| Command | Description |\n|---|---|\n| `set <ref> <field> <value>` | Set a scalar, link, or array field |\n| `rtf <ref> <field> <markdown>` | Set a rich text field from markdown |\n| `add <type> <contentType>` | Create and link a new child entry |\n| `remove <ref>` | Unlink an entry from its parent |\n| `move <ref> <position>` | Reorder an entry in its parent array |\n| `links <subcommand>` | Manage CTA link entries |\n| `nav <subcommand>` | Manage navigation entries |\n| `asset <subcommand>` | Work with assets |\n\n### Session Management\n| Command | Description |\n|---|---|\n| `diff` | Show unsaved changes |\n| `save` | Write changes to Contentful as drafts |\n| `discard` | Discard unsaved changes |\n\n### Content Creation\n| Command | Description |\n|---|---|\n| `create from-json` | Create a page/article from `--json` / `--json-base64` |\n| `export from-json` | Export the open session as from-json |\n| `apply from-json` | Apply from-json to the open session |\n| `create taxonomy-from-json` | Batch-create tagType, articleType, and tag entries |\n| `create person-from-json` | Batch-create person entries from JSON |\n| `create person` | Create a person entry (draft). `--person-type-id` / `--person-type-slug` link a person type. `--indexed` and `--hidden` take `true` or `false`. |\n| `create person-type` | Create a personType entry (draft). `--person-page-template-id` links the profile template. |\n| `article-tags-from-json` | Set tags on articles from JSON |\n| `bulk-rtf-replace` | Find-replace in Rich Text across entry trees |\n| `create tag-type` | Create a tagType entry (draft) |\n| `create article-type` | Create an articleType entry (draft) |\n| `create tag` | Create a tag entry (draft) |\n| `create page` | Create a blank page interactively |\n| `create article` | Create a blank article interactively |\n| `create banner` | Create a site banner (draft) |\n| `create page-variant` | Create a page variant and open it |\n| `create page-test` | Create a page test (draft) |\n| `create custom-type` | Create a custom type and open it |\n\n### Batch Operations\n| Command | Description |\n|---|---|\n| `batch set <entryId>:field=value …` | Queue scalar updates by ID (page session OK mid-edit; then `save`) |\n| `batch diff` / `batch save` / `batch discard` | Review and commit batch session |\n| `batch run --json <json> or --json-base64 <encoded>` | Execute a JSON batch of operations |\n\n### Utilities\n| Command | Description |\n|---|---|\n| `asset review` | Audit visual assets (filename, alt, size, dimensions) |\n| `preview url` | Generate a page preview URL |\n| `preview showcase` | Generate a component/collection showcase URL |\n| `preview` | Generate preview URLs |\n\nAgent skills: `npx skills add @se-studio/skills`\n\n---\n\n## Global Options\n\n| Option | Description |\n|---|---|\n| `--space <name>` | Override the default space from config |\n| `--config <path>` | Path to `.contentful-cms.json` |\n| `--session <name>` | Named session for concurrent workflows |\n| `--json` | Machine-readable JSON output |\n| `--docs` | Print path to the full README |\n\n---\n\n## Further Reading\n\n- `cms-edit guide overview` — hosted/MCP getting started\n- `cms-edit help workflow` — step-by-step editing guide\n- `cms-edit help create-from-json` — single-shot page creation\n- `cms-edit help taxonomy-from-json` — batch taxonomy bootstrap\n- `cms-edit help fields-taxonomy` — tagType, articleType, and tag field reference\n- `cms-edit help batch-run` — JSON operation scripts and variable binding\n- `cms-edit help fields-page` — complete page field reference\n- `cms-edit --docs` — full README path (for reading in an editor)", "lookup": "# Flat lookup flags (`open`, `peek`, `resolve`)\n\ncms-edit resolves entries using **explicit flags** — not positional slugs. Provide **exactly one** primary lookup flag per command. Scope flags (for example `--tag-type-name` with `--tag-name`, or `--nav-id` with `--nav-item-title`) do not count as a second primary.\n\n`cms-edit nav open` is separate: pass **`--nav-id` or `--nav-name`**, never `--id`. `--nav-id` alone is not a `resolve` primary.\n\nRun `cms-edit index sync` once per space (or let commands auto-sync) so catalog types resolve from the local index.\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `cms-edit open` | Start an editing session |\n| `cms-edit peek` | Preview tree + root fields without a session |\n| `cms-edit resolve` | Print entry summary or `--json` (no session) |\n| `cms-edit nav open` | Open a `navigation` entry session |\n\n## Entry ID\n\n```bash\ncms-edit open --id 4xKj2abcDefGhijK\ncms-edit resolve --id 4xKj2abcDefGhijK\n```\n\n## Pages\n\n| Flag | Contentful field |\n|------|------------------|\n| `--page-slug` | `slug` (leading/trailing `/` stripped) |\n| `--page-title` | `title` |\n| `--page-cms-label` | `cmsLabel` |\n\n**Homepage (SE Studio standard):** Contentful slug is `index`; public URL is `/`. These are equivalent:\n\n```bash\ncms-edit open --page-slug /\ncms-edit open --page-slug /index\n```\n\n`list --type page` shows slugs as stored in Contentful. Non-standard homepage slugs (e.g. Pedestal `home`) are documented in the editor-pack `routing` resource; open with `--page-slug /` or the CMS slug from routing.\n\n```bash\ncms-edit open --page-slug /pricing/\ncms-edit peek --page-slug /pricing/\ncms-edit open --page-cms-label \"Hepatology Solutions Page\"\ncms-edit resolve --page-title \"Test page for nick\"\n```\n\n## Articles\n\n| Flag | Contentful field |\n|------|------------------|\n| `--article-slug` | `slug` |\n| `--article-title` | `title` |\n| `--article-cms-label` | `cmsLabel` |\n\n```bash\ncms-edit open --article-slug resources/publications/my-post\ncms-edit list --type article --article-type-name \"Publications\"\n```\n\n## Page variants\n\n| Flag | Contentful field |\n|------|------------------|\n| `--page-variant-slug` | `slug` |\n| `--page-variant-title` | `title` |\n| `--page-variant-cms-label` | `cmsLabel` |\n\n## Banners, page tests, custom types\n\n| Flag | Contentful field |\n|------|------------------|\n| `--banner-label` | `banner.cmsLabel` |\n| `--page-test-label` | `pageTest.cmsLabel` |\n| `--custom-type-slug` | `customType.slug` |\n| `--custom-type-name` | `customType.name` |\n\n```bash\ncms-edit open --banner-label \"Spring promo\"\ncms-edit open --custom-type-slug people\n```\n\n## Taxonomy\n\n| Type | Slug | Name | cmsLabel |\n|------|------|------|----------|\n| tag | `--tag-slug` | `--tag-name` | `--tag-cms-label` |\n| tagType | `--tag-type-slug` | `--tag-type-name` | — |\n| articleType | `--article-type-slug` | `--article-type-name` | — |\n\nScope tags under a tag type (optional):\n\n```bash\ncms-edit resolve --tag-name \"Hepatology\" --tag-type-name \"Therapeutic Area\"\ncms-edit list --type tag --tag-type-slug therapeutic-area\n```\n\nTemplates use **cmsLabel** only:\n\n```bash\ncms-edit open --template-label \"Default page template\"\ncms-edit resolve --label \"Default page template\" # alias for --template-label\n```\n\n## Navigation\n\nNavigation entries use the **`name`** field (not slug).\n\n| Flag | Resolves |\n|------|----------|\n| `--nav-id` | `navigation` entry ID |\n| `--nav-name` | `navigation.fields.name` |\n| `--nav-item-id` | `navigationItem` entry ID |\n| `--nav-item-title` | `navigationItem.fields.title` |\n\nWhen multiple nav items share a title, add **`--nav-id`** to scope `resolve` (do not use `--nav-id` alone on `resolve`):\n\n```bash\ncms-edit nav open --nav-id <navigation-entry-id>\ncms-edit nav open --nav-name \"Main header\"\ncms-edit resolve --nav-item-title \"Contact\" --nav-id <navigation-entry-id>\n```\n\n## List filters (index)\n\n```bash\ncms-edit list --type page\ncms-edit list --type article --article-type-slug resources/publications\ncms-edit list --type tag --tag-type-name \"Therapeutic Area\"\ncms-edit list --type navigation\ncms-edit list --type navigationItem\n```\n\nUse `--force-cma` to paginate via the Management API instead of the catalog.\n\n## Breaking changes (1.x → catalog flags)\n\n| Old | New |\n|-----|-----|\n| `cms-edit open /pricing` | `cms-edit open --page-slug pricing` |\n| `cms-edit peek /pricing` | `cms-edit peek --page-slug pricing` |\n| `cms-edit open <id> --id` | `cms-edit open --id <id>` |\n| `cms-edit nav open footer` | `cms-edit nav open --nav-name \"Footer\"` |\n| `cms-edit resolve --type tag --slug x` | `cms-edit resolve --tag-slug x` |\n\n## Ambiguity\n\nIf two entries share the same slug, title, or cmsLabel in the index, cms-edit prints all matching IDs and exits with an error. Fix duplicates in Contentful or resolve by `--id`.\n", "patterns": "# Help: patterns\n\nCensus **published** page and article construction from the Contentful Delivery API. Writes `page-patterns.json` and `page-patterns.md` for editor-pack and agents.\n\nLocal CLI only (same class as `editor-pack`). Hosted agents **read** `cms-edit://customer/page-patterns` after the pack is regenerated — they do not run generate.\n\n## Commands\n\n```bash\ncms-edit patterns generate --project-config cms-edit/<site>/project.json\ncms-edit patterns show --project-config cms-edit/<site>/project.json\n```\n\nRequires `CONTENTFUL_ACCESS_TOKEN` (Delivery token) in the app `.env.local`. Uses `spaceId` / `environment` from `project.json`.\n\nDefault output: `docs/cms-editor/<projectKey>/`. Then:\n\n```bash\ncms-edit editor-pack generate --project-config cms-edit/<site>/project.json\n```\n\n## What it captures\n\n- Slug-prefix page families (nested splits when a child prefix has ≥3 pages)\n- Article types (empty body vs chained rich text)\n- Location entries (even when `content` is empty)\n- Required/optional stack types, shared block IDs, clone slug\n\nDoes **not** rewrite brand playbooks. Structure only.\n\n## Agents\n\nAfter the pack includes `page-patterns.md`, read `cms-edit://customer/page-patterns` before `task-clone-page` or creating a page/article in a known family.\n", "person-from-json": "# cms-edit create person-from-json — Batch Author Import\n\n`create person-from-json` creates multiple `person` entries from a single JSON file. Use it for spreadsheet-to-CMS author imports and team directory bootstraps.\n\n```bash\ncms-edit create person-from-json --json '{...}' --dry-run\ncms-edit create person-from-json --json '{...}' --if-not-exists\n```\n\nAll entries are created as **drafts**. Nothing is published automatically.\n\n**Not transactional:** If the command fails partway through, entries created earlier remain in the space. Re-run with `--if-not-exists` to continue idempotently.\n\n---\n\n## JSON schema\n\n```jsonc\n{\n \"persons\": [\n {\n \"slug\": \"jane-smith\",\n \"name\": \"Jane Smith\",\n \"jobTitle\": \"Chief Medical Officer\",\n \"description\": \"Short card blurb\",\n \"emailAddress\": \"jane@example.com\",\n \"phoneNumber\": \"+1 555 0100\",\n \"bioMarkdown\": \"## Bio\\n\\nMarkdown converted to Rich Text.\",\n \"fields\": {\n \"location\": \"Boston\"\n }\n }\n ]\n}\n```\n\n| Key | Required | Description |\n|---|---|---|\n| `slug` | Yes | URL slug |\n| `name` | Yes | Display name and on-page heading. Document `<title>` uses this when `metaTitle` is empty |\n| `metaTitle` | No | Optional search-result title. Pass it in `fields`. Does not change the on-page heading |\n| `cmsLabel` | No | CMS label when the Person content type has that field (defaults to `name`). Omitted when the editor label is `name` |\n| `jobTitle` | No | Job title (CLI flags override JSON `fields` on single-entry create) |\n| `description` | No | Short description |\n| `emailAddress` | No | Email |\n| `phoneNumber` | No | Phone |\n| `bioMarkdown` | No | Bio as Markdown (converted to Rich Text `bio` field) |\n| `fields` | No | Additional Contentful field values |\n\nYou can also pass a full Rich Text document on `bio` inside `fields` instead of `bioMarkdown`.\n\n---\n\n## Single-entry alternative\n\n```bash\ncms-edit create person --slug jane-smith --name \"Jane Smith\" --job-title \"CMO\" --bio-file bio.md\ncms-edit create person --slug jane-smith --name \"Jane Smith\" --if-not-exists\n```\n\n---\n\n## Link authors to articles\n\nAfter import, link person IDs to articles in a session:\n\n```bash\ncms-edit open --article-slug blog/my-post\ncms-edit set @p0 authors <personId1>,<personId2> --links\ncms-edit diff && cms-edit save\n```\n\nOr batch-link in a `cms-edit batch run` ops file.\n\n---\n\n## Related commands\n\n| Command | Purpose |\n|---|---|\n| `cms-edit create person` | Create one person. Optional `--person-type-id`, `--person-type-slug`, `--indexed`, `--hidden` |\n| `cms-edit create person-type` | Create one person type (draft) |\n| `cms-edit create person … --if-not-exists` | Idempotent single create |\n| `cms-edit help fields` | Field overview |", "publish": "# Publish, unpublish, archive, revalidate\n\n`save` writes drafts. These commands publish only after a plan and an explicit yes.\n\nThe signed-in Contentful user must be allowed to publish, unpublish, or archive. If the role cannot, the command stops before anything is written. AI Editor cannot publish.\n\n## Plan, then yes\n\n```\ncms-edit publish plan\ncms-edit publish choose --plan <id> --scope all\ncms-edit publish apply --plan <id>\n```\n\n`plan` is read-only. If someone else also changed an entry, the plan waits. Ask whether to publish all of those entries or only this user's. Record that with `choose`. Apply only after the user says yes. The same pattern exists for `unpublish`, `archive`, and `revalidate`.\n\n## Targets\n\nOpen a page, then `publish plan` publishes that page's draft and changed assets and components, then the page. A component plan climbs through other components and stops at the first page, article, or other root. A template on that path is republished itself.\n\n```\ncms-edit publish plan --content-type schema\ncms-edit publish plan --content-type schema --since 2026-10-02\ncms-edit publish plan --id <entryId>\ncms-edit publish plan --from-session\n```\n\nSchema, template, and navigation publish through their own webhooks. Pages that use them are not republished. A schema that is linked only from an unpublished page is named in the plan.\n\nA site adds extra roots in `project.json`:\n\n```json\n\"publish\": { \"extraRootContentTypes\": [\"location\"] }\n```\n\nRegenerate the editor pack so hosted cms-edit reads `editor-pack/publish.json`.\n\n## Revalidate\n\n```\ncms-edit revalidate plan --id <pageId>\ncms-edit revalidate apply --plan <id>\n```\n\nThis refreshes production cache and does not publish. The host needs `REVALIDATION_SECRET` and `PRODUCTION_SITE_URL`.\n", "taxonomy-from-json": "# cms-edit create taxonomy-from-json — Batch Taxonomy Bootstrap\n\n`create taxonomy-from-json` creates multiple `tagType`, `articleType`, and `tag` entries from a single JSON file. It is the recommended way to bootstrap taxonomy for import scripts and publication workflows.\n\n```bash\ncms-edit create taxonomy-from-json --json '{...}' --dry-run\ncms-edit create taxonomy-from-json --json '{...}' --if-not-exists\n```\n\nProcessing order: **tagTypes → articleTypes → tags** (tags depend on tagTypes).\n\nAll entries are created as **drafts**. Nothing is published automatically.\n\n**Not transactional:** If the command fails partway through (e.g. a tag fails validation), entries created earlier in the same run remain in the space. Re-run with `--if-not-exists` to continue idempotently, or fix the JSON and run again.\n\n**Not parallel-safe:** `--if-not-exists` is check-then-create. Running two imports concurrently for the same slug can create duplicates. Process items sequentially per slug, or re-run to converge.\n\n---\n\n## JSON schema\n\n```jsonc\n{\n \"tagTypes\": [\n {\n \"slug\": \"presentation-type\",\n \"name\": \"Presentation Type\",\n \"fields\": { \"show\": true }\n }\n ],\n \"articleTypes\": [\n {\n \"slug\": \"resources/publications\",\n \"name\": \"Publications\",\n \"cmsLabel\": \"Publications\",\n \"fields\": { \"indexed\": true, \"hidden\": false }\n }\n ],\n \"tags\": [\n {\n \"slug\": \"asco-2025\",\n \"name\": \"ASCO 2025\",\n \"tagTypeSlug\": \"conference-venue\",\n \"fields\": { \"description\": \"ASCO Annual Meeting 2025\" }\n }\n ]\n}\n```\n\nEach item supports the same field shorthands as single-entry creates. See `cms-edit help fields-taxonomy` for the full field reference and link shorthand table.\n\n| Key | Required on item | Description |\n|---|---|---|\n| `slug` | Yes | URL slug |\n| `name` | Yes | Display name |\n| `cmsLabel` | No | CMS label (articleType/tag) |\n| `fields` | No | Raw Contentful field values |\n| `tagTypeSlug` / `tagTypeId` | Tags only | Parent tagType link |\n\nTop-level link shorthands (`templateId`, `featuredImageId`, `topContentIds`, etc.) can also appear on each item.\n\n---\n\n## Options\n\n| Option | Description |\n|---|---|\n| `--json <json> or --json-base64 <encoded>` | Path to taxonomy JSON (required) |\n| `--if-not-exists` | Skip creation when slug already exists; return existing ID |\n| `--dry-run` | Validate all entries and link targets without writing |\n\n---\n\n## Output\n\nHuman mode prints a summary per entry. JSON mode (`CMS_EDIT_JSON=1` or `--json-output`):\n\n```json\n{\n \"ok\": true,\n \"tagTypes\": [{ \"id\": \"...\", \"slug\": \"...\", \"contentType\": \"tagType\", \"status\": \"created\" }],\n \"articleTypes\": [{ \"id\": \"...\", \"slug\": \"...\", \"contentType\": \"articleType\", \"status\": \"existing\" }],\n \"tags\": [{ \"id\": \"...\", \"slug\": \"...\", \"contentType\": \"tag\", \"status\": \"created\" }]\n}\n```\n\n---\n\n## Idempotent import pattern\n\nCombine batch bootstrap with `create … --if-not-exists` and `resolve` for script-friendly imports:\n\n```bash\n# One-time taxonomy bootstrap\ncms-edit create taxonomy-from-json --json '{...}' --if-not-exists\n\n# Look up IDs in scripts\ncms-edit resolve --tag-type-slug presentation-type --json\ncms-edit resolve --tag-slug asco-2025 --json\n\n# Add a single entry idempotently\ncms-edit create tag --slug new-tag --name \"New Tag\" --tag-type presentation-type --if-not-exists\n```\n\n---\n\n## Related commands\n\n| Command | Purpose |\n|---|---|\n| `cms-edit create tag-type` | Create one tagType |\n| `cms-edit create article-type` | Create one articleType |\n| `cms-edit create tag` | Create one tag |\n| `cms-edit create … --if-not-exists` | Idempotent single-entry create |\n| `cms-edit help fields-taxonomy` | Full field reference |\n", "workflow": "# cms-edit — Standard Editing Workflow\n\nThe standard workflow is: **open → snapshot → read/edit → diff → save**.\n\n---\n\n## Step 1: Discover What Exists\n\n```bash\n# List all pages with slugs\ncms-edit list --type page\n\n# Search for entries by text\ncms-edit search \"hepatology\"\n```\n\n---\n\n## Step 2: Open a Page or Article\n\n```bash\ncms-edit open --page-slug /solutions/hepatology\n# or by entry ID:\ncms-edit open --id 4xKpzQ2abc123\n# include template menu/footer/nav (off by default):\ncms-edit open --include-chrome --page-slug /solutions/hepatology\n```\n\n`open` fetches the page/article tree (and the template entry) and saves it to a local session file. It does **not** walk template menu/footer/navigation unless you pass `--include-chrome`. All subsequent commands operate on this session without re-fetching from Contentful until you `save`.\n\n### Critical: do not re-open while edits are staged\n\n`set` / `rtf` / parent links from `add` stay in the session until `save`. Calling `open` again **replaces** the session.\n\n| Situation | Command |\n|-----------|---------|\n| Session has unsaved changes, need tree again | `cms-edit open --resume` (no refetch; keeps staged edits) |\n| Intentionally abandon staged work and load another entry | `cms-edit open --overwrite --confirm-discard --id <id>` (or `discard` then `open`) |\n| Plain `open` while dirty | **Hard fail** with remediation steps |\n\n```bash\ncms-edit open --resume\ncms-edit diff\ncms-edit save\n# or abandon:\ncms-edit discard\ncms-edit open --id <other>\n```\n\n**Output:**\n```\n✓ Opened /solutions/hepatology (12 entries)\n\n@c0 page [draft] solutions/hepatology\n @c1 component [draft] Image Hero\n @c2 component [draft] Text Block\n @c3 collection [draft] Timeline\n @c4 component [draft] Timeline Item 1\n @c5 component [draft] Timeline Item 2\n @c6 component [draft] Disease Areas\n```\n\n---\n\n## Step 3: Inspect the Content Tree\n\n```bash\n# Re-print the tree at any time\ncms-edit snapshot\n\n# Read all fields on an entry\ncms-edit read @c2\n\n# Read a specific field\ncms-edit read @c2 heading\n```\n\n**Example `read @c2` output:**\n```\n@c2 component [draft] Text Block\n heading: \"Our Approach\"\n body: (rich text, 2 paragraphs)\n backgroundColour: null\n```\n\n---\n\n## Step 4: Edit Fields\n\n### Scalar fields (text, boolean, number)\n```bash\ncms-edit set @c2 heading \"New Heading\"\ncms-edit set @c2 backgroundColour \"Navy\"\n```\n\n### Mid-session by Contentful entry ID (e.g. media autoplay)\n\nYou do **not** need to leave the page session:\n\n```bash\n# Bare entry ID (fetched into the session if not in the tree)\ncms-edit set 5uMh54rIsJRFRQSXDuJiG autoplay true\n\n# Same shape as batch set — stays on the current page session\ncms-edit set 5uMh54rIsJRFRQSXDuJiG:autoplay=true 5uMh54rIsJRFRQSXDuJiG:loop=true\n# or: cms-edit batch set … (also allowed mid-page; then cms-edit save)\n```\n\n### Entry links: `--link` vs `--links` (strict)\n\n| Field shape | Flag | Notes |\n|-------------|------|--------|\n| Single Entry link | `--link` | Exactly one id |\n| Array of Entry links | `--links` | Full replace of the array |\n| Append to array | `--links --append` | Add ids |\n| Wrong flag | hard error | Never silently coerces |\n\n```bash\ncms-edit set @c1 visual <mediaEntryId> --link\ncms-edit set @c2 contents <id1>,<id2> --links\n# To change one array item: read the array, edit the list, write all ids back with --links\n```\n\n### Rich text fields\n```bash\n# Inline markdown (short content)\ncms-edit rtf @c2 body \"## Overview\\n\\nFirst paragraph.\\n\\nSecond paragraph.\"\n\n# From a file (long content)\ncms-edit rtf @c2 body --content \"# ...\"\n```\n\n### Multi-value: replacing inline content\n```bash\n# Replace a specific text phrase in a rich text field\ncms-edit rtf replace @c2 body --find \"old phrase\" --replace-plain \"new phrase\"\n```\n\n### Links (CTAs)\n```bash\n# Add a new external CTA link\ncms-edit links add @c2 --type external --label \"Learn More\" --href \"https://example.com\"\n\n# Add an internal link (to another page by slug)\ncms-edit links add @c2 --type internal --label \"Our Team\" --slug /team\n```\n\n### Adding new entries\n```bash\n# Add a new component to the page's content array\ncms-edit add HeroSimple component\n\n# Add a child item to a collection\ncms-edit add Generic component --parent @c3\n\n# Add after a specific entry\ncms-edit add Generic component --after @c5\n```\n\n**Important:** After any `add` or `remove`, re-run `cms-edit snapshot` — @ref numbers change after structural edits.\n\n---\n\n## Step 5: Review Changes\n\n```bash\ncms-edit diff\n```\n\nShows a summary of which entries have been modified and which fields changed.\n\n---\n\n## Step 6: Save\n\n```bash\ncms-edit save\n```\n\nWrites all changes to Contentful as **drafts**. Nothing is published. A human must review and publish in the Contentful web app.\n\n---\n\n## Common Patterns\n\n### Edit a specific component's heading and body\n```bash\ncms-edit open --page-slug /about\ncms-edit snapshot\ncms-edit set @c3 heading \"Updated heading\"\ncms-edit rtf @c3 body \"New body text\\n\\nSecond paragraph.\"\ncms-edit diff\ncms-edit save\n```\n\n### Add a new section to an existing page\n```bash\ncms-edit open --page-slug /home\ncms-edit snapshot\n# Add a new Text Block after @c2\ncms-edit add TextBlock component --after @c2\ncms-edit snapshot # re-snapshot to see the new ref\ncms-edit set @c3 heading \"New Section\"\ncms-edit rtf @c3 body \"Section content.\\n\\nMore detail.\"\ncms-edit save\n```\n\n### Fix a field on multiple pages\nUse `--session` to work on multiple pages without losing state:\n```bash\ncms-edit --session fix-1 open --page-slug /page-one\ncms-edit --session fix-1 set @c1 heading \"Fixed\"\ncms-edit --session fix-1 save\n\ncms-edit --session fix-2 open --page-slug /page-two\ncms-edit --session fix-2 set @c1 heading \"Fixed\"\ncms-edit --session fix-2 save\n```\n\n---\n\n## Creating New Pages\n\nFor creating complete new pages with components, use `create from-json` instead of the interactive `add` workflow:\n\n```bash\ncms-edit help create-from-json\n```\n\n---\n\n## Status Badges\n\n| Badge | Meaning |\n|---|---|\n| `[published]` | Entry is live in Contentful (no draft changes) |\n| `[draft]` | Entry has unpublished changes or has never been published |\n| `[changed]` | Entry has been modified in this session (unsaved) |\n| `[pending]` | Entry is scheduled for deletion in this session |\n" };
2
+ export const EMBEDDED_HELP_TOPICS = { "article-tags-from-json": "# cms-edit article-tags-from-json — Batch Article Tagging\n\n`article-tags-from-json` sets the `tags` link array on one or more articles from a JSON file. Tag slugs are resolved via the local index — run `cms-edit index sync` first.\n\n```bash\ncms-edit index sync\ncms-edit article-tags-from-json --json '{...}' --dry-run\ncms-edit article-tags-from-json --json '{...}'\n```\n\nAll writes create **drafts** only.\n\n**Batch behaviour:** Processes every article in the file. Failures on one article do not stop the rest — the command exits non-zero if any item failed and prints which slugs succeeded vs failed.\n\n---\n\n## JSON schema\n\n```jsonc\n{\n \"articles\": [\n {\n \"articleSlug\": \"resources/blog/my-post\",\n \"tagSlugs\": [\"asco-2025\", \"oncology\"],\n \"append\": false\n },\n {\n \"articleSlug\": \"resources/blog/another-post\",\n \"tagSlugs\": [\"press-release\"],\n \"append\": true\n }\n ]\n}\n```\n\n| Key | Required | Description |\n|---|---|---|\n| `articleSlug` | Yes | Article slug (with or without leading `/`) |\n| `tagSlugs` | Yes | Tag slugs to apply |\n| `append` | No | When `true`, append to existing tags (deduped). Default: replace |\n\n---\n\n## Session alternative (single article)\n\n```bash\ncms-edit open --article-slug resources/blog/my-post\ncms-edit set @p0 tags <id1>,<id2> --links\ncms-edit diff && cms-edit save\n```\n\nResolve tag IDs: `cms-edit resolve --tag-slug <slug> --json`\n\n---\n\n## Related commands\n\n| Command | Purpose |\n|---|---|\n| `cms-edit create tag` | Create a new tag |\n| `cms-edit create taxonomy-from-json` | Bootstrap tagTypes and tags |\n| `cms-edit help taxonomy-from-json` | Taxonomy batch import |", "asset-review": "# Asset review\n\n`cms-edit asset review` audits visual assets (images, videos, Lottie JSON) from the local index.\n\n## Sync first\n\n```bash\ncms-edit index sync\n```\n\nDefault: **Preview API** (includes drafts). Use `--published` on sync/review for delivery-only content.\n\n## Run\n\n```bash\ncms-edit asset review\ncms-edit --json-output asset review --space brightline > media-review.json\ncms-edit --json-output asset review --include-usage --usage-limit 5\ncms-edit --json-output asset review --include-usage --include-passing --usage-limit 0 > image-inventory.json\n```\n\n`--include-usage` adds slug-bearing page/article ancestry per asset (slower; uses CMA walk-up). By default only the first **50** assets in the report get usages (`--usage-limit 50`). Raise the limit for larger batches, or pass `--usage-limit 0` for unlimited (fine locally; hosted MCP may timeout on large spaces). Use with `--include-passing` for a full image inventory (replaces the old `audit images` command).\n\n## Checks\n\n- Filename quality (stock IDs, camera defaults, generic names)\n- Alt text (`description` on asset)\n- Dimensions (max width, default 2000px; SVG/Lottie skipped)\n- File size (defaults: 800 KB images, 8 MB video, 400 KB Lottie)\n- Animated GIF (`image/gif`)\n- No media wrapper (warning — may still be used in rich text)\n\n## Options\n\n| Flag | Default |\n|------|---------|\n| `--max-width` | 2000 |\n| `--max-image-kb` | 800 |\n| `--max-video-mb` | 8 |\n| `--max-lottie-kb` | 400 |\n| `--include-passing` | off (failures only) |\n| `--include-usage` | off (no usage ancestry in JSON) |\n| `--usage-limit` | 50 when `--include-usage` is set (`0` = unlimited) |\n| `--published` | off (Preview index) |\n\nExit code **1** when any asset has failing issues.\n\n## Spreadsheet\n\nUse the **contentful-cms-media-review** skill with `--json` output to build an Excel workbook.\n\n## Fix alt text\n\n```bash\ncms-edit asset set-description <asset-id> \"Descriptive alt text\"\n```", "batch-run": "# cms-edit batch run — JSON Operation Scripts\n\n`batch run` executes a sequence of `cms-edit` operations from a JSON file. It is best suited for **patching fields on existing entries** — for creating complete new pages, use `create from-json` instead.\n\n```bash\ncms-edit batch run --json '[...]'\ncms-edit batch run --json '[...]' --dry-run # validate without saving\n```\n\n---\n\n## Batch File Format\n\nA batch file is a JSON array of operation objects:\n\n```json\n[\n { \"cmd\": \"open\", \"args\": [\"/solutions\"] },\n { \"cmd\": \"set\", \"args\": [\"@c1\", \"heading\", \"New Heading\"] },\n { \"cmd\": \"rtf\", \"args\": [\"@c2\", \"body\", \"Updated body.\\n\\nSecond paragraph.\"] },\n { \"cmd\": \"save\" }\n]\n```\n\nEach operation has:\n\n| Field | Type | Description |\n|---|---|---|\n| `cmd` | string | The operation to execute (see Supported Commands) |\n| `args` | string[] | Positional arguments (same as CLI args) |\n| `opts` | object | Named options (same as CLI flags, without `--`) |\n| `onError` | `\"stop\"` \\| `\"continue\"` | What to do if this step fails. Default: `\"stop\"` |\n| `as` | string | Variable name to bind the ref assigned by an `add` op (e.g. `\"$item\"`) |\n\n---\n\n## Supported Commands\n\n### `open`\nLoad a page or article by slug.\n```json\n{ \"cmd\": \"open\", \"args\": [\"/solutions\"] }\n```\n\n### `set`\nSet a scalar field on an entry.\n```json\n{ \"cmd\": \"set\", \"args\": [\"@c1\", \"heading\", \"New Heading\"] }\n{ \"cmd\": \"set\", \"args\": [\"@c2\", \"backgroundColour\", \"Navy\"] }\n{ \"cmd\": \"set\", \"args\": [\"@c3\", \"heading\", null] }\n```\n\n### `rtf`\nSet a rich text field from a markdown string.\n```json\n{ \"cmd\": \"rtf\", \"args\": [\"@c2\", \"body\", \"## Heading\\n\\nParagraph text.\"] }\n```\n\n### `rtf-replace`\nFind and replace text within an existing rich text field.\n```json\n{\n \"cmd\": \"rtf-replace\",\n \"args\": [\"@c2\", \"body\"],\n \"opts\": {\n \"find\": \"old phrase\",\n \"replacePlain\": \"new phrase\",\n \"mode\": \"all\"\n }\n}\n```\nOptions: `find` (required), `replacePlain`, `replaceMarkdown`, `mode` (`\"all\"` or `\"exactlyOne\"`), `ignoreMarks`, `tableCol`, `tableRow`, `section`.\n\n### `add`\nCreate a new entry and link it into the tree.\n```json\n{ \"cmd\": \"add\", \"args\": [\"HeroSimple\", \"component\"] }\n{ \"cmd\": \"add\", \"args\": [\"Generic\", \"component\"], \"opts\": { \"parent\": \"@c3\" } }\n{ \"cmd\": \"add\", \"args\": [\"Generic\", \"component\"], \"opts\": { \"after\": \"@c5\" } }\n{ \"cmd\": \"add\", \"args\": [\"Generic\", \"component\"], \"opts\": { \"target\": \"topContent\" } }\n```\nOptions: `parent` (ref of a collection to add inside), `after` (ref to insert after), `target` (field name, default `\"content\"`), `existingId` (link an existing entry instead of creating).\n\n### `links-add`\nCreate a new CTA link and attach it to an entry's `links` field.\n```json\n{ \"cmd\": \"links-add\", \"args\": [\"@c1\"], \"opts\": { \"type\": \"external\", \"label\": \"Learn More\", \"href\": \"https://example.com\", \"variant\": \"link\" } }\n{ \"cmd\": \"links-add\", \"args\": [\"@c1\"], \"opts\": { \"type\": \"internal\", \"label\": \"Contact\", \"slug\": \"/contact\" } }\n```\nOptions: `type`, `label`, `href`, `slug`, `id`, `assetId`, `variant`.\n\n### `save`\nWrite all modified entries to Contentful as drafts.\n```json\n{ \"cmd\": \"save\" }\n```\n\n---\n\n## Variable Binding — Safe `add` + `set` Patterns\n\n**The problem:** After an `add parent @cN` operation, all entries that come after `@cN` in the depth-first tree are renumbered. Any `set` using a hardcoded `@cM` ref may then target the wrong entry, and the batch reports `✓` — a silent false positive.\n\n**The solution:** Use `\"as\": \"$varname\"` on the `add` op to capture the assigned ref, then use `\"$varname\"` in subsequent `set`/`rtf` args:\n\n```json\n[\n { \"cmd\": \"open\", \"args\": [\"/solutions/hepatology\"] },\n {\n \"cmd\": \"add\",\n \"args\": [\"Generic\", \"component\"],\n \"opts\": { \"parent\": \"@c3\" },\n \"as\": \"$item1\"\n },\n { \"cmd\": \"set\", \"args\": [\"$item1\", \"heading\", \"2017 — Cohort Launch\"] },\n { \"cmd\": \"rtf\", \"args\": [\"$item1\", \"body\", \"The cohort was established.\\n\\nInitial enrolment began.\"] },\n {\n \"cmd\": \"add\",\n \"args\": [\"Generic\", \"component\"],\n \"opts\": { \"parent\": \"@c3\" },\n \"as\": \"$item2\"\n },\n { \"cmd\": \"set\", \"args\": [\"$item2\", \"heading\", \"2019 — First Publication\"] },\n { \"cmd\": \"save\" }\n]\n```\n\n`$item1` and `$item2` always refer to the entries that were just created, regardless of how subsequent adds shift ref numbers.\n\n---\n\n## Ref Renumbering — What Happens Under the Hood\n\nAfter any `add parent @cN`, refs are reassigned in depth-first traversal order from the root. Items that came *after* `@cN` in the tree get bumped forward.\n\n**Example:** Page with 10 entries (`@c0`–`@c9`). Timeline collection is `@c8`, Disease Areas is `@c9`.\n\n| After add | New item ref | Disease Areas ref |\n|---|---|---|\n| Initial | — | @c9 |\n| Add 1 to @c8 | @c9 | @c10 |\n| Add 2 to @c8 | @c10 | @c11 |\n| Add 3 to @c8 | @c11 | @c12 |\n\nIf you write `set @c10 heading \"...\"` after Add 1, you are setting Disease Areas — not the new item. The batch reports `✓` because the field was set successfully, just on the wrong entry.\n\n**The tool warns when this happens:**\n```\n ✓ [3] add — Created component \"Generic\" as @c9 (ID: abc123)\n ⚠ Refs renumbered after add-to-parent. Use \"as\": \"$varname\" on the add op and \"$varname\" in subsequent args to avoid ref drift.\n```\n\n---\n\n## Safe Patterns\n\n### Pattern A — Variable binding (recommended)\nUse `\"as\": \"$name\"` and `\"$name\"` in args. Refs always point to the right entry.\n\n### Pattern B — All adds first, then sets\nDo all `add` operations in one batch. Re-snapshot to see final refs. Write a second batch with `set`/`rtf` on the stable refs.\n\n```bash\n# Batch 1: add all items\ncms-edit batch run --json '[...]'\n\n# Inspect final refs\ncms-edit snapshot\n\n# Batch 2: set fields using the stable refs from snapshot\ncms-edit batch run --json '[...]'\n```\n\n### Pattern C — Append to end only\nIf new items go at the end of the tree (after all existing entries), no existing refs are displaced. Use `after` to append at the tail.\n\n### Pattern D — Use `create from-json` for new pages\nFor building complete page trees from scratch, `create from-json` is safer than a `run` batch — it manages internal refs automatically and validates slugs before writing.\n\n---\n\n## Complete Example — Patching Fields on an Existing Page\n\n```json\n[\n { \"cmd\": \"open\", \"args\": [\"/solutions\"] },\n { \"cmd\": \"set\", \"args\": [\"@c1\", \"heading\", \"Evidence-Driven Solutions\"] },\n { \"cmd\": \"set\", \"args\": [\"@c1\", \"preHeading\", \"What We Do\"] },\n {\n \"cmd\": \"rtf\",\n \"args\": [\n \"@c2\",\n \"body\",\n \"We partner with life sciences companies.\\n\\nOur platform integrates real-world data across disease areas.\"\n ]\n },\n { \"cmd\": \"save\" }\n]\n```\n\nRun:\n```bash\ncms-edit batch run --json '[...]' --dry-run # validate first\ncms-edit batch run --json '[...]' # apply\ncms-edit open --page-slug /solutions # inspect result\n```\n\n---\n\n## Error Handling\n\nBy default, execution stops on the first error. Use `\"onError\": \"continue\"` to keep running:\n\n```json\n[\n { \"cmd\": \"open\", \"args\": [\"/solutions\"] },\n { \"cmd\": \"set\", \"args\": [\"@c99\", \"heading\", \"Test\"], \"onError\": \"continue\" },\n { \"cmd\": \"save\" }\n]\n```\n\nThe final exit code is non-zero if any step failed, even with `\"continue\"`.\n", "batch": "# Batch edit by entry ID\n\nEdit multiple Contentful entries by ID with scalar field updates. Useful for link variant sweeps, media flags (`autoplay`/`loop`), navigation tweaks, and other standalone updates.\n\n## Sessions\n\n| Context | What happens |\n|---------|----------------|\n| Default CLI (`--session` omitted) | Uses session name **`batch`** (does not touch a separate page session) |\n| Page session already open (e.g. MCP `_mcp`) | `batch set` **stages into that page session** — same `diff` / `save` as article work. Do **not** re-`open`. Do **not** `batch discard` (use `cms-edit discard` only if abandoning everything). |\n| Explicit isolation | `cms-edit --session link-sweep batch set …` |\n\nYou can also stay on the page session without `batch`:\n\n```bash\ncms-edit set <entryId>:autoplay=true <entryId>:loop=true\n# or\ncms-edit set <entryId> autoplay true\n```\n\n## Workflow\n\n```bash\n# Queue scalar field updates (one or more entryId:field=value tokens)\ncms-edit batch set 3my7n2M84OrhOaaSLHVHvo:variant=link 7MjsLmOq52CR9C5xrYlcub:variant=button\n\n# Review pending changes\ncms-edit batch diff\n\n# Write all changes as drafts (single save)\ncms-edit batch save\n\n# Or discard without saving (pure batch sessions only)\ncms-edit batch discard\n```\n\nMid-page (MCP / open article session):\n\n```bash\ncms-edit batch set 5uMh54rIsJRFRQSXDuJiG:autoplay=true\ncms-edit diff\ncms-edit save\n```\n\n## Token format\n\n```\n<entryId>:<fieldId>=<value>\n```\n\n- **entryId** — Contentful entry ID (alphanumeric, optional `_`/`-`, length 1–64; **not** fixed at 22 characters)\n- **fieldId** — field name on that entry's content type\n- **value** — literal token (no shell quotes needed for simple strings). Coercion follows the field type from Contentful:\n - **Symbol** / **Text** — always stored as strings (e.g. `order=42` stays `\"42\"`)\n - **Integer** / **Number** — parsed as numbers\n - **Boolean** — `true` / `false`\n - **null** — literal `null`\n - Fields with enum validations (e.g. `variant`) must match allowed values\n\nExamples:\n\n```bash\ncms-edit batch set abcdefghijklmnopqrstuv:variant=link\ncms-edit batch set 5uMh54rIsJRFRQSXDuJiG:autoplay=true\ncms-edit batch set abcdefghijklmnopqrstuv:cmsLabel=Footer CTA\n```\n\n## Link variant sweep\n\nWhen you already know link entry IDs (from `cms-edit read @cN links` or `cms-edit links list @cN`):\n\n```bash\ncms-edit batch set \\\n idOne123456789012345678:variant=link \\\n idTwo123456789012345678:variant=button\ncms-edit batch diff\ncms-edit batch save\n```\n\nWhen a page is already open, prefer `cms-edit links set @cN <index> variant link` instead.\n\n## Content type schema cache\n\nField types and enum validations are loaded from the Contentful Management API. Results are cached:\n\n- In the **session file** (`contentTypes` on the session) so `batch set` → save reuse schema without extra API calls\n- On disk at `~/.contentful-cms/content-types/<spaceId>/<environment>/` (24-hour TTL)\n\n## v1 limits\n\n- **Scalar fields only** — no rich text, entry links, asset links, or link arrays\n- **Draft-only** — same as `cms-edit save`; never publishes\n- **No cross-entry link arrays** — use page session + `cms-edit set --links` for parent arrays\n- **Partial save on failure** — if one entry fails during `batch save`, earlier entries may already be saved; the CLI lists failures and reminds you to run diff for remaining changes\n", "bulk-rtf-replace": "# cms-edit bulk-rtf-replace — Sitewide Rich Text Find-Replace\n\n`bulk-rtf-replace` finds plain text in Rich Text fields across page and article entry trees (including linked components and collections) and replaces it in one pass.\n\n```bash\ncms-edit bulk-rtf-replace --find \"Old Company Name\" --replace-plain \"New Company Name\" --dry-run\ncms-edit bulk-rtf-replace --find \"Old Company Name\" --replace-plain \"New Company Name\"\n```\n\n**Always dry-run first** and confirm the match count with the user before saving.\n\nAll saves create **drafts** only.\n\n---\n\n## How it works\n\n1. Fetches root entries (`page` and `article` by default) from Contentful\n2. For each root, loads the full linked entry tree\n3. Scans every Rich Text field on every entry in the tree\n4. Applies `replace-plain` (same engine as `cms-edit rtf replace`)\n5. Saves each modified entry as a draft\n\n---\n\n## Options\n\n| Option | Description |\n|---|---|\n| `--find <text>` | Plain text to find (required) |\n| `--replace-plain <text>` | Plain text replacement (required) |\n| `--include <types>` | Root content types (default: `page,article`) |\n| `--prefix <slug>` | Only roots whose slug starts with this prefix (e.g. `/blog`) |\n| `--limit <n>` | Max root entries total across all `--include` types (default: 500) |\n| `--dry-run` | Report matches without saving |\n\n---\n\n## Scoped replace\n\n```bash\n# Blog articles only\ncms-edit bulk-rtf-replace \\\n --find \"2024\" \\\n --replace-plain \"2025\" \\\n --include article \\\n --prefix resources/blog \\\n --dry-run\n```\n\n---\n\n## JSON output\n\n```bash\nCMS_EDIT_JSON=1 cms-edit bulk-rtf-replace --find \"foo\" --replace-plain \"bar\" --dry-run\n```\n\nDry-run response includes `entriesWithMatches`, `matches`, and per-entry `changes`.\n\n---\n\n## When to use sessions instead\n\nFor a **small** number of entries, or when you need `diff` review per page:\n\n```bash\ncms-edit open --page-slug /about\ncms-edit rtf replace @c1 body --find \"…\" --replace-plain \"…\"\ncms-edit diff && cms-edit save\n```\n\nFor **scalar** fields on many entries, prefer `cms-edit batch set`.\n\n---\n\n## Related resources\n\n- Editor task: `task-bulk-find-replace` (confirmation gates)\n- `cms-edit search <text>` — discover affected entries before bulk replace", "create-editor-entries": "# cms-edit create — banners, variants, tests, custom types\n\nThese commands create **drafts**. Nothing is published.\n\n| Command | Opens a session | Idempotent key |\n|---|---|---|\n| `create banner` | No | `--if-not-exists` matches `cmsLabel` |\n| `create page-test` | No | `--if-not-exists` matches `cmsLabel` |\n| `create page-variant` | Yes | `--if-not-exists` matches slug |\n| `create custom-type` | Yes | `--if-not-exists` matches slug |\n\nEnums (`theme`, `placement`, `dismissType`) are read from the live content type. `placement` is set only when that field exists.\n\n## Banner\n\nBanners are site-wide. The site loads every `banner` entry. Targeting is `showOn`, `hideOn`, and URL patterns.\n\n```bash\ncms-edit create banner --cms-label \"Spring promo\" --message \"Free delivery this week\" \\\n --theme Information --cta-text \"Shop\" --cta-external https://example.com/shop\n```\n\n## Page variant and alternate content\n\nA variant points at an original page. Content swaps are `alternatePageContent` entries on `alternativeContents`, not a second page body. Omit `--replacement-id` to remove the source block.\n\n```bash\ncms-edit create page-variant --cms-label \"Home B\" --slug home-b --original-page / \ncms-edit add \"Hero swap\" --content-type alternatePageContent --source-id <componentId> --replacement-id <otherId>\ncms-edit save\n```\n\nOn a page variant, `add` accepts only `alternatePageContent`. A component or collection belongs on the original page.\n\n## Page test\n\n```bash\ncms-edit create page-test --cms-label \"Home hero test\" --control <pageId> \\\n --variant <pageVariantId> --enabled\n```\n\n## Custom type\n\nRequired featured image. The new entry opens as the session root so `add` can fill `topContent` or `indexPageTopContent`.\n\n```bash\ncms-edit create custom-type --cms-label \"People\" --name \"People\" --slug people \\\n --index-page-name \"Team\" --index-page-title \"Team\" --index-page-description \"The team\" \\\n --featured-image <assetId>\n```\n\n## Open existing entries\n\n```bash\ncms-edit open --banner-label \"Spring promo\"\ncms-edit open --page-test-label \"Home hero test\"\ncms-edit open --custom-type-slug people\ncms-edit open --page-variant-slug home-b\n```\n", "create-from-json": "# cms-edit create from-json — Complete Guide\n\n`create from-json` creates a complete new page or article — including all components, collections, and CTA links — from `--json`, `--json-base64`, or **`--staged`** (hosted). It is the recommended way to create new pages on hosted MCP.\n\n**Agents:** do not use a local `cms-edit` binary, `--file`, or stdin. **Fields over ~8k must not go through `--json` / `--json-base64` / `--content`.** Hosted MCP rejects those over 8192 bytes. Write the JSON on disk → `cms_edit_request_staged_upload` with `kind=json` → curl → `create from-json --staged <id> --dry-run --strict`. Dry-run peeks without consuming the slot. If the wrapper schema has no `kind`, use `cms_edit` `[\"staged-upload\", \"request\", \"--kind\", \"json\", \"--file-name\", \"...\", \"--mime\", \"application/json\"]`, then curl, then `create from-json --staged`.\n\nAlso: `export from-json` (open session → same JSON with `existingId` / `version`) and `apply from-json` (`--staged` supported).\n\n```\ncms_edit [\"help\", \"create-from-json\"]\ncms_edit_help { \"topic\": \"create-from-json\" }\ncms_edit [\"create\", \"from-json\", \"--json\", \"{...}\", \"--dry-run\", \"--strict\"]\n# or, when the payload is over 8k:\ncms_edit [\"create\", \"from-json\", \"--staged\", \"<id>\", \"--dry-run\", \"--strict\"]\n```\n\n## Validation traps (fail before CMA)\n\n- Nested tree key is **`components`**, not `content` (`content` is a page field — empty page).\n- Discriminator is **`type`**, not `componentType` / `collectionType`.\n- **`components` must be non-empty**.\n- Unknown nested keys fail (`html` vs `htmlContent` — run `schema htmlComponent` for this space). Put vendor libraries on `fields.externalScripts` (string array), not inside HTML.\n- CTA text is **`label`**, not `linkText`.\n- Quoted `set @c1:field=\"value\"` is rejected (quotes would be stored). Use `[\"set\", \"@c1\", \"field\", \"value\"]`.\n\nDry-run does not call CMA (slug checks use the local CDA index).\n\n---\n\n```bash\ncms-edit create from-json --json '{...}'\ncms-edit create from-json --json '{...}' --dry-run # validate without writing\ncms-edit create from-json --json '{...}' --strict # fail on unknown JSON keys\ncms-edit create from-json --json '{...}' --if-not-exists # return existing ID when slug exists\n```\n\nRun `cms-edit index sync` before using any `*AssetFilename` shorthand (index-backed exact `file.fileName` lookup).\n\n---\n\n## Full JSON Schema\n\n```jsonc\n{\n // \"page\" (default) or \"article\". Auto-detected as \"article\" if articleTypeId is present.\n \"type\": \"page\",\n\n // Required. The URL slug. A single leading slash is stripped silently (`/home` → `home`).\n // Trailing or extra slashes still warn. Store CMS slugs without a leading slash.\n \"slug\": \"/solutions/hepatology\",\n\n // Required. The page title (also used as cmsLabel if cmsLabel is omitted).\n \"title\": \"Hepatology Solutions\",\n\n // Optional. SEO meta description.\n \"description\": \"Evidence generation for hepatology research.\",\n\n // Optional. Override the Contentful entry label shown in the entry list.\n \"cmsLabel\": \"Hepatology Solutions Page\",\n\n // Page-only: link to an existing template entry by ID.\n \"templateId\": \"4xKpzQ2abc123\",\n\n // Page/article: featured image — asset ID (either key; warn if both differ).\n \"featuredImage\": \"7yBnmR9xyz456\",\n // \"featuredImageId\": \"7yBnmR9xyz456\", // alias\n\n // Exact Contentful asset fileName (requires cms-edit index sync).\n // \"featuredImageAssetFilename\": \"hero.jpg\",\n\n // Article-only: download asset (ID or fileName shorthands).\n // \"download\": \"assetId\",\n // \"downloadAssetFilename\": \"report.pdf\",\n\n // Page-only: whether the page is indexed by search engines (default: not set = inherit).\n \"indexed\": true,\n\n // Page-only: whether the page is hidden from the sitemap (default: false).\n \"hidden\": false,\n\n // Article-only (required for articles): one of articleTypeId, articleTypeSlug, or articleTypeName.\n // Prefer slug for marketers: cms-edit list --type articleType\n \"articleTypeSlug\": \"resources/blog\",\n\n // Article-only: publication date in YYYY-MM-DD format. Defaults to today.\n \"date\": \"2025-01-15\",\n\n // Array of components to create and link to the page's content field.\n \"components\": [\n // ... see Component Schema below\n ]\n}\n```\n\n---\n\n## Explicit link shorthands (no guessing)\n\nUse **named keys** only — the CLI does not infer whether a string is an asset ID, Media entry ID, or file name.\n\n### Page / article (top-level)\n\n| JSON key | Sets field | Value |\n|----------|------------|-------|\n| `featuredImage` or `featuredImageId` | `featuredImage` | Asset ID |\n| `featuredImageAssetFilename` | `featuredImage` | Exact asset `fileName` (index) |\n| `download` or `downloadId` | `download` | Asset ID (article) |\n| `downloadAssetFilename` | `download` | Exact asset `fileName` (article) |\n| `icon` / `iconId` / `iconAssetFilename` | `icon` | Asset (article, when field exists) |\n| `templateId` | `template` | Entry ID |\n| `articleTypeId` | `articleType` | Entry ID (articles) |\n| `topContentIds`, `visualsIds`, … | See `cms-edit help fields-taxonomy` | Entry ID arrays |\n| `tagSlugs` | `tags` | Tag slug strings (articles). `tagsIds` is rejected. |\n\n### Component `fields`\n\n| JSON key | Sets field | Value |\n|----------|------------|-------|\n| `visualId` | `visual` | Media / video entry ID |\n| `visual` (string) | `visual` | Entry ID only (same as `visualId`) |\n| `visualAssetId` | `visual` | Asset ID when the field is an Asset link |\n| `visualAssetFilename` | `visual` | Exact asset `fileName` → reuse or create Media |\n| `visualMediaName` | (with `visualAssetFilename`) | Optional Media entry name when creating (default: **asset title**) |\n| `visualMedia` | `visual` | `{ \"assetId\", \"name\", \"position?\", \"width?\" }` — always creates Media; `name` should match asset title unless you need a distinct wrapper label |\n| `mobileVisualId`, `mobileVisualAssetFilename`, … | `mobileVisual` | Same pattern |\n\nUnknown top-level or `fields` keys that are not on the content type: **warning** by default; use `--strict` or `--dry-run` to **fail** instead.\n\n### Comparison with `taxonomy-from-json`\n\n| | `taxonomy-from-json` | `create from-json` |\n|--|----------------------|-------------------|\n| Unknown fields on dry-run | Error (strict) | Error (strict) |\n| Unknown fields on create | Warn | Warn |\n| `--strict` on create | — | Supported |\n\n---\n\n## Component Schema\n\nEach item in `components` (and `items` for collections) follows this shape:\n\n```jsonc\n{\n // --- Option A: Create a new entry ---\n\n // Contentful content type ID. One of: component, collection, externalComponent, person\n // Default: \"component\"\n \"contentType\": \"component\",\n\n // The type discriminator value (e.g. HeroSimple, TextBlock, CardGrid).\n // Run `cms-edit schema types <content-type>` to see valid values.\n \"type\": \"HeroSimple\",\n\n // Optional. Human-readable label in Contentful's entry list. Defaults to `type`.\n \"cmsLabel\": \"Homepage Hero\",\n\n // Which field on the parent to attach to. Default: \"content\" (page) or \"contents\" (collection).\n // Use \"topContent\" or \"bottomContent\" for template slots.\n \"target\": \"content\",\n\n // Scalar and rich text fields to set. See \"Field Values\" section below.\n \"fields\": {\n \"heading\": \"Welcome to Hepatology\",\n \"preHeading\": \"Our Speciality\",\n \"body\": \"We have been building cohorts...\\n\\nWith over a decade of experience.\",\n \"backgroundColour\": \"Navy\",\n \"textColour\": \"White\"\n },\n\n // CTA link entries to create and attach to the component's `links` field.\n \"links\": [\n // ... see Link Schema below\n ],\n\n // Child items for collection components. Same schema as a component.\n \"items\": [\n // ... nested components\n ],\n\n // --- Option B: Link an existing entry (no fields set) ---\n // \"existingId\": \"4xKpzQ2abc123\",\n // \"comment\": \"Shared footer CTA — managed separately\"\n}\n```\n\n---\n\n## Field Values\n\nFields in the `fields` object accept several value formats.\n\n### Strings — Automatic RichText Conversion\n\n**The tool uses the Contentful content model to determine if a field is RichText.** For confirmed RichText fields, any string is always converted to a RichText document — no special markers needed.\n\nFor fields where the schema is unavailable, the tool falls back to a heuristic. To trigger Markdown conversion in the heuristic path, use one of these markers:\n\n| Marker | Example | Produces |\n|---|---|---|\n| `\\n\\n` (double newline) | `\"First.\\n\\nSecond.\"` | Two paragraphs |\n| `- ` (list item) | `\"- Item one\\n- Item two\"` | Unordered list |\n| `# ` (heading) | `\"# Heading\\n\\nBody.\"` | Heading + paragraph |\n| `**text**` | `\"**bold** text\"` | Bold inline |\n| `> ` (blockquote) | `\"> A quote\"` | Blockquote |\n\n**For single-sentence body fields:** Always include `\\n\\n` at the end to ensure conversion:\n```json\n\"body\": \"Pedestal Health has been building cohorts in this space for over a decade.\\n\\n\"\n```\n\n### Explicit Format Object\n\nUse an explicit format wrapper to be unambiguous:\n```jsonc\n\"body\": { \"value\": \"Plain text paragraph.\", \"format\": \"text\" }\n\"body\": { \"value\": \"## Heading\\n\\nContent.\", \"format\": \"markdown\" }\n\"body\": { \"value\": \"<p>HTML content</p>\", \"format\": \"html\" }\n```\n\nAccepted formats: `\"text\"`, `\"markdown\"`, `\"html\"`, `\"json\"` (raw Contentful RichText document).\n\n### Other Value Types\n\n```jsonc\n\"indexed\": true, // boolean\n\"heading\": null, // null clears the field\n\"someNumber\": 42 // number\n```\n\n---\n\n## Link Schema\n\n```jsonc\n{\n // Link type. One of: \"external\" (default), \"internal\", \"download\", \"blank\"\n \"type\": \"internal\",\n\n // Display label for the CTA button.\n \"label\": \"Learn More\",\n\n // For \"internal\": resolve by slug (preferred) or by entry ID.\n \"slug\": \"/solutions/hepatology\",\n // \"id\": \"4xKpzQ2abc123\", // alternative to slug\n\n // For \"external\": the URL.\n // \"href\": \"https://example.com\",\n\n // For \"download\": the asset ID.\n // \"assetId\": \"7yBnmR9xyz456\",\n\n // Link to an existing link entry (skips creation).\n // \"existingId\": \"2aZxQw1def789\"\n}\n```\n\n---\n\n## Critical Rules\n\n### Rule 1: Create Leaf Pages First\n\nInternal links resolve at creation time. If page A links to page B and B does not yet exist in Contentful, the creation fails and **page A is left partially created** (the page entry exists but with no content).\n\n**Always create leaf pages (the targets of links) before the pages that link to them.**\n\n```bash\n# Wrong order: /solutions links to /solutions/hepatology which doesn't exist yet\ncms-edit create from-json --json '{...}' # FAILS mid-run\n\n# Correct order: leaf page first, parent page second\ncms-edit create from-json --json '{...}' # succeeds\ncms-edit create from-json --json '{...}' # succeeds — slug resolves\n```\n\nUse `--dry-run` to catch missing slugs before writing anything (see below).\n\n### Rule 2: Always Run --dry-run First\n\n`--dry-run` validates the plan without creating anything in Contentful. It prints the component tree and checks that all internal link slugs exist:\n\n```bash\ncms-edit create from-json --json '{...}' --dry-run\n```\n\nExample output when a slug is missing:\n```\n[dry-run] Would create page:\n slug: /solutions\n title: Solutions\n ...\n\n✗ Internal link slug not found in Contentful: \"/solutions/hepatology\"\n✗ Internal link slug not found in Contentful: \"/solutions/dermatology\"\n Create the target pages first, then re-run. See: cms-edit help create-from-json\n```\n\n### Rule 3: Use body Strings Consistently\n\nEven if a body field is short, include `\\n\\n` at the end to ensure the string is treated as a paragraph of rich text:\n\n```jsonc\n// Good — explicit double newline ensures conversion\n\"body\": \"A single-sentence description.\\n\\n\"\n\n// Also good — multi-paragraph body\n\"body\": \"First paragraph.\\n\\nSecond paragraph.\"\n\n// Risky for heuristic-path fields — no markers, may pass as plain string\n\"body\": \"A single-sentence description.\"\n```\n\n---\n\n## Recovery: Partial Page Created\n\nIf a run fails mid-way (e.g. a missing internal link slug), the page entry is already in Contentful but with no content. The error message shows the page ID:\n\n```\n✗ Component creation failed: No entry found with slug \"/solutions/hepatology\".\n✗ The page entry was already created in Contentful (partial state) — ID: 4xKpzQ2abc123, slug: /solutions\n Inspect with: cms-edit open --page-slug /solutions\n Remove with: delete the entry in Contentful at https://app.contentful.com/spaces/...\n Tip: run with --dry-run first to validate all internal link slugs exist.\n```\n\nOptions:\n1. Delete the partial entry in Contentful, fix the dependency order, and re-run.\n2. Repair the partial entry using `cms-edit batch run` with targeted `set`/`rtf` operations.\n3. Use `cms-edit open --page-slug /solutions` + individual `add` operations to rebuild the content.\n\n---\n\n## Complete Example\n\nA two-component page:\n\n```json\n{\n \"type\": \"page\",\n \"slug\": \"/solutions/hepatology\",\n \"title\": \"Hepatology Solutions\",\n \"description\": \"Evidence generation for hepatology research.\",\n \"components\": [\n {\n \"contentType\": \"component\",\n \"type\": \"HeroSimple\",\n \"cmsLabel\": \"Hepatology Hero\",\n \"fields\": {\n \"heading\": \"Hepatology Evidence Generation\",\n \"preHeading\": \"Our Speciality\",\n \"body\": \"We have been building cohorts in hepatology for over a decade.\\n\\nOur work spans NASH, HCC, and liver transplantation.\",\n \"backgroundColour\": \"Navy\",\n \"textColour\": \"White\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"Contact Us\", \"slug\": \"/contact\" }\n ]\n },\n {\n \"contentType\": \"collection\",\n \"type\": \"CardGrid\",\n \"cmsLabel\": \"Hepatology Capabilities\",\n \"fields\": {\n \"heading\": \"What We Offer\"\n },\n \"items\": [\n {\n \"contentType\": \"component\",\n \"type\": \"Generic\",\n \"cmsLabel\": \"Capability — Cohort Building\",\n \"fields\": {\n \"heading\": \"Cohort Building\",\n \"body\": \"- Disease characterization\\n- Protocol design\\n- Long-term follow-up\"\n }\n },\n {\n \"contentType\": \"component\",\n \"type\": \"Generic\",\n \"cmsLabel\": \"Capability — Evidence Review\",\n \"fields\": {\n \"heading\": \"Evidence Review\",\n \"body\": \"Systematic literature reviews and meta-analyses.\\n\\nSuitable for regulatory submission.\"\n }\n }\n ]\n }\n ]\n}\n```\n\nRun:\n```bash\ncms-edit create from-json --json '{...}' --dry-run # validate first\ncms-edit create from-json --json '{...}' # create for real\ncms-edit open --page-slug /solutions/hepatology # inspect result\n```\n\n---\n\n## After Creation\n\nOnce created:\n1. Run `cms-edit open --page-slug /<slug>` to inspect the result.\n2. Fix any field values with `cms-edit set` or `cms-edit rtf`.\n3. Publish in the Contentful web app when ready.\n\nThe tool prints the Contentful web app URL for the new entry after creation.\n\n---\n\n## HtmlComponent example\n\nRun `schema htmlComponent` first. Field ids below are the core names; some spaces use `htmlContent` / `cssContent` / `jsContent` instead (or dual-write both). Vendor libraries belong on `externalScripts`, not inside HTML.\n\n```json\n{\n \"type\": \"page\",\n \"slug\": \"/lab/html-widget\",\n \"title\": \"HTML widget\",\n \"components\": [\n {\n \"contentType\": \"htmlComponent\",\n \"cmsLabel\": \"Widget — jsPDF demo\",\n \"fields\": {\n \"rawHtml\": \"<div class=\\\"widget\\\"><button type=\\\"button\\\" class=\\\"export\\\">Export</button></div>\",\n \"customJs\": \"hcRoot.querySelector('.export').addEventListener('click', function () { window.jspdf.jsPDF(); });\",\n \"externalScripts\": [\"/html-components/widget/jspdf.umd.min.js\"],\n \"markdownContent\": \"Export widget\"\n }\n }\n ]\n}\n```\n", "fields-article": "# cms-edit — Article Field Reference\n\nAn `article` entry is a blog post, news item, or publication. It has a slug, date, article type classification, and usually a `content` array of body components.\n\nRead `cms-edit://customer/articles` for site-specific playbooks (press releases, publications, tag rules).\n\n---\n\n## Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3` |\n| `title` | Text | Yes | Display title and on-page heading. Also the document `<title>` when `metaTitle` is empty |\n| `metaTitle` | Text | No | Optional search-result title (`<title>`, Open Graph, Twitter). Does not change the on-page heading |\n| `description` | Text | No | SEO meta description — keep under ~160 characters when used for meta |\n| `subtitle` | Text | No | Display line on news/publication heroes (site-specific) |\n| `cmsLabel` | Text | No | Label in Contentful's entry list. Defaults to `title` |\n| `date` | Date | Yes | Publication date in `YYYY-MM-DD` format. Defaults to today in `create from-json` |\n| `articleType` | Link (Entry) | Yes | Link to an `articleType` entry (categorises the article) |\n| `tags` | Array of Links | No | Tag entries (often drives URL topic segment when primary tag is in slug) |\n| `content` | Array of Links | No | Body components — see [Template hierarchy](#template-hierarchy) before adding heroes |\n| `template` | Link (Entry) | No | Per-article layout override (rare); overrides `articleType.articleTemplate` |\n| `featuredImage` | Link (Asset) | No | Often used for OpenGraph / social sharing — prefer **landscape** (wider than tall) |\n| `visuals` | Array of Links | No | Media entries — on many sites drives on-page hero and listing thumbnails |\n| `download` | Link (Asset) | No | Downloadable file (e.g. PDF poster) |\n| `icon` | Link (Asset) | No | Icon asset |\n| `authors` | Array of Links | No | Person entries (ordered bylines) |\n| `externalLink` | Text | No | External URL (e.g. DOI, journal link) |\n| `indexed` | Boolean | Yes | Search indexing (default `true`) |\n| `hidden` | Boolean | Yes | Sitemap visibility (default `false`) |\n\n### `featuredImage` vs `visuals`\n\nOn sites that use **both** fields, they often serve different purposes:\n\n| Field | Typical use |\n|-------|-------------|\n| `visuals` | On-page hero image and listing/card thumbnail |\n| `featuredImage` | OpenGraph and social sharing cards (landscape) |\n\nRead `cms-edit://customer/articles` and `defaults` for site rules. When the playbook requires both, set each explicitly — do not omit `featuredImage` expecting inheritance to fill gaps on listing or OG surfaces.\n\n---\n\n## Template hierarchy\n\nRendered article layout is assembled from the article entry **and** a resolved **template** entry:\n\n1. Article `template` field (if set) — takes precedence\n2. Else linked `articleType` → `articleTemplate` field\n\nTemplate entries provide `preContent` and `postContent` arrays that wrap the article's `content` field. On many marketing sites, **heroes and shells live in the template**, not in per-article `content`.\n\nBefore adding components to an article:\n\n```bash\ncms-edit list --type articleType\n# Note articleTemplate on the target type, then inspect that template:\ncms-edit peek --id <template-entry-id>\n```\n\n**Do not duplicate** hero or layout components in `content` when the resolved template's `preContent` / `postContent` already provides them. The site playbook (`cms-edit://customer/articles`) lists which component types belong in `content` (e.g. rich text only).\n\n> **Note:** `articleType.articlePageTopContent` exists in Contentful on some spaces but is **not** read by the standard article converter — use `articleTemplate` → `preContent` instead.\n\n---\n\n## Finding article types (required)\n\n```bash\ncms-edit list --type articleType\n```\n\nEvery article must link to an **articleType**. Prefer slug-based lookup for marketers:\n\n- CLI: `--article-type-slug resources/blog` or `--article-type-name \"Blog\"`\n- JSON: `articleTypeSlug` or `articleTypeName` (or `articleTypeId` if you have the ID)\n\n---\n\n## Listing Recent Articles\n\nSort by publication `date` (matches the website), not `sys.updatedAt`:\n\n```bash\ncms-edit list --type article --sort date -n 10\ncms-edit search \"keyword\" --type article\ncms-edit list --type article --sort date\n```\n\nTo find **draft** articles: `cms-edit list --type article --sort date` (preview index includes drafts), then `cms-edit peek --article-slug <slug>` or `cms-edit open --id <id>`. `peek` and `open` load draft content — only `list --published` is published-only.\n\n---\n\n## Reading Article Fields\n\n```bash\ncms-edit open --article-slug /news/2025-hepatology-study\ncms-edit read @c0 # all fields\ncms-edit read @c0 date\ncms-edit read @c0 description\n```\n\n---\n\n## Setting Article Fields\n\n```bash\ncms-edit set @c0 title \"Updated Article Title\"\ncms-edit set @c0 description \"New meta description.\"\ncms-edit set @c0 date \"2025-06-01\"\n```\n\n---\n\n## Adding Content to an Article\n\nCheck [Template hierarchy](#template-hierarchy) and the site articles playbook first.\n\n```bash\n# Add a component to the article's content array\ncms-edit add TextBlock component\n\n# Add a collection\ncms-edit add CardGrid collection\n\n# Insert after a specific component\ncms-edit add Generic component --after @c3\n```\n\nRename component `cmsLabel` from defaults like \"New Article rich text\" to a descriptive label (site playbook may specify a pattern).\n\n---\n\n## In create from-json\n\n```json\n{\n \"type\": \"article\",\n \"slug\": \"news/2025-hepatology-study\",\n \"title\": \"New Hepatology Cohort Study Published\",\n \"description\": \"A landmark study on hepatology cohort data.\",\n \"date\": \"2025-06-01\",\n \"articleTypeSlug\": \"resources/blog\",\n \"featuredImageAssetFilename\": \"hero-landscape.jpg\",\n \"visualsIds\": [\"<media-entry-id>\"],\n \"components\": [\n {\n \"contentType\": \"component\",\n \"type\": \"TextBlock\",\n \"fields\": {\n \"heading\": \"Study Overview\",\n \"body\": \"The study included 1,200 patients.\\n\\nResults showed significant improvement.\",\n \"cmsLabel\": \"News — New Hepatology Cohort Study Published\"\n }\n }\n ]\n}\n```\n\nAuto-detection: if `articleTypeId` is present and `type` is omitted, the entry is automatically created as an article.", "fields-collection": "# cms-edit — Collection Field Reference\n\nA `collection` entry is a group of components — a card grid, timeline, category explorer, etc. The `collectionType` field picks which visual layout to use. Children are stored in the `contents` field.\n\n---\n\n## Fields\n\n| Field | Type | Description |\n|---|---|---|\n| `cmsLabel` | Text | Human-readable label in Contentful's entry list |\n| `collectionType` | Text | Variant discriminator — e.g. `CardGrid`, `Timeline`, `CategoryExplorer`. Run `cms-edit types` to see valid values |\n| `heading` | Text | Section heading |\n| `preHeading` | Text | Small label above the heading. Rendered as `<p>`, not a heading tag |\n| `postHeading` | Text | Small label below the heading. Rendered as `<p>`, not a heading tag |\n| `body` | RichText | Introductory body text for the collection |\n| `links` | Array of Links | CTA link entries for the collection as a whole |\n| `contents` | Array of Links | The child component/collection entries in display order |\n| `backgroundColour` | Text | Named background colour |\n| `textColour` | Text | Named text colour |\n\n---\n\n## Reading Collection Fields\n\n```bash\ncms-edit open --page-slug /solutions\ncms-edit snapshot\n# A collection appears as a nested group in the tree, e.g.:\n# @c3 collection [draft] CardGrid\n# @c4 component [draft] Card — Hepatology\n# @c5 component [draft] Card — Dermatology\n\ncms-edit read @c3 # all fields on the collection\ncms-edit read @c3 heading # just the heading\n```\n\n---\n\n## Setting Collection Fields\n\n```bash\ncms-edit set @c3 heading \"Our Solutions\"\ncms-edit set @c3 preHeading \"What We Do\"\ncms-edit rtf @c3 body \"An overview of our capabilities.\\n\\nSelect a speciality below.\"\ncms-edit set @c3 backgroundColour \"Grey\"\n```\n\n---\n\n## Adding Child Items\n\n```bash\n# Add a new child component inside a collection\ncms-edit add Generic component --parent @c3\n\n# Re-snapshot after add — refs are renumbered\ncms-edit snapshot\n\n# Then set fields on the new child\ncms-edit set @c4 heading \"New Card Heading\"\n```\n\n**Important:** After any `add --parent` operation, all entries that come after the collection in the depth-first tree are renumbered. Always re-snapshot or use variable binding in `run` batches. See `cms-edit help run`.\n\n---\n\n## Reordering Children\n\n```bash\n# Move a child to a specific position (0-indexed) within its parent\ncms-edit move @c5 0 # move to first position\ncms-edit move @c4 2 # move to third position\n```\n\n---\n\n## Removing a Child\n\n```bash\ncms-edit remove @c5 # unlinks from parent; does not delete the entry\n```\n\n---\n\n## In create from-json\n\nCollections use `\"contentType\": \"collection\"` and their children go in `\"items\"`. The `items` array maps to the `contents` field in Contentful:\n\n```json\n{\n \"contentType\": \"collection\",\n \"type\": \"CardGrid\",\n \"cmsLabel\": \"Solutions Cards\",\n \"fields\": {\n \"heading\": \"Our Solutions\",\n \"preHeading\": \"What We Offer\",\n \"body\": \"Choose a speciality area below.\\n\\n\",\n \"backgroundColour\": \"Grey\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"See All Solutions\", \"slug\": \"/solutions\" }\n ],\n \"items\": [\n {\n \"contentType\": \"component\",\n \"type\": \"Generic\",\n \"cmsLabel\": \"Card — Hepatology\",\n \"fields\": {\n \"heading\": \"Hepatology\",\n \"body\": \"Evidence generation for liver disease.\\n\\n\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"Learn More\", \"slug\": \"/solutions/hepatology\" }\n ]\n },\n {\n \"contentType\": \"component\",\n \"type\": \"Generic\",\n \"cmsLabel\": \"Card — Dermatology\",\n \"fields\": {\n \"heading\": \"Dermatology\",\n \"body\": \"Real-world data for skin conditions.\\n\\n\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"Learn More\", \"slug\": \"/solutions/dermatology\" }\n ]\n }\n ]\n}\n```\n\n**Note:** Internal links in `items[].links` must resolve — the target pages must exist in Contentful before running `create from-json`. Use `--dry-run` to validate all slugs first. See `cms-edit help create-from-json`.\n", "fields-component": "# cms-edit — Component Field Reference\n\nA `component` entry is an individual content section — a hero, text block, card, timeline item, etc. The `componentType` field picks which visual variant to render.\n\n---\n\n## Fields\n\n| Field | Type | Description |\n|---|---|---|\n| `cmsLabel` | Text | Human-readable label in Contentful's entry list |\n| `componentType` | Text | Variant discriminator — e.g. `HeroSimple`, `TextBlock`, `Generic`. Run `cms-edit schema types component` to see valid values |\n| `heading` | Text | Main heading text |\n| `preHeading` | Text | Small label above the heading. Rendered as `<p>`, not a heading tag |\n| `postHeading` | Text | Small label below the heading. Rendered as `<p>`, not a heading tag |\n| `body` | RichText | Main body content. Accepts markdown in `create from-json` and `run rtf` |\n| `links` | Array of Links | CTA link entries attached to this component |\n| `visual` | Link (Asset or Entry) | Primary visual: image asset or responsive visual entry |\n| `mobileVisual` | Link (Asset or Entry) | Alternative visual for mobile viewports |\n| `backgroundColour` | Text | Named colour. Run `cms-edit schema colours` to see valid values |\n| `textColour` | Text | Named colour for text. Run `cms-edit schema colours` to see valid values |\n\nNot all components use all fields — unused fields are simply null.\n\n---\n\n## Reading Component Fields\n\n```bash\ncms-edit open --page-slug /solutions/hepatology\ncms-edit snapshot\ncms-edit read @c1 # all fields on the first component\ncms-edit read @c1 heading # just the heading\ncms-edit read @c1 body # rich text summary\n```\n\n---\n\n## Setting Scalar Fields\n\n```bash\ncms-edit set @c1 heading \"New Heading\"\ncms-edit set @c1 preHeading \"Our Speciality\"\ncms-edit set @c1 postHeading null # clear the field\ncms-edit set @c1 backgroundColour \"Navy\"\ncms-edit set @c1 textColour \"White\"\n```\n\n---\n\n## Setting Rich Text (body)\n\n```bash\n# Inline markdown\ncms-edit rtf @c1 body \"## Overview\\n\\nFirst paragraph.\\n\\nSecond paragraph.\"\n\n# From a file\ncms-edit rtf @c1 body --content \"# ...\"\n\n# Find and replace within existing rich text\ncms-edit rtf replace @c1 body --find \"old text\" --replace-plain \"new text\"\n```\n\n**Rich text rules:**\n- Single sentences must include `\\n\\n` to be converted to a paragraph: `\"One sentence.\\n\\n\"`\n- The `body` field is always RichText — the schema ensures correct conversion\n- Headings, lists, bold, italic, and links are all supported in markdown\n\n**Markdown examples:**\n```\n# Heading 1\n## Heading 2\n\nPlain paragraph text.\n\n**Bold text** and _italic text_.\n\n- List item one\n- List item two\n - Nested item\n\n[Link text](https://example.com)\n\n> A blockquote\n```\n\n---\n\n## Managing CTA Links\n\n```bash\n# List existing links\ncms-edit links list @c1\n\n# Add a new external link\ncms-edit links add @c1 --type external --label \"Learn More\" --href \"https://example.com\"\n\n# Add an internal link (resolves slug to entry)\ncms-edit links add @c1 --type internal --label \"Our Team\" --slug /about/team\n\n# Add a download link\ncms-edit links add @c1 --type download --label \"Download PDF\" --asset-id <assetId>\n\n# Set link variant (text link vs button — see cms-edit schema link)\ncms-edit links set @c1 0 variant link\n\n# Remove a link (by index)\ncms-edit links remove @c1 0\n\n# Reorder links\ncms-edit links move @c1 1 0 # move index 1 to index 0\n```\n\n---\n\n## Setting Visuals\n\n```bash\n# Link an asset directly\ncms-edit set @c1 visual --asset <assetId>\n\n# Search for assets\ncms-edit asset search \"hepatology\"\n\n# Get asset info\ncms-edit asset info <assetId>\n```\n\n---\n\n## In create from-json\n\n```json\n{\n \"contentType\": \"component\",\n \"type\": \"HeroSimple\",\n \"cmsLabel\": \"Homepage Hero\",\n \"fields\": {\n \"heading\": \"Headline text\",\n \"preHeading\": \"Label above\",\n \"postHeading\": \"Label below\",\n \"body\": \"Opening paragraph.\\n\\nSecond paragraph.\",\n \"backgroundColour\": \"Navy\",\n \"textColour\": \"White\"\n },\n \"links\": [\n { \"type\": \"internal\", \"label\": \"Learn More\", \"slug\": \"/about\" },\n { \"type\": \"external\", \"label\": \"Contact\", \"href\": \"https://example.com/contact\" }\n ]\n}\n```\n\nUse explicit visual shorthands in `fields` (see `cms-edit help create-from-json`). Examples:\n\n```json\n\"fields\": {\n \"visualId\": \"<existing-media-entry-id>\",\n \"visualAssetFilename\": \"hero.jpg\",\n \"visualMedia\": { \"assetId\": \"<asset-id>\", \"name\": \"Homepage Hero\", \"position\": \"Middle\", \"width\": 40 }\n}\n```\n\n**Media entry `name`:** This is the label editors see in Contentful's entry list. Set it to the **linked asset's title** (same as `asset info` / Contentful asset title). Do not use `visual-{assetId}`, `Wrapper for {assetId}`, or raw filenames.\n\nDo not put a bare filename on `visual` — use `visualAssetFilename`. Requires `cms-edit index sync` for `*AssetFilename` keys.\n", "fields-html-component": "# cms-edit — HtmlComponent Field Reference\n\nAn `htmlComponent` entry is developer-authored HTML, optional scoped CSS, optional inline JS, and optional **external script URLs**. It is not a registered `component` variant.\n\nRun `cms-edit schema htmlComponent` for this space’s field IDs. Some spaces dual-write legacy names (`htmlContent` / `cssContent` / `jsContent`) plus core ids (`rawHtml` / `customCss` / `customJs`). **`externalScripts` is the same id on every space.** Unknown JSON keys fail (`html` vs `htmlContent`).\n\nSee `cms-edit://customer/task-create-html-component` for the full create playbook.\n\n---\n\n## Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `cmsLabel` | Symbol | Yes | Internal label. Set immediately. |\n| `rawHtml` / `htmlContent` | Text | Yes | Markup. No `<script src>`. |\n| `customCss` / `cssContent` | Text | No | Auto-scoped to `[data-hc-id]`. |\n| `customJs` / `jsContent` | Text | No | Inline JS via `next/script`. Scope queries to injected `hcRoot`. |\n| `externalScripts` | Array of Symbol | No | Allowlisted script URLs loaded **before** `customJs`. Max 10. |\n| `markdownContent` | Text | No | Plain text for search / markdown export. |\n| `scriptStrategy` | Symbol | No | `afterInteractive` (default), `lazyOnload`, `beforeInteractive`. Applies to externals and inline JS. |\n| `isHero` | Boolean | No | `true` when the HTML contains the page `<h1>`. |\n| `fullWidth` | Boolean | No | Viewport-breakout layout when the site renderer supports it. |\n| `excludeFromSearch` | Boolean | No | Skip search even if `markdownContent` is set. |\n| `loadScriptOnce` | Boolean | No | Dedupe inline script id per entry (default true). External URLs already share one `next/script` id per URL. |\n\n---\n\n## `externalScripts` allowlist\n\nAlways allowed: same-origin paths matching `/html-components/` + a `.js` filename (no `..`, no query, no hash). Prefer files in the site repo at `public/html-components/<feature>/….js`.\n\nHTTPS URLs are allowed only when the hostname is in `CmsRendererConfig.htmlComponentExternalScriptHosts`. If the site has CSP, that host must also be in `script-src`. If the host is not allowlisted, **stop** — do not invent a CDN load.\n\nRejected: `http:`, `javascript:`, `//…`, path traversal, query/hash on same-origin paths. Disallowed URLs are not loaded (preview/dev may warn). Duplicates are dropped at render. `customJs` waits until every listed src is ready; a failed src skips inline JS.\n\nDo **not** put libraries in HTML `<script>` tags or `createElement('script')` inside `customJs`.\n\n---\n\n## Setting fields\n\nHTML/CSS/JS (long text). Hosted MCP max **8192 bytes** inline — over that, staged upload:\n\n```\ncms_edit_request_staged_upload { \"fileName\": \"hero.js\", \"mimeType\": \"text/javascript\", \"kind\": \"text\" }\n# curlCommand\ncms_edit [\"set\", \"@cN\", \"customJs\", \"--staged\", \"<uploadId>\"]\n```\n\nTiny snippets only:\n\n```\ncms_edit [\"set\", \"@cN\", \"rawHtml\", \"--content-base64\", \"<b64>\"]\n```\n\nContentful Text is ~**50k characters**. Confirm with `[\"read\", \"@cN\", \"--hash\"]`. `diff` summarizes long fields (bytes, sha256, head).\n\n`externalScripts` is an array — **not** a scalar string. Scalar `set` is rejected.\n\n```\ncms_edit [\"set\", \"@cN\", \"externalScripts\", \"--json\", \"[\\\"/html-components/feature/lib.js\\\"]\"]\n```\n\nOn `create from-json`:\n\n```json\n{\n \"contentType\": \"htmlComponent\",\n \"cmsLabel\": \"Pricing grid\",\n \"fields\": {\n \"rawHtml\": \"<div class=\\\"hc-root\\\">…</div>\",\n \"customJs\": \"hcRoot.querySelector('.buy')\",\n \"externalScripts\": [\"/html-components/pricing-grid/lib.js\"],\n \"markdownContent\": \"Pricing grid\"\n }\n}\n```\n\nUse this space’s field ids from `schema htmlComponent` (`rawHtml` vs `htmlContent`). Dual-write both when the schema shows both.\n\n---\n\n## Related\n\n- `cms-edit://customer/task-create-html-component`\n- `cms-edit help create-from-json`\n- `cms-edit schema htmlComponent`\n", "fields-page": "# cms-edit — Page Field Reference\n\nA `page` entry is the root of a web page's content tree. It has a slug, metadata, and arrays of content components.\n\n---\n\n## Top-Level Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3`. Use `index` for the home page. |\n| `title` | Text | Yes | Display title and on-page heading. Also the document `<title>` when `metaTitle` is empty |\n| `metaTitle` | Text | No | Optional search-result title (`<title>`, Open Graph, Twitter). Does not change the on-page heading |\n| `description` | Text | No | SEO meta description |\n| `cmsLabel` | Text | No | Label shown in Contentful's entry list. Defaults to `title` |\n| `indexed` | Boolean | No | Whether the page is indexed by search engines |\n| `hidden` | Boolean | No | Whether the page is excluded from the sitemap |\n| `template` | Link (Entry) | No | Link to a `template` entry for shared layout slots |\n| `featuredImage` | Link (Asset) | No | Featured image asset for social sharing |\n\n---\n\n## Content Arrays\n\nA page has three content slot arrays. Components are rendered in order within each slot.\n\n| Field | Type | Description |\n|---|---|---|\n| `topContent` | Array of Links | Content rendered above the main content area (e.g. sticky nav, announcement bar) |\n| `content` | Array of Links | Main content area. **Default target for `add` and `create from-json`** |\n| `bottomContent` | Array of Links | Content rendered below the main content area (e.g. newsletter signup) |\n\nEach array entry is a link to a `component`, `collection`, or `externalComponent` entry.\n\n---\n\n## Reading Page Fields\n\n```bash\ncms-edit open --page-slug /solutions\ncms-edit read @c0 # read all fields on the page entry\ncms-edit read @c0 title # read just the title\ncms-edit read @c0 slug\n```\n\n---\n\n## Setting Page Fields\n\n```bash\ncms-edit set @c0 title \"New Title\"\ncms-edit set @c0 description \"Updated SEO description.\"\ncms-edit set @c0 indexed true\ncms-edit set @c0 hidden false\n```\n\n---\n\n## Linking a Template\n\nTo link a template to a page, use the template entry ID:\n\n```bash\ncms-edit set @c0 template --link <templateEntryId>\n```\n\nOr in `create from-json`:\n```json\n{\n \"slug\": \"/new-page\",\n \"title\": \"New Page\",\n \"templateId\": \"<templateEntryId>\"\n}\n```\n\nFind template IDs with:\n```bash\ncms-edit list --type template\n```\n\n---\n\n## Adding Content to a Page\n\n```bash\n# Add a new component to the default content array\ncms-edit add HeroSimple component\n\n# Add to topContent\ncms-edit add AnnouncementBar component --target topContent\n\n# Add to bottomContent\ncms-edit add NewsletterSignup component --target bottomContent\n\n# Insert after a specific entry\ncms-edit add TextBlock component --after @c3\n```\n\n---\n\n## In create from-json\n\n```json\n{\n \"type\": \"page\",\n \"slug\": \"/solutions/hepatology\",\n \"title\": \"Hepatology Solutions\",\n \"description\": \"Evidence generation for hepatology research.\",\n \"cmsLabel\": \"Hepatology Solutions Page\",\n \"templateId\": \"optionalTemplateId\",\n \"featuredImage\": \"<asset-id>\",\n \"featuredImageAssetFilename\": \"social-share.jpg\",\n \"indexed\": true,\n \"hidden\": false,\n \"components\": [\n {\n \"contentType\": \"component\",\n \"type\": \"HeroSimple\",\n \"target\": \"content\",\n \"fields\": { \"heading\": \"Hepatology Solutions\" }\n }\n ]\n}\n```\n", "fields-taxonomy": "# cms-edit — Taxonomy Field Reference\n\nTaxonomy entries (`tagType`, `articleType`, `tag`) can be created as **drafts** with the CLI. Use `--json-file` for full field control, or `--slug` / `--name` for minimal creates.\n\n```bash\ncms-edit create tag-type --slug conference-venue --name \"Conference Venue\"\ncms-edit create article-type --slug resources/publications --name \"Publications\"\ncms-edit create tag --slug poster-presentation --name \"Poster Presentation\" --tag-type presentation-type\ncms-edit create tag --slug easl-congress-2026 --name \"EASL Congress 2026\" --tag-type publication-source \\\n --description \"Research presented at EASL Congress 2026.\" --featured-image <logoAssetId>\n\n# Idempotent import helpers\ncms-edit create tag-type --slug conference-venue --name \"Conference Venue\" --if-not-exists\ncms-edit resolve --tag-type-slug presentation-type\n```\n\nAll creates are draft-only. See `cms-edit help taxonomy-from-json` for batch bootstrap.\n\n---\n\n## tagType fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `name` | Text | Yes | Display name |\n| `slug` | Text | No | URL slug without leading or trailing slash. Example: `part1/part2`. Optional. |\n| `show` | Boolean | No | Whether tags of this type show visually on cards/detail |\n| `template` | Link (Entry) | No | Template for tag detail pages |\n| `topContent` | Array of Links | No | Content above main area on tag detail |\n| `menu` | Link (Entry) | No | Navigation entry |\n| `footer` | Link (Entry) | No | Footer navigation entry |\n| `indexPageTemplate` | Link (Entry) | No | Template for tag-type index page |\n| `indexPageTopContent` | Array of Links | No | Top content on tag-type index |\n\n---\n\n## articleType fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `name` | Text | Yes | Display name |\n| `cmsLabel` | Text | Yes | Label in Contentful entry list (defaults to `--name`) |\n| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3`. Use `index` for the home page. |\n| `indexPageTitle` | Text | Yes | Title on article index page (defaults to `--name`) |\n| `metaTitle` | Text | No | Optional search-result title for the index. Does not change the on-page heading |\n| `indexPageDescription` | Text | Yes | Description on article index (defaults to `\"\"`) |\n| `featuredImage` | Link (Asset) | No | Featured image for index/social |\n| `menu` | Link (Entry) | No | Navigation entry |\n| `footer` | Link (Entry) | No | Footer navigation entry |\n| `indexPageTemplate` | Link (Entry) | No | Template for article index |\n| `indexPageTopContent` | Array of Links | No | Top content on article index |\n| `indexPageStructuredData` | Array of Links | No | Schema entries for index page |\n| `visuals` | Array of Links | No | Media/externalVideo entries |\n| `articleTemplate` | Link (Entry) | No | Template for article detail pages |\n| `articlePageTopContent` | Array of Links | No | Top content on article detail |\n| `structuredData` | Array of Links | No | Schema entries for article pages |\n| `backgroundColour` | Symbol | No | Valid values: `cms-edit schema colours` |\n| `textColour` | Symbol | No | Valid values: `cms-edit schema colours` |\n| `indexed` | Boolean | Yes | Search indexing (default: `true`) |\n| `hidden` | Boolean | Yes | Sitemap visibility (default: `false`) |\n| `indexPageHidden` | Boolean | No | Hide article index page |\n| `articlePageHidden` | Boolean | No | Hide article detail pages |\n| `flags` | Array of Symbols | No | e.g. `\"Sticky nav\"` |\n| `searchTemplate` | Link (Entry) | No | Template for search results |\n| `searchTopContent` | Array of Links | No | Top content on search results |\n| `breadcrumbTitle` | Text | No | Override for breadcrumb label |\n\n---\n\n## tag fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `cmsLabel` | Text | Yes | Label in Contentful (defaults to `--name`) |\n| `name` | Text | Yes | Display name and on-page heading |\n| `metaTitle` | Text | No | Optional search-result title. Does not change the on-page heading |\n| `tagType` | Link (Entry) | Yes | Parent tagType entry |\n| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2`. |\n| `description` | Text | No | Short description |\n| `featuredImage` | Link (Asset) | No | Featured image |\n| `visuals` | Array of Links | No | Media/externalVideo entries |\n| `menu` | Link (Entry) | No | Navigation entry |\n| `footer` | Link (Entry) | No | Footer navigation entry |\n| `template` | Link (Entry) | No | Template for tag detail |\n| `topContent` | Array of Links | No | Top content on tag detail |\n| `structuredData` | Array of Links | No | Schema entries |\n| `backgroundColour` | Symbol | No | Valid values: `cms-edit schema colours` |\n| `textColour` | Symbol | No | Valid values: `cms-edit schema colours` |\n| `indexed` | Boolean | Yes | Search indexing (default: `true`) |\n| `hidden` | Boolean | Yes | Sitemap visibility (default: `false`) |\n| `show` | Boolean | No | Visual display on cards/detail |\n| `breadcrumbTitle` | Text | No | Override for breadcrumb label |\n\nTags require `--tag-type <slug>` or `--tag-type-id <id>` (or `tagTypeSlug` / `tagTypeId` in JSON).\n\n---\n\n## JSON file shape\n\nUse `--json-file` with any taxonomy create command. CLI flags override JSON values.\n\n```jsonc\n{\n \"fields\": {\n \"name\": \"Poster Presentation\",\n \"slug\": \"poster-presentation\",\n \"description\": \"Poster session at ASCO 2025\",\n \"show\": true,\n \"indexed\": true,\n \"hidden\": false,\n \"backgroundColour\": \"White\",\n \"textColour\": \"Navy\"\n },\n \"tagTypeSlug\": \"presentation-type\",\n \"featuredImageId\": \"abc123\",\n \"templateId\": \"tmpl456\",\n \"topContentIds\": [\"comp1\", \"comp2\"]\n}\n```\n\n### Link shorthands\n\nThese top-level keys resolve to Contentful Entry/Asset links (same conventions as `create from-json`):\n\n| Shorthand | Resolves to field |\n|---|---|\n| `tagTypeId`, `tagTypeSlug` | `tagType` (tags only) |\n| `templateId` | `template` |\n| `indexPageTemplateId` | `indexPageTemplate` |\n| `articleTemplateId` | `articleTemplate` |\n| `searchTemplateId` | `searchTemplate` |\n| `menuId` | `menu` |\n| `footerId` | `footer` |\n| `featuredImageId` | `featuredImage` |\n| `topContentIds` | `topContent` |\n| `indexPageTopContentIds` | `indexPageTopContent` |\n| `articlePageTopContentIds` | `articlePageTopContent` |\n| `searchTopContentIds` | `searchTopContent` |\n| `structuredDataIds` | `structuredData` |\n| `indexPageStructuredDataIds` | `indexPageStructuredData` |\n| `visualsIds` | `visuals` |\n\n---\n\n## Common options\n\n| Option | Description |\n|---|---|\n| `--slug <slug>` | Required URL slug |\n| `--name <name>` | Required display name |\n| `--cms-label <label>` | CMS label (articleType/tag; defaults to name) |\n| `--description <desc>` | Short description (tags only) |\n| `--featured-image <asset-id>` | Asset ID for featured image (tags only) |\n| `--json-file <path>` | Full field spec (see above) |\n| `--if-not-exists` | Return existing entry ID when slug matches (exit 0) |\n| `--dry-run` | Validate field build and link resolution without writing |\n\n**Idempotency:** `--if-not-exists` checks Contentful then creates. They work for **sequential** import scripts. Do not run two creates for the same slug in parallel — both may succeed. Re-run with `--if-not-exists` to converge.\n\nUse `CMS_EDIT_JSON=1` or `--json-output` for machine-readable output: `{ ok, id, slug, contentType, status: \"created\"|\"existing\"|\"dry-run\" }` (`id` is empty on dry-run).\n", "fields": "# cms-edit — Content Type Field Reference\n\nThis page lists the content types managed by `cms-edit` and links to their field references.\n\n---\n\n## Content Types\n\n| Content Type | Used For | Detail |\n|---|---|---|\n| `page` | Web pages with a slug and content tree | `cms-edit help fields-page` |\n| `article` | Blog posts and news items | `cms-edit help fields-article` |\n| `htmlComponent` | Developer-authored HTML / CSS / JS blocks | `cms-edit help fields-html-component` |\n| `collection` | Groups of components (card grids, timelines, etc.) | `cms-edit help fields-collection` |\n| `link` | CTA button entries | Managed via `cms-edit links` |\n| `template` | Reusable page shell (header, footer slots) | Used via `templateId` in `create from-json` |\n| `navigation` | Site navigation entries | Managed via `cms-edit nav` |\n| `banner` | Site-wide announcement | `cms-edit help create-editor-entries` |\n| `pageVariant` | Alternate version of a page | `cms-edit help create-editor-entries` |\n| `pageTest` | A/B test configuration | `cms-edit help create-editor-entries` |\n| `customType` | Routable directory (people, tags, …) | `cms-edit help create-editor-entries` |\n| `alternatePageContent` | One block swap on a page variant | `cms-edit add` on a page variant |\n\n---\n\n## Type Discriminators\n\nMany content types have a `*Type` field that picks a specific variant:\n\n| Content Type | Discriminator Field | Values |\n|---|---|---|\n| `component` | `componentType` | `HeroSimple`, `TextBlock`, `CardGrid`, `Generic`, etc. |\n| `collection` | `collectionType` | `CardGrid`, `Timeline`, `CategoryExplorer`, etc. |\n\nRun `cms-edit schema types <content-type>` to see all valid discriminator values for the current space.\n\n---\n\n## Colour Fields\n\nThe `backgroundColour` and `textColour` fields accept named values, not hex codes.\n\nRun `cms-edit schema colours` to see valid values for the current space.\n\nCommon values: `\"Navy\"`, `\"White\"`, `\"Grey\"`, `\"Black\"`, `\"Brand\"`.\n\n---\n\n## Ref Addressing\n\nWhen a session is open (after `cms-edit open`), entries are addressed by `@ref`:\n\n- `@c0` — the root page/article entry\n- `@c1`, `@c2`, ... — entries in depth-first traversal order\n\nRun `cms-edit snapshot` to see current refs.\n\n---\n\n## Field Detail Pages\n\n- `cms-edit help fields-page` — page entry fields\n- `cms-edit help fields-article` — article entry fields\n- `cms-edit help fields-component` — component entry fields\n- `cms-edit help fields-html-component` — HtmlComponent (raw HTML, `externalScripts`)\n- `cms-edit help fields-collection` — collection entry fields\n", "index-sync": "# Content index sync\n\ncms-edit keeps a **local SQLite index** per space/environment for fast asset, media, and **content catalog** discovery. The default index is built from the **Content Preview API** (draft content) — matching cms-edit’s draft-only workflow.\n\n## What gets indexed\n\n| Table | Content |\n|-------|---------|\n| `assets` | All CDN assets (filename, title, MIME, dimensions) |\n| `media` | Media wrapper entries linked to assets |\n| `reference_entries` | Content catalog metadata (no content trees) |\n\nCatalog and media pages use Contentful `select` + `include=0` so only index fields are fetched.\nThat keeps responses under Contentful’s ~7 MB limit on large spaces (e.g. many articles with rich text).\n\n### Catalog content types (schema v5)\n\nTypically fewer than ~1000 rows each: `page`, `article`, `pageVariant`, `template`, `articleType`, `tagType`, `tag`, `navigation`, `navigationItem`, `banner`, `pageTest`, `customType`.\n\nSchema v5 adds `banner`, `pageTest`, and `customType` to the existing columns (`cmsLabel`, and `slug` when the type has one). A version bump rebuilds the index.\n\nEach catalog row stores:\n\n| Column | Purpose |\n|--------|---------|\n| `slug` | Normalized URL slug when the type has `slug` |\n| `label` | List line: `title`, `name`, or template cmsLabel |\n| `cmsLabel` | `cmsLabel` when present (page, article, pageVariant, tag, template, banner, pageTest, customType) |\n| `tagTypeSlug` | Parent tag type slug (tags only) |\n| `articleTypeSlug` | Parent article type slug (articles only) |\n| `date` | Publication date `YYYY-MM-DD` (articles only; schema v4) |\n\n## When you need it\n\nThese commands **require** a built index:\n\n- `cms-edit asset search` (title, `--filename`, `--filename-match`)\n- `cms-edit asset audit`\n- `cms-edit list --type media --asset-id <id>`\n- `cms-edit list --type media --asset-filename …` / `--asset-filename-match …`\n- `cms-edit asset upload --if-exists-by-filename` (lookup uses the index)\n- `*AssetFilename` keys in `create from-json`\n\nCatalog commands **prefer** the index when present (CMA fallback if a row is missing):\n\n- `cms-edit list --type page|article|pageVariant|template|articleType|tagType|tag|navigation|navigationItem`\n- `cms-edit open`, `cms-edit resolve`, `cms-edit nav open` — see [lookup.md](./lookup.md)\n- `cms-edit create … --if-not-exists` for taxonomy\n- `tagTypeSlug` / `tagTypeName` shorthands in JSON create flows\n\nFor `--type template`, `--slug` filters by **cmsLabel** (not URL slug).\n\nUse `--force-cma` on `list` to bypass the catalog and paginate via CMA.\n\n## Commands\n\n```bash\n# Full rebuild (draft/preview content — default)\ncms-edit index sync\n\n# Progress on stderr (per-page fetches, catalog types, SQLite write)\ncms-edit index sync --verbose\n# Same via env (also applies to automatic background sync):\nLOG_CMS_INDEX=1 cms-edit index sync\n\n# Check freshness and row counts\ncms-edit index status\n\n# Browse index contents in the terminal\ncms-edit index dump\ncms-edit index dump --all\ncms-edit index dump --type image/ -n 20\ncms-edit index dump --assets-only --skip 50\ncms-edit index dump --reference-only\ncms-edit index dump --reference-type page\n\n# Published content only (separate database file suffix -published)\ncms-edit index sync --published\ncms-edit index status --published\n```\n\nIndex path: `~/.contentful-cms/index/<spaceId>/<environment>/media.db` (add `-published` suffix for published-only mode).\n\n## Automatic sync (simplicity)\n\nCommands that depend on the index call **`ensureContentIndex`** internally. You do not need to run `index sync` first in normal agent workflows.\n\n| Condition | Auto-sync behaviour |\n|-----------|---------------------|\n| Index missing | **Hydrate** from shared cache blob if valid, else **full** rebuild |\n| Schema version outdated (e.g. v2 → v3) | **Full** rebuild |\n| Committed write invalidated index (incremental) | **Incremental** upsert on next index command |\n| Committed write invalidated index (full — slug change or catalog delete) | **Full** rebuild on next index command |\n| Last sync older than **24 hours** | **Incremental** upsert (`sys.updatedAt[gte]` last `syncedAt`) |\n| Index fresh | No sync |\n\nManual `cms-edit index sync` always performs a **full** rebuild.\n\n**Invalidation (lazy, no thrashing):** `save`, `create page|article|…`, `asset upload`, and similar **committed** writes mark the index dirty (Redis on hosted MCP; `invalidation.json` locally). They do **not** sync immediately. The next `list`, `open`, `asset search`, etc. refreshes the index. In-session `set` / `rtf` edits do **not** invalidate.\n\n**Shared cache (hosted MCP):** After sync, the SQLite file is gzipped into Redis (~sub-MB for typical spaces). Cold serverless instances restore from Redis instead of re-fetching all assets from the Preview API.\n\n**Incremental limitations:** Only rows changed since the last sync are fetched. Entries deleted in Contentful may remain in the index until the next **full** invalidation/sync. Duplicate slug/label/cmsLabel rows in the index cause lookup commands to fail with an explicit error (fix in Contentful, then full sync).\n\n**Single writer:** File lock beside `media.db` plus a shared Redis lock on hosted MCP. If another sync is in progress, the command **fails immediately** (exit code 1). Stale file locks (>30 min or dead pid) are removed automatically.\n\n## Preview / delivery API token\n\nThe management token cannot call the CDN. For default `index sync`:\n\n| Config field | Purpose |\n|--------------|---------|\n| `previewAccessToken` | Explicit Preview API token (`${CONTENTFUL_PREVIEW_ACCESS_TOKEN}`) |\n| *(auto)* | Linked preview key from a space delivery key via CMA |\n\nFor `index sync --published`:\n\n| Config field | Purpose |\n|--------------|---------|\n| `deliveryAccessToken` | Explicit CDA token (`${CONTENTFUL_ACCESS_TOKEN}`) |\n| `deliveryApiKeyName` | Pick a space delivery key by name via CMA |\n| *(auto)* | First delivery key matching the configured environment |\n| `autoCreateDeliveryApiKey` | Create `cms-edit-index` key if none match (needs PAT permissions; warns when used) |\n\nIf CMA cannot read API keys, set `previewAccessToken` or `deliveryAccessToken` manually.\n\n## Typical workflow before imports\n\n```bash\ncms-edit index sync\ncms-edit asset search --filename-match 'istock.*'\ncms-edit list --type page\ncms-edit list --type article --article-type-name \"Publications\"\ncms-edit resolve --tag-type-slug topic\ncms-edit open --page-slug /about\n```\n\nSee [lookup.md](./lookup.md) for all `open` / `resolve` flags. See [MEDIA_INDEX_PLAN.md](../MEDIA_INDEX_PLAN.md) for architecture details.\n", "index": "# cms-edit — Help Index\n\n`cms-edit` is an opinionated CLI for reading and editing Contentful content across SE Studio apps. It provides a snapshot → ref → edit → save workflow. **Saves create drafts.** Publish, unpublish, and archive use a plan and an explicit yes, and only when the Contentful role allows it.\n\n---\n\n## How to Get Help\n\n| Command | What you get |\n|---|---|\n| `cms-edit` | Command list + one-line descriptions |\n| `cms-edit <command> --help` | Options and synopsis for a command |\n| `cms-edit guide [topic]` | Short getting-started markdown for hosted MCP (`overview`, `workflow`, `commands`, `troubleshooting`, `hosted`) |\n| `cms-edit help <topic>` | Detailed CLI playbooks with examples (this index lists topics) |\n\nAvailable topics for `cms-edit help <topic>`:\n\n| Topic | Contents |\n|---|---|\n| `workflow` | Standard editing workflow — open, snapshot, edit, save |\n| `create-from-json` | Create a new page or article from a JSON file (single-shot) |\n| `create-editor-entries` | Create banners, page variants, page tests, and custom types |\n| `taxonomy-from-json` | Batch-create tagType, articleType, and tag entries from JSON |\n| `person-from-json` | Batch-create person/author entries from JSON |\n| `article-tags-from-json` | Set tags on multiple articles from JSON |\n| `bulk-rtf-replace` | Find-replace plain text across Rich Text fields in entry trees |\n| `batch` | Edit multiple entries by Contentful entry ID, then save once |\n| `batch-run` | Execute a JSON script of operations (`batch run --json`) |\n| `fields` | Overview of all content types |\n| `fields-page` | All fields on a `page` entry |\n| `fields-article` | All fields on an `article` entry |\n| `fields-component` | All fields on a `component` entry |\n| `fields-html-component` | HtmlComponent fields including `externalScripts` |\n| `fields-collection` | All fields on a `collection` entry |\n| `fields-taxonomy` | All fields on `tagType`, `articleType`, and `tag` entries |\n| `index-sync` | Build and use the local content index (CDA sync) |\n| `patterns` | Census published page/article stacks (Delivery API) |\n| `asset-review` | Visual asset quality review (filename, alt, size, dimensions) |\n| `lookup` | Flat flags for `open`, `resolve`, and `nav open` |\n| `publish` | Plan, then publish, unpublish, archive, or revalidate |\n\n---\n\n## Quick-Start One-Liners\n\n```bash\n# See what pages exist (catalog index; auto-syncs if needed)\ncms-edit list --type page\n\n# Open a page and inspect it\ncms-edit open --page-slug /about\ncms-edit snapshot\n\n# Edit a field\ncms-edit set @c1 heading \"New heading\"\ncms-edit save\n\n# Create a complete new page from a JSON definition\ncms-edit create from-json --json '{...}'\n\n# Validate a JSON file without writing anything\ncms-edit create from-json --json '{...}' --dry-run\n\n# Bootstrap taxonomy for import scripts\ncms-edit create taxonomy-from-json --json '{...}' --if-not-exists\n\n# Import authors from JSON\ncms-edit create person-from-json --json '{...}' --if-not-exists\n\n# Bulk retag articles\ncms-edit article-tags-from-json --json '{...}'\n\n# Sitewide rich-text find-replace (dry-run first)\ncms-edit bulk-rtf-replace --find \"Old\" --replace-plain \"New\" --dry-run\n\n# Run a batch of edits\ncms-edit batch run --json '[...]'\n```\n\n---\n\n## Commands by Category\n\n### Navigation & Discovery\n\n**Content discovery** uses the local catalog index (`index sync`) and `list --type <type>`. Catalog types: `page`, `article`, `pageVariant`, `template`, `articleType`, `tagType`, `tag`, `navigation`, `navigationItem`, `banner`, `pageTest`, `customType`. Other types (e.g. `person`): `list --type <type>` via the Contentful API.\n\n| Command | Description |\n|---|---|\n| `open --page-slug <slug>` | Load a page into the session (see `help lookup`) |\n| `open --resume` | Re-print active session; **keeps** staged edits (no refetch) |\n| `open --overwrite --confirm-discard …` | Replace session even if dirty (discards staged field edits) |\n| `set <ref\\|id> <field> <value>` | Set field; bare entry IDs allowed mid-session |\n| `set <id>:field=value …` | Scalar multi-set by entry ID (stays on current session) |\n| `open --id <id>` | Load by Contentful entry ID |\n| `peek --page-slug <slug>` | Print content tree + root field values without creating a session |\n| `peek --id <id>` | Same by Contentful entry ID |\n| `snapshot` | Re-print the current session's content tree with @refs |\n| `read [@ref] [field]` | Read fields from the active session (@refs from snapshot) |\n| `read <id> --id [field]` | Read entry fields by ID without an open session |\n| `list --type <ct>` | List catalog entries (page, article, pageVariant, template, taxonomy, nav, …) |\n| `search <query>` | Full-text search across entries |\n| `resolve <id>` | Resolve a Contentful entry or asset ID |\n| `resolve --page-slug <slug>` | Resolve an entry by flat lookup flag (no session); see `help lookup` |\n| `create tag-type\\|tag\\|article-type … --if-not-exists` | Idempotent taxonomy create (returns existing entry if slug matches) |\n| `schema types <content-type>` | List valid type-discriminator values |\n| `schema colours` | List valid backgroundColour / textColour values |\n| `schema <content-type>` | Display field definitions for a content type |\n| `health` | Check Contentful API connectivity |\n\n### Editing\n| Command | Description |\n|---|---|\n| `set <ref> <field> <value>` | Set a scalar, link, or array field |\n| `rtf <ref> <field> <markdown>` | Set a rich text field from markdown |\n| `add <type> <contentType>` | Create and link a new child entry |\n| `remove <ref>` | Unlink an entry from its parent |\n| `move <ref> <position>` | Reorder an entry in its parent array |\n| `links <subcommand>` | Manage CTA link entries |\n| `nav <subcommand>` | Manage navigation entries |\n| `asset <subcommand>` | Work with assets |\n\n### Session Management\n| Command | Description |\n|---|---|\n| `diff` | Show unsaved changes |\n| `save` | Write changes to Contentful as drafts |\n| `discard` | Discard unsaved changes |\n\n### Content Creation\n| Command | Description |\n|---|---|\n| `create from-json` | Create a page/article from `--json` / `--json-base64` |\n| `export from-json` | Export the open session as from-json |\n| `apply from-json` | Apply from-json to the open session |\n| `create taxonomy-from-json` | Batch-create tagType, articleType, and tag entries |\n| `create person-from-json` | Batch-create person entries from JSON |\n| `create person` | Create a person entry (draft). `--person-type-id` / `--person-type-slug` link a person type. `--indexed` and `--hidden` take `true` or `false`. |\n| `create person-type` | Create a personType entry (draft). `--person-page-template-id` links the profile template. |\n| `article-tags-from-json` | Set tags on articles from JSON |\n| `bulk-rtf-replace` | Find-replace in Rich Text across entry trees |\n| `create tag-type` | Create a tagType entry (draft) |\n| `create article-type` | Create an articleType entry (draft) |\n| `create tag` | Create a tag entry (draft) |\n| `create page` | Create a blank page interactively |\n| `create article` | Create a blank article interactively |\n| `create banner` | Create a site banner (draft) |\n| `create page-variant` | Create a page variant and open it |\n| `create page-test` | Create a page test (draft) |\n| `create custom-type` | Create a custom type and open it |\n\n### Batch Operations\n| Command | Description |\n|---|---|\n| `batch set <entryId>:field=value …` | Queue scalar updates by ID (page session OK mid-edit; then `save`) |\n| `batch diff` / `batch save` / `batch discard` | Review and commit batch session |\n| `batch run --json <json> or --json-base64 <encoded>` | Execute a JSON batch of operations |\n\n### Utilities\n| Command | Description |\n|---|---|\n| `asset review` | Audit visual assets (filename, alt, size, dimensions) |\n| `preview url` | Generate a page preview URL |\n| `preview showcase` | Generate a component/collection showcase URL |\n| `preview` | Generate preview URLs |\n\nAgent skills: `npx skills add @se-studio/skills`\n\n---\n\n## Global Options\n\n| Option | Description |\n|---|---|\n| `--space <name>` | Override the default space from config |\n| `--config <path>` | Path to `.contentful-cms.json` |\n| `--session <name>` | Named session for concurrent workflows |\n| `--json` | Machine-readable JSON output |\n| `--docs` | Print path to the full README |\n\n---\n\n## Further Reading\n\n- `cms-edit guide overview` — hosted/MCP getting started\n- `cms-edit help workflow` — step-by-step editing guide\n- `cms-edit help create-from-json` — single-shot page creation\n- `cms-edit help taxonomy-from-json` — batch taxonomy bootstrap\n- `cms-edit help fields-taxonomy` — tagType, articleType, and tag field reference\n- `cms-edit help batch-run` — JSON operation scripts and variable binding\n- `cms-edit help fields-page` — complete page field reference\n- `cms-edit --docs` — full README path (for reading in an editor)", "lookup": "# Flat lookup flags (`open`, `peek`, `resolve`)\n\ncms-edit resolves entries using **explicit flags** — not positional slugs. Provide **exactly one** primary lookup flag per command. Scope flags (for example `--tag-type-name` with `--tag-name`, or `--nav-id` with `--nav-item-title`) do not count as a second primary.\n\n`cms-edit nav open` is separate: pass **`--nav-id` or `--nav-name`**, never `--id`. `--nav-id` alone is not a `resolve` primary.\n\nRun `cms-edit index sync` once per space (or let commands auto-sync) so catalog types resolve from the local index.\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `cms-edit open` | Start an editing session |\n| `cms-edit peek` | Preview tree + root fields without a session |\n| `cms-edit resolve` | Print entry summary or `--json` (no session) |\n| `cms-edit nav open` | Open a `navigation` entry session |\n\n## Entry ID\n\n```bash\ncms-edit open --id 4xKj2abcDefGhijK\ncms-edit resolve --id 4xKj2abcDefGhijK\n```\n\n## Pages\n\n| Flag | Contentful field |\n|------|------------------|\n| `--page-slug` | `slug` (leading/trailing `/` stripped) |\n| `--page-title` | `title` |\n| `--page-cms-label` | `cmsLabel` |\n\n**Homepage (SE Studio standard):** Contentful slug is `index`; public URL is `/`. These are equivalent:\n\n```bash\ncms-edit open --page-slug /\ncms-edit open --page-slug /index\n```\n\n`list --type page` shows slugs as stored in Contentful. Non-standard homepage slugs (e.g. Pedestal `home`) are documented in the editor-pack `routing` resource; open with `--page-slug /` or the CMS slug from routing.\n\n```bash\ncms-edit open --page-slug /pricing/\ncms-edit peek --page-slug /pricing/\ncms-edit open --page-cms-label \"Hepatology Solutions Page\"\ncms-edit resolve --page-title \"Test page for nick\"\n```\n\n## Articles\n\n| Flag | Contentful field |\n|------|------------------|\n| `--article-slug` | `slug` |\n| `--article-title` | `title` |\n| `--article-cms-label` | `cmsLabel` |\n\n```bash\ncms-edit open --article-slug resources/publications/my-post\ncms-edit list --type article --article-type-name \"Publications\"\n```\n\n## Page variants\n\n| Flag | Contentful field |\n|------|------------------|\n| `--page-variant-slug` | `slug` |\n| `--page-variant-title` | `title` |\n| `--page-variant-cms-label` | `cmsLabel` |\n\n## Banners, page tests, custom types\n\n| Flag | Contentful field |\n|------|------------------|\n| `--banner-label` | `banner.cmsLabel` |\n| `--page-test-label` | `pageTest.cmsLabel` |\n| `--custom-type-slug` | `customType.slug` |\n| `--custom-type-name` | `customType.name` |\n\n```bash\ncms-edit open --banner-label \"Spring promo\"\ncms-edit open --custom-type-slug people\n```\n\n## Taxonomy\n\n| Type | Slug | Name | cmsLabel |\n|------|------|------|----------|\n| tag | `--tag-slug` | `--tag-name` | `--tag-cms-label` |\n| tagType | `--tag-type-slug` | `--tag-type-name` | — |\n| articleType | `--article-type-slug` | `--article-type-name` | — |\n\nScope tags under a tag type (optional):\n\n```bash\ncms-edit resolve --tag-name \"Hepatology\" --tag-type-name \"Therapeutic Area\"\ncms-edit list --type tag --tag-type-slug therapeutic-area\n```\n\nTemplates use **cmsLabel** only:\n\n```bash\ncms-edit open --template-label \"Default page template\"\ncms-edit resolve --label \"Default page template\" # alias for --template-label\n```\n\n## Navigation\n\nNavigation entries use the **`name`** field (not slug).\n\n| Flag | Resolves |\n|------|----------|\n| `--nav-id` | `navigation` entry ID |\n| `--nav-name` | `navigation.fields.name` |\n| `--nav-item-id` | `navigationItem` entry ID |\n| `--nav-item-title` | `navigationItem.fields.title` |\n\nWhen multiple nav items share a title, add **`--nav-id`** to scope `resolve` (do not use `--nav-id` alone on `resolve`):\n\n```bash\ncms-edit nav open --nav-id <navigation-entry-id>\ncms-edit nav open --nav-name \"Main header\"\ncms-edit resolve --nav-item-title \"Contact\" --nav-id <navigation-entry-id>\n```\n\n## List filters (index)\n\n```bash\ncms-edit list --type page\ncms-edit list --type article --article-type-slug resources/publications\ncms-edit list --type tag --tag-type-name \"Therapeutic Area\"\ncms-edit list --type navigation\ncms-edit list --type navigationItem\n```\n\nUse `--force-cma` to paginate via the Management API instead of the catalog.\n\n## Breaking changes (1.x → catalog flags)\n\n| Old | New |\n|-----|-----|\n| `cms-edit open /pricing` | `cms-edit open --page-slug pricing` |\n| `cms-edit peek /pricing` | `cms-edit peek --page-slug pricing` |\n| `cms-edit open <id> --id` | `cms-edit open --id <id>` |\n| `cms-edit nav open footer` | `cms-edit nav open --nav-name \"Footer\"` |\n| `cms-edit resolve --type tag --slug x` | `cms-edit resolve --tag-slug x` |\n\n## Ambiguity\n\nIf two entries share the same slug, title, or cmsLabel in the index, cms-edit prints all matching IDs and exits with an error. Fix duplicates in Contentful or resolve by `--id`.\n", "patterns": "# Help: patterns\n\nCensus **published** page and article construction from the Contentful Delivery API. Writes `page-patterns.json` and `page-patterns.md` for editor-pack and agents.\n\nLocal CLI only (same class as `editor-pack`). Hosted agents **read** `cms-edit://customer/page-patterns` after the pack is regenerated — they do not run generate.\n\n## Commands\n\n```bash\ncms-edit patterns generate --project-config cms-edit/<site>/project.json\ncms-edit patterns show --project-config cms-edit/<site>/project.json\n```\n\nRequires `CONTENTFUL_ACCESS_TOKEN` (Delivery token) in the app `.env.local`. Uses `spaceId` / `environment` from `project.json`.\n\nDefault output: `docs/cms-editor/<projectKey>/`. Then:\n\n```bash\ncms-edit editor-pack generate --project-config cms-edit/<site>/project.json\n```\n\n## What it captures\n\n- Slug-prefix page families (nested splits when a child prefix has ≥3 pages)\n- Article types (empty body vs chained rich text)\n- Location entries (even when `content` is empty)\n- Required/optional stack types, shared block IDs, clone slug\n\nDoes **not** rewrite brand playbooks. Structure only.\n\n## Agents\n\nAfter the pack includes `page-patterns.md`, read `cms-edit://customer/page-patterns` before `task-clone-page` or creating a page/article in a known family.\n", "person-from-json": "# cms-edit create person-from-json — Batch Author Import\n\n`create person-from-json` creates multiple `person` entries from a single JSON file. Use it for spreadsheet-to-CMS author imports and team directory bootstraps.\n\n```bash\ncms-edit create person-from-json --json '{...}' --dry-run\ncms-edit create person-from-json --json '{...}' --if-not-exists\n```\n\nAll entries are created as **drafts**. Nothing is published automatically.\n\n**Not transactional:** If the command fails partway through, entries created earlier remain in the space. Re-run with `--if-not-exists` to continue idempotently.\n\n---\n\n## JSON schema\n\n```jsonc\n{\n \"persons\": [\n {\n \"slug\": \"jane-smith\",\n \"name\": \"Jane Smith\",\n \"jobTitle\": \"Chief Medical Officer\",\n \"description\": \"Short card blurb\",\n \"emailAddress\": \"jane@example.com\",\n \"phoneNumber\": \"+1 555 0100\",\n \"bioMarkdown\": \"## Bio\\n\\nMarkdown converted to Rich Text.\",\n \"fields\": {\n \"location\": \"Boston\"\n }\n }\n ]\n}\n```\n\n| Key | Required | Description |\n|---|---|---|\n| `slug` | Yes | URL slug |\n| `name` | Yes | Display name and on-page heading. Document `<title>` uses this when `metaTitle` is empty |\n| `metaTitle` | No | Optional search-result title. Pass it in `fields`. Does not change the on-page heading |\n| `cmsLabel` | No | CMS label when the Person content type has that field (defaults to `name`). Omitted when the editor label is `name` |\n| `jobTitle` | No | Job title (CLI flags override JSON `fields` on single-entry create) |\n| `description` | No | Short description |\n| `emailAddress` | No | Email |\n| `phoneNumber` | No | Phone |\n| `bioMarkdown` | No | Bio as Markdown (converted to Rich Text `bio` field) |\n| `fields` | No | Additional Contentful field values |\n\nYou can also pass a full Rich Text document on `bio` inside `fields` instead of `bioMarkdown`.\n\n---\n\n## Single-entry alternative\n\n```bash\ncms-edit create person --slug jane-smith --name \"Jane Smith\" --job-title \"CMO\" --bio-file bio.md\ncms-edit create person --slug jane-smith --name \"Jane Smith\" --if-not-exists\n```\n\n---\n\n## Link authors to articles\n\nAfter import, link person IDs to articles in a session:\n\n```bash\ncms-edit open --article-slug blog/my-post\ncms-edit set @p0 authors <personId1>,<personId2> --links\ncms-edit diff && cms-edit save\n```\n\nOr batch-link in a `cms-edit batch run` ops file.\n\n---\n\n## Related commands\n\n| Command | Purpose |\n|---|---|\n| `cms-edit create person` | Create one person. Optional `--person-type-id`, `--person-type-slug`, `--indexed`, `--hidden` |\n| `cms-edit create person-type` | Create one person type (draft) |\n| `cms-edit create person … --if-not-exists` | Idempotent single create |\n| `cms-edit help fields` | Field overview |", "publish": "# Publish, unpublish, archive, revalidate\n\n`save` writes drafts. These commands publish only after a plan and an explicit yes.\n\nThe signed-in Contentful user must be allowed to publish, unpublish, or archive. If the role cannot, the command stops before anything is written. AI Editor cannot publish.\n\n## Plan, then yes\n\n```\ncms-edit publish plan\ncms-edit publish choose --plan <id> --scope all\ncms-edit publish apply --plan <id>\n```\n\n`plan` is read-only. If someone else also changed an entry, the plan waits. Ask whether to publish all of those entries or only this user's. Record that with `choose`. Apply only after the user says yes. The same pattern exists for `unpublish`, `archive`, and `revalidate`.\n\n## Targets\n\nOpen a page, then `publish plan` publishes that page's draft and changed assets and components, then the page. `--from-session` does the same for the open session. On that path, a component plan climbs through other components and stops at the first page, article, or other root. A template on that path is republished itself.\n\n`publish plan --id <entryId>` publishes only the ids you name. Repeat `--id` for more than one. It does not publish linked drafts or the pages that use those entries. `--with-parents` opts into that parent republish.\n\n```\ncms-edit publish plan --content-type schema\ncms-edit publish plan --content-type schema --since 2026-10-02\ncms-edit publish plan --id <entryId>\ncms-edit publish plan --id <entryId> --with-parents\ncms-edit publish plan --from-session\n```\n\nSchema, template, and navigation publish through their own webhooks. Pages that use them are not republished. A schema that is linked only from an unpublished page is named in the plan.\n\nA site adds extra roots in `project.json`:\n\n```json\n\"publish\": { \"extraRootContentTypes\": [\"location\"] }\n```\n\nRegenerate the editor pack so hosted cms-edit reads `editor-pack/publish.json`.\n\n## Revalidate\n\n```\ncms-edit revalidate plan --id <pageId>\ncms-edit revalidate apply --plan <id>\n```\n\nThis refreshes production cache and does not publish. The host needs `REVALIDATION_SECRET` and `PRODUCTION_SITE_URL`.\n", "taxonomy-from-json": "# cms-edit create taxonomy-from-json — Batch Taxonomy Bootstrap\n\n`create taxonomy-from-json` creates multiple `tagType`, `articleType`, and `tag` entries from a single JSON file. It is the recommended way to bootstrap taxonomy for import scripts and publication workflows.\n\n```bash\ncms-edit create taxonomy-from-json --json '{...}' --dry-run\ncms-edit create taxonomy-from-json --json '{...}' --if-not-exists\n```\n\nProcessing order: **tagTypes → articleTypes → tags** (tags depend on tagTypes).\n\nAll entries are created as **drafts**. Nothing is published automatically.\n\n**Not transactional:** If the command fails partway through (e.g. a tag fails validation), entries created earlier in the same run remain in the space. Re-run with `--if-not-exists` to continue idempotently, or fix the JSON and run again.\n\n**Not parallel-safe:** `--if-not-exists` is check-then-create. Running two imports concurrently for the same slug can create duplicates. Process items sequentially per slug, or re-run to converge.\n\n---\n\n## JSON schema\n\n```jsonc\n{\n \"tagTypes\": [\n {\n \"slug\": \"presentation-type\",\n \"name\": \"Presentation Type\",\n \"fields\": { \"show\": true }\n }\n ],\n \"articleTypes\": [\n {\n \"slug\": \"resources/publications\",\n \"name\": \"Publications\",\n \"cmsLabel\": \"Publications\",\n \"fields\": { \"indexed\": true, \"hidden\": false }\n }\n ],\n \"tags\": [\n {\n \"slug\": \"asco-2025\",\n \"name\": \"ASCO 2025\",\n \"tagTypeSlug\": \"conference-venue\",\n \"fields\": { \"description\": \"ASCO Annual Meeting 2025\" }\n }\n ]\n}\n```\n\nEach item supports the same field shorthands as single-entry creates. See `cms-edit help fields-taxonomy` for the full field reference and link shorthand table.\n\n| Key | Required on item | Description |\n|---|---|---|\n| `slug` | Yes | URL slug |\n| `name` | Yes | Display name |\n| `cmsLabel` | No | CMS label (articleType/tag) |\n| `fields` | No | Raw Contentful field values |\n| `tagTypeSlug` / `tagTypeId` | Tags only | Parent tagType link |\n\nTop-level link shorthands (`templateId`, `featuredImageId`, `topContentIds`, etc.) can also appear on each item.\n\n---\n\n## Options\n\n| Option | Description |\n|---|---|\n| `--json <json> or --json-base64 <encoded>` | Path to taxonomy JSON (required) |\n| `--if-not-exists` | Skip creation when slug already exists; return existing ID |\n| `--dry-run` | Validate all entries and link targets without writing |\n\n---\n\n## Output\n\nHuman mode prints a summary per entry. JSON mode (`CMS_EDIT_JSON=1` or `--json-output`):\n\n```json\n{\n \"ok\": true,\n \"tagTypes\": [{ \"id\": \"...\", \"slug\": \"...\", \"contentType\": \"tagType\", \"status\": \"created\" }],\n \"articleTypes\": [{ \"id\": \"...\", \"slug\": \"...\", \"contentType\": \"articleType\", \"status\": \"existing\" }],\n \"tags\": [{ \"id\": \"...\", \"slug\": \"...\", \"contentType\": \"tag\", \"status\": \"created\" }]\n}\n```\n\n---\n\n## Idempotent import pattern\n\nCombine batch bootstrap with `create … --if-not-exists` and `resolve` for script-friendly imports:\n\n```bash\n# One-time taxonomy bootstrap\ncms-edit create taxonomy-from-json --json '{...}' --if-not-exists\n\n# Look up IDs in scripts\ncms-edit resolve --tag-type-slug presentation-type --json\ncms-edit resolve --tag-slug asco-2025 --json\n\n# Add a single entry idempotently\ncms-edit create tag --slug new-tag --name \"New Tag\" --tag-type presentation-type --if-not-exists\n```\n\n---\n\n## Related commands\n\n| Command | Purpose |\n|---|---|\n| `cms-edit create tag-type` | Create one tagType |\n| `cms-edit create article-type` | Create one articleType |\n| `cms-edit create tag` | Create one tag |\n| `cms-edit create … --if-not-exists` | Idempotent single-entry create |\n| `cms-edit help fields-taxonomy` | Full field reference |\n", "workflow": "# cms-edit — Standard Editing Workflow\n\nThe standard workflow is: **open → snapshot → read/edit → diff → save**.\n\n---\n\n## Step 1: Discover What Exists\n\n```bash\n# List all pages with slugs\ncms-edit list --type page\n\n# Search for entries by text\ncms-edit search \"hepatology\"\n```\n\n---\n\n## Step 2: Open a Page or Article\n\n```bash\ncms-edit open --page-slug /solutions/hepatology\n# or by entry ID:\ncms-edit open --id 4xKpzQ2abc123\n# include template menu/footer/nav (off by default):\ncms-edit open --include-chrome --page-slug /solutions/hepatology\n```\n\n`open` fetches the page/article tree (and the template entry) and saves it to a local session file. It does **not** walk template menu/footer/navigation unless you pass `--include-chrome`. All subsequent commands operate on this session without re-fetching from Contentful until you `save`.\n\n### Critical: do not re-open while edits are staged\n\n`set` / `rtf` / parent links from `add` stay in the session until `save`. Calling `open` again **replaces** the session.\n\n| Situation | Command |\n|-----------|---------|\n| Session has unsaved changes, need tree again | `cms-edit open --resume` (no refetch; keeps staged edits) |\n| Intentionally abandon staged work and load another entry | `cms-edit open --overwrite --confirm-discard --id <id>` (or `discard` then `open`) |\n| Plain `open` while dirty | **Hard fail** with remediation steps |\n\n```bash\ncms-edit open --resume\ncms-edit diff\ncms-edit save\n# or abandon:\ncms-edit discard\ncms-edit open --id <other>\n```\n\n**Output:**\n```\n✓ Opened /solutions/hepatology (12 entries)\n\n@c0 page [draft] solutions/hepatology\n @c1 component [draft] Image Hero\n @c2 component [draft] Text Block\n @c3 collection [draft] Timeline\n @c4 component [draft] Timeline Item 1\n @c5 component [draft] Timeline Item 2\n @c6 component [draft] Disease Areas\n```\n\n---\n\n## Step 3: Inspect the Content Tree\n\n```bash\n# Re-print the tree at any time\ncms-edit snapshot\n\n# Read all fields on an entry\ncms-edit read @c2\n\n# Read a specific field\ncms-edit read @c2 heading\n```\n\n**Example `read @c2` output:**\n```\n@c2 component [draft] Text Block\n heading: \"Our Approach\"\n body: (rich text, 2 paragraphs)\n backgroundColour: null\n```\n\n---\n\n## Step 4: Edit Fields\n\n### Scalar fields (text, boolean, number)\n```bash\ncms-edit set @c2 heading \"New Heading\"\ncms-edit set @c2 backgroundColour \"Navy\"\n```\n\n### Mid-session by Contentful entry ID (e.g. media autoplay)\n\nYou do **not** need to leave the page session:\n\n```bash\n# Bare entry ID (fetched into the session if not in the tree)\ncms-edit set 5uMh54rIsJRFRQSXDuJiG autoplay true\n\n# Same shape as batch set — stays on the current page session\ncms-edit set 5uMh54rIsJRFRQSXDuJiG:autoplay=true 5uMh54rIsJRFRQSXDuJiG:loop=true\n# or: cms-edit batch set … (also allowed mid-page; then cms-edit save)\n```\n\n### Entry links: `--link` vs `--links` (strict)\n\n| Field shape | Flag | Notes |\n|-------------|------|--------|\n| Single Entry link | `--link` | Exactly one id |\n| Array of Entry links | `--links` | Full replace of the array |\n| Append to array | `--links --append` | Add ids |\n| Wrong flag | hard error | Never silently coerces |\n\n```bash\ncms-edit set @c1 visual <mediaEntryId> --link\ncms-edit set @c2 contents <id1>,<id2> --links\n# To change one array item: read the array, edit the list, write all ids back with --links\n```\n\n### Rich text fields\n```bash\n# Inline markdown (short content)\ncms-edit rtf @c2 body \"## Overview\\n\\nFirst paragraph.\\n\\nSecond paragraph.\"\n\n# From a file (long content)\ncms-edit rtf @c2 body --content \"# ...\"\n```\n\n### Multi-value: replacing inline content\n```bash\n# Replace a specific text phrase in a rich text field\ncms-edit rtf replace @c2 body --find \"old phrase\" --replace-plain \"new phrase\"\n```\n\n### Links (CTAs)\n```bash\n# Add a new external CTA link\ncms-edit links add @c2 --type external --label \"Learn More\" --href \"https://example.com\"\n\n# Add an internal link (to another page by slug)\ncms-edit links add @c2 --type internal --label \"Our Team\" --slug /team\n```\n\n### Adding new entries\n```bash\n# Add a new component to the page's content array\ncms-edit add HeroSimple component\n\n# Add a child item to a collection\ncms-edit add Generic component --parent @c3\n\n# Add after a specific entry\ncms-edit add Generic component --after @c5\n```\n\n**Important:** After any `add` or `remove`, re-run `cms-edit snapshot` — @ref numbers change after structural edits.\n\n---\n\n## Step 5: Review Changes\n\n```bash\ncms-edit diff\n```\n\nShows a summary of which entries have been modified and which fields changed.\n\n---\n\n## Step 6: Save\n\n```bash\ncms-edit save\n```\n\nWrites all changes to Contentful as **drafts**. Nothing is published. A human must review and publish in the Contentful web app.\n\n---\n\n## Common Patterns\n\n### Edit a specific component's heading and body\n```bash\ncms-edit open --page-slug /about\ncms-edit snapshot\ncms-edit set @c3 heading \"Updated heading\"\ncms-edit rtf @c3 body \"New body text\\n\\nSecond paragraph.\"\ncms-edit diff\ncms-edit save\n```\n\n### Add a new section to an existing page\n```bash\ncms-edit open --page-slug /home\ncms-edit snapshot\n# Add a new Text Block after @c2\ncms-edit add TextBlock component --after @c2\ncms-edit snapshot # re-snapshot to see the new ref\ncms-edit set @c3 heading \"New Section\"\ncms-edit rtf @c3 body \"Section content.\\n\\nMore detail.\"\ncms-edit save\n```\n\n### Fix a field on multiple pages\nUse `--session` to work on multiple pages without losing state:\n```bash\ncms-edit --session fix-1 open --page-slug /page-one\ncms-edit --session fix-1 set @c1 heading \"Fixed\"\ncms-edit --session fix-1 save\n\ncms-edit --session fix-2 open --page-slug /page-two\ncms-edit --session fix-2 set @c1 heading \"Fixed\"\ncms-edit --session fix-2 save\n```\n\n---\n\n## Creating New Pages\n\nFor creating complete new pages with components, use `create from-json` instead of the interactive `add` workflow:\n\n```bash\ncms-edit help create-from-json\n```\n\n---\n\n## Status Badges\n\n| Badge | Meaning |\n|---|---|\n| `[published]` | Entry is live in Contentful (no draft changes) |\n| `[draft]` | Entry has unpublished changes or has never been published |\n| `[changed]` | Entry has been modified in this session (unsaved) |\n| `[pending]` | Entry is scheduled for deletion in this session |\n" };
3
3
  export const EMBEDDED_HELP_TOPIC_NAMES = ["article-tags-from-json", "asset-review", "batch", "batch-run", "bulk-rtf-replace", "create-editor-entries", "create-from-json", "fields", "fields-article", "fields-collection", "fields-component", "fields-html-component", "fields-page", "fields-taxonomy", "index", "index-sync", "lookup", "patterns", "person-from-json", "publish", "taxonomy-from-json", "workflow"];
4
4
  //# sourceMappingURL=help-topics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"help-topics.js","sourceRoot":"","sources":["../../src/generated/help-topics.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAA2B,EAAC,wBAAwB,EAAC,0rDAA0rD,EAAC,cAAc,EAAC,w8DAAw8D,EAAC,WAAW,EAAC,wnPAAwnP,EAAC,OAAO,EAAC,+2GAA+2G,EAAC,kBAAkB,EAAC,qwEAAqwE,EAAC,uBAAuB,EAAC,ksEAAksE,EAAC,kBAAkB,EAAC,mwgBAAmwgB,EAAC,gBAAgB,EAAC,o4MAAo4M,EAAC,mBAAmB,EAAC,muIAAmuI,EAAC,kBAAkB,EAAC,28JAA28J,EAAC,uBAAuB,EAAC,s8HAAs8H,EAAC,aAAa,EAAC,6+GAA6+G,EAAC,iBAAiB,EAAC,u/OAAu/O,EAAC,QAAQ,EAAC,okFAAokF,EAAC,YAAY,EAAC,8jNAA8jN,EAAC,OAAO,EAAC,i2RAAi2R,EAAC,QAAQ,EAAC,g3JAAg3J,EAAC,UAAU,EAAC,4xCAA4xC,EAAC,kBAAkB,EAAC,+yFAA+yF,EAAC,SAAS,EAAC,+xDAA+xD,EAAC,oBAAoB,EAAC,q0HAAq0H,EAAC,UAAU,EAAC,89MAA89M,EAAC,CAAC;AAC5pyG,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,wBAAwB,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,EAAC,kBAAkB,EAAC,uBA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AuB,EAAC,aAAa,EAAC,iBAAiB,EAAC,OAAO,EAAC,YAAY,EAAC,QAAQ,EAAC,UAAU,EAAC,kBAAkB,EAAC,SAAS,EAAC,oBAAoB,EAAC,UAAU,CAAU,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export declare const CMS_EDIT_PACKAGE_NAME = "@se-studio/contentful-cms";
2
- export declare const CMS_EDIT_VERSION = "3.15.1";
2
+ export declare const CMS_EDIT_VERSION = "3.15.2";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Generated by scripts/generate-embedded-assets.mjs — do not edit manually.
2
2
  export const CMS_EDIT_PACKAGE_NAME = "@se-studio/contentful-cms";
3
- export const CMS_EDIT_VERSION = "3.15.1";
3
+ export const CMS_EDIT_VERSION = "3.15.2";
4
4
  //# sourceMappingURL=version.js.map
@@ -11,7 +11,9 @@ export interface ReleaseCma {
11
11
  allowed: boolean;
12
12
  reason?: string;
13
13
  };
14
- loadNodes(ids: string[], extraRoots: readonly string[]): Promise<Map<string, GraphNode>>;
14
+ loadNodes(ids: string[], extraRoots: readonly string[], options?: {
15
+ walk?: boolean;
16
+ }): Promise<Map<string, GraphNode>>;
15
17
  loadByContentType(contentType: string, since: string | undefined, limit: number): Promise<{
16
18
  nodes: GraphNode[];
17
19
  total: number;
@@ -1 +1 @@
1
- {"version":3,"file":"cma.d.ts","sourceRoot":"","sources":["../../src/publish/cma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKtD,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,WAAW,CAAC;AA0DnB,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;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,EACzB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACrD,YAAY,CACV,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,OAAO,CAAC;QAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACvD,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;CACvF;AA+BD,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA2K9E"}
@@ -115,10 +115,12 @@ export async function createReleaseCma(space) {
115
115
  contentType: node.contentType,
116
116
  });
117
117
  },
118
- async loadNodes(ids, extraRoots) {
118
+ async loadNodes(ids, extraRoots, options) {
119
119
  const into = new Map();
120
120
  const targets = new Set(ids);
121
121
  await ensureNodes(ids, into);
122
+ if (options?.walk === false)
123
+ return into;
122
124
  const pending = new Set(ids);
123
125
  const queued = new Set(ids);
124
126
  while (pending.size > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"cma.js","sourceRoot":"","sources":["../../src/publish/cma.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAuB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAgD,MAAM,kBAAkB,CAAC;AAClG,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GAGjB,MAAM,WAAW,CAAC;AAEnB,MAAM,SAAS,GAAG,GAAG,CAAC;AAItB,SAAS,QAAQ,CAAC,IAA2C;IAC3D,OAAO,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC;AACvB,CAAC;AAED,SAAS,MAAM,CACb,MAA+B,EAC/B,IAAuB,EACvB,MAAc;IAEd,MAAM,WAAW,GACf,IAAI,KAAK,OAAO,IAAI,aAAa,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/F,MAAM,MAAM,GAAG,MAAM,CAAC,MAA6D,CAAC;IACpF,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE;QACjB,IAAI;QACJ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,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;YACvD,oBAAoB,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;YAC1D,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;QACD,KAAK,CAAC,cAAc,CAAC,EAAE;YACrB,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QAChD,CAAC;QACD,KAAK,CAAC,YAAY,CAAC,EAAE;YACnB,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9C,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,EAAE;YAClB,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;YACtD,OAAO,KAAK,CAAC,MAA6D,CAAC;QAC7E,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -90,6 +90,8 @@ export interface PublishPlanInput {
90
90
  targetIds: string[];
91
91
  parentsByEntryId?: Map<string, EntryParent[]>;
92
92
  upstreamRootIds?: string[];
93
+ /** When false, the plan is the named targets only. Default walks links and upstream roots. */
94
+ walkLinks?: boolean;
93
95
  truncated?: boolean;
94
96
  upstreamTruncated?: boolean;
95
97
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/publish/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,kBAAkB,CAAC;AAGrE,eAAO,MAAM,WAAW,QAAiB,CAAC;AAC1C,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,MA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O,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAqDD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAsMrE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,IAAI,CAAC;IACV,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;CACnC,GAAG,WAAW,CAgDd;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,IAAI,CAAC;IACV,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB,GAAG,WAAW,CA+Bd;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,GAAG,WAAW,CAKhF;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,QAAQ,EAAE,CAK3D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,CAevF"}
@@ -72,6 +72,7 @@ function sortItems(items, extraRoots) {
72
72
  }
73
73
  export function buildPublishPlan(input) {
74
74
  const extraRoots = input.extraRoots;
75
+ const walkLinks = input.walkLinks !== false;
75
76
  const nodes = input.nodes;
76
77
  const targetIds = input.targetIds.slice(0, MAX_TARGETS);
77
78
  const targetSet = new Set(targetIds);
@@ -101,7 +102,7 @@ export function buildPublishPlan(input) {
101
102
  }
102
103
  seen.add(current.id);
103
104
  depth.set(current.id, current.depth);
104
- if (node.kind === 'asset')
105
+ if (!walkLinks || node.kind === 'asset')
105
106
  continue;
106
107
  for (const link of node.links) {
107
108
  if (seen.has(link.id))
@@ -181,7 +182,8 @@ export function buildPublishPlan(input) {
181
182
  items.push(itemFor(node, 'touch', 0, input.userId, ['touch']));
182
183
  }
183
184
  const upstream = [];
184
- for (const rootId of (input.upstreamRootIds ?? []).slice(0, MAX_UPSTREAM)) {
185
+ const upstreamRootIds = walkLinks ? (input.upstreamRootIds ?? []) : [];
186
+ for (const rootId of upstreamRootIds.slice(0, MAX_UPSTREAM)) {
185
187
  const root = nodes.get(rootId);
186
188
  if (!root)
187
189
  continue;
@@ -222,7 +224,7 @@ export function buildPublishPlan(input) {
222
224
  notes.push(`${item.label} is linked from unpublished ${parent.contentType} "${parent.label}". Publishing the ${item.contentType ?? 'entry'} does not add it to the live page.`);
223
225
  }
224
226
  }
225
- if ((input.upstreamRootIds?.length ?? 0) > MAX_UPSTREAM) {
227
+ if (upstreamRootIds.length > MAX_UPSTREAM) {
226
228
  notes.push(`Upstream pages are capped at ${MAX_UPSTREAM}.`);
227
229
  }
228
230
  if (input.upstreamTruncated) {
@@ -1 +1 @@
1
- {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/publish/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnF,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAC1C,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAC9B,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAuE/B,MAAM,UAAU,YAAY,CAAC,IAAe;IAC1C,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAChC,IAAI,IAA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AC,CAAC;IAClG,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAiB,EAAE,MAAc,EAAE,GAAS;IAC/E,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IACD,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IACD,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CACb,yGAAyG,CAC1G,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
@@ -26,7 +26,8 @@ The signed-in Contentful user must have the matching role permission. AI Editor
26
26
  - The walk does not enter another page, article, or person, and it does not enter a shared template.
27
27
  - `schema`, `template`, `navigation`, and the other webhook types can be the target (`--content-type schema`, `--id`, or `--from-session`). Publishing them refreshes caches through their own webhook. Do not republish every page that uses them.
28
28
  - A schema linked only from an unpublished page is named in the plan. Publishing the schema does not add that link to the live page.
29
- - A component publishes its own changes, then the pages that use it. The parent walk climbs through components and collections and stops at the first root. A template on that path is republished itself, because its webhook refreshes the pages that use it. The walk does not continue into those pages.
29
+ - `publish plan --id` publishes only those ids. It does not pull in linked drafts or parent pages. Repeat `--id` to name more than one. `--with-parents` opts into the parent walk.
30
+ - An open page, `--from-session`, or `--id --with-parents` publishes the draft and what it needs. A component on that path publishes its own changes, then the pages that use it. The parent walk climbs through components and collections and stops at the first root. A template on that path is republished itself, because its webhook refreshes the pages that use it. The walk does not continue into those pages.
30
31
  - `location` is a root only when the site's `project.json` lists it under `publish.extraRootContentTypes` and the editor pack has been regenerated.
31
32
  - Unpublish and archive affect the named entries only, not their children. A published entry is unpublished before it is archived.
32
33
  - `redirect` is refused. Redirects go live on deploy.
@@ -16,12 +16,15 @@ cms-edit publish apply --plan <id>
16
16
 
17
17
  ## Targets
18
18
 
19
- Open a page, then `publish plan` publishes that page's draft and changed assets and components, then the page. A component plan climbs through other components and stops at the first page, article, or other root. A template on that path is republished itself.
19
+ Open a page, then `publish plan` publishes that page's draft and changed assets and components, then the page. `--from-session` does the same for the open session. On that path, a component plan climbs through other components and stops at the first page, article, or other root. A template on that path is republished itself.
20
+
21
+ `publish plan --id <entryId>` publishes only the ids you name. Repeat `--id` for more than one. It does not publish linked drafts or the pages that use those entries. `--with-parents` opts into that parent republish.
20
22
 
21
23
  ```
22
24
  cms-edit publish plan --content-type schema
23
25
  cms-edit publish plan --content-type schema --since 2026-10-02
24
26
  cms-edit publish plan --id <entryId>
27
+ cms-edit publish plan --id <entryId> --with-parents
25
28
  cms-edit publish plan --from-session
26
29
  ```
27
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "3.15.1",
3
+ "version": "3.15.2",
4
4
  "description": "CLI tool for AI agents to edit Contentful drafts and, when the user's role allows it, publish after an explicit yes",
5
5
  "repository": {
6
6
  "type": "git",