@se-studio/contentful-cms 2.5.1 → 2.6.1
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 +49 -12
- package/INSTALL.md +1 -1
- package/README.md +10 -17
- package/dist/audit/asset-usage.d.ts +29 -0
- package/dist/audit/asset-usage.d.ts.map +1 -0
- package/dist/audit/asset-usage.js +99 -0
- package/dist/audit/asset-usage.js.map +1 -0
- package/dist/audit/media-review.d.ts +6 -0
- package/dist/audit/media-review.d.ts.map +1 -1
- package/dist/audit/media-review.js.map +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +4 -22
- package/dist/cli/program.js.map +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/asset.d.ts.map +1 -1
- package/dist/commands/asset.js +15 -0
- package/dist/commands/asset.js.map +1 -1
- package/dist/commands/batch.d.ts.map +1 -1
- package/dist/commands/batch.js +5 -2
- package/dist/commands/batch.js.map +1 -1
- package/dist/commands/create-from-json.d.ts.map +1 -1
- package/dist/commands/create-from-json.js +24 -2
- package/dist/commands/create-from-json.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +3 -2
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/run.d.ts +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +3 -3
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/schema.d.ts.map +1 -1
- package/dist/commands/schema.js +228 -85
- package/dist/commands/schema.js.map +1 -1
- package/dist/generated/hosted-guide.d.ts +1 -1
- package/dist/generated/hosted-guide.d.ts.map +1 -1
- package/dist/generated/hosted-guide.js +1 -1
- package/dist/generated/hosted-guide.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/mcp/guide.js +1 -1
- package/dist/mcp/guide.js.map +1 -1
- package/dist/mcp/prompts/onboarding.js +7 -7
- package/dist/mcp/prompts/onboarding.js.map +1 -1
- package/dist/mcp/tools/cms-edit.d.ts +1 -1
- package/dist/mcp/tools/cms-edit.d.ts.map +1 -1
- package/dist/mcp/tools/cms-edit.js +1 -1
- package/docs/FUNCTIONAL_SPEC.md +2 -2
- package/docs/SKILLS.md +3 -3
- package/docs/editor-tasks/bulk-find-replace.md +2 -2
- package/docs/editor-tasks/seo-descriptions.md +1 -1
- package/docs/editor-tasks/taxonomy.md +2 -2
- package/docs/help/asset-review.md +6 -0
- package/docs/help/{run.md → batch-run.md} +8 -8
- package/docs/help/create-from-json.md +3 -2
- package/docs/help/fields-article.md +2 -2
- package/docs/help/fields-component.md +3 -3
- package/docs/help/fields-taxonomy.md +6 -6
- package/docs/help/fields.md +2 -2
- package/docs/help/index-sync.md +1 -1
- package/docs/help/index.md +23 -18
- package/docs/help/lookup.md +1 -1
- package/docs/help/person-from-json.md +3 -3
- package/docs/help/taxonomy-from-json.md +3 -3
- package/docs/help/workflow.md +1 -1
- package/docs/mcp/e2e-test-prompt.md +159 -0
- package/docs/mcp/hosted-guide.md +10 -6
- package/package.json +2 -3
- package/skills/README.md +2 -2
- package/skills/core/SKILL.md +33 -40
- package/skills/setup/SKILL.md +1 -1
- package/dist/bin/contentful-cms.d.ts +0 -3
- package/dist/bin/contentful-cms.d.ts.map +0 -1
- package/dist/bin/contentful-cms.js +0 -5
- package/dist/bin/contentful-cms.js.map +0 -1
- package/dist/commands/audit.d.ts +0 -4
- package/dist/commands/audit.d.ts.map +0 -1
- package/dist/commands/audit.js +0 -399
- package/dist/commands/audit.js.map +0 -1
- package/dist/commands/backup.d.ts +0 -3
- package/dist/commands/backup.d.ts.map +0 -1
- package/dist/commands/backup.js +0 -143
- package/dist/commands/backup.js.map +0 -1
- package/dist/commands/colours.d.ts +0 -4
- package/dist/commands/colours.d.ts.map +0 -1
- package/dist/commands/colours.js +0 -91
- package/dist/commands/colours.js.map +0 -1
- package/dist/commands/ensure.d.ts +0 -4
- package/dist/commands/ensure.d.ts.map +0 -1
- package/dist/commands/ensure.js +0 -152
- package/dist/commands/ensure.js.map +0 -1
- package/dist/commands/restore.d.ts +0 -4
- package/dist/commands/restore.d.ts.map +0 -1
- package/dist/commands/restore.js +0 -146
- package/dist/commands/restore.js.map +0 -1
- package/dist/commands/revert.d.ts +0 -4
- package/dist/commands/revert.d.ts.map +0 -1
- package/dist/commands/revert.js +0 -143
- package/dist/commands/revert.js.map +0 -1
- package/dist/commands/sitemap.d.ts +0 -4
- package/dist/commands/sitemap.d.ts.map +0 -1
- package/dist/commands/sitemap.js +0 -151
- package/dist/commands/sitemap.js.map +0 -1
- package/dist/commands/skill.d.ts +0 -4
- package/dist/commands/skill.d.ts.map +0 -1
- package/dist/commands/skill.js +0 -40
- package/dist/commands/skill.js.map +0 -1
- package/dist/commands/types.d.ts +0 -4
- package/dist/commands/types.d.ts.map +0 -1
- package/dist/commands/types.js +0 -78
- package/dist/commands/types.js.map +0 -1
- package/dist/session/backup.d.ts +0 -34
- package/dist/session/backup.d.ts.map +0 -1
- package/dist/session/backup.js +0 -64
- package/dist/session/backup.js.map +0 -1
- package/dist/skills/install.d.ts +0 -13
- package/dist/skills/install.d.ts.map +0 -1
- package/dist/skills/install.js +0 -37
- package/dist/skills/install.js.map +0 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Hosted MCP end-to-end test prompts
|
|
2
|
+
|
|
3
|
+
How to create and run **copy-paste QA prompts** for cms-edit hosted MCP (Claude Desktop Integrations + OAuth).
|
|
4
|
+
|
|
5
|
+
**Example instance:** [Brightline `MCP-E2E-TEST.md`](https://github.com/Brightline-Marketing/brightline-sites/blob/develop/docs/cms-edit/MCP-E2E-TEST.md) in `brightline-sites/docs/cms-edit/`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to run
|
|
10
|
+
|
|
11
|
+
| Trigger | Action |
|
|
12
|
+
|---------|--------|
|
|
13
|
+
| Bumped `@se-studio/contentful-cms` in customer repo | Regen editor pack → push → run E2E prompt |
|
|
14
|
+
| Regenerated `editor-pack/` | Push → run E2E prompt |
|
|
15
|
+
| OAuth / Redis / session bugs reported | Run phases 0 + 4 + session tips in [hosted-guide.md](./hosted-guide.md) |
|
|
16
|
+
| Major cms-edit CLI prune (e.g. 2.6.0) | Include **phase 9** negative tests for removed commands |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
1. Claude Desktop with the site's **custom connector** connected (Contentful OAuth complete).
|
|
23
|
+
2. Editor has **AI Editor** role on the space.
|
|
24
|
+
3. Hosted deployment healthy: `curl -s https://<host>/api/health | jq` — `config`, `redis`, `oauth` ok.
|
|
25
|
+
4. Do **not** pass `--space` in `cms_edit` args on hosted MCP.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Where to store site-specific prompts
|
|
30
|
+
|
|
31
|
+
| Repo layout | Recommended path |
|
|
32
|
+
|-------------|------------------|
|
|
33
|
+
| Customer monorepo (Brightline, Pedestal, SE Studio) | `docs/cms-edit/MCP-E2E-TEST.md` |
|
|
34
|
+
| Optional per-site in multi-site repo | `docs/cms-edit/<site>/MCP-E2E-TEST.md` |
|
|
35
|
+
|
|
36
|
+
Link from:
|
|
37
|
+
|
|
38
|
+
- Customer `cms-edit/README.md`
|
|
39
|
+
- Customer `AGENTS.md` (under CMS editing section)
|
|
40
|
+
- `docs/CMS_EDIT_SETUP.md` customer table (this monorepo)
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## How to create a new site prompt
|
|
45
|
+
|
|
46
|
+
### 1. Gather site facts
|
|
47
|
+
|
|
48
|
+
Read the deployed editor pack (or regenerate locally):
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cms-edit project doctor --project-config cms-edit/<site>/project.json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
From `cms-edit://customer/routing` and `capabilities.json`, note:
|
|
55
|
+
|
|
56
|
+
- Homepage CMS slug (`index` vs `home`)
|
|
57
|
+
- Articles base path, tags enabled/disabled
|
|
58
|
+
- Which tasks in `tasks-index` are enabled
|
|
59
|
+
- Example page slug for peek/open (pick a stable page, not a campaign LP)
|
|
60
|
+
- One real `componentType` for `preview showcase`
|
|
61
|
+
|
|
62
|
+
### 2. Use the phase template
|
|
63
|
+
|
|
64
|
+
Every E2E prompt should cover these phases (trim for smoke tests):
|
|
65
|
+
|
|
66
|
+
| Phase | Purpose | Customize per site |
|
|
67
|
+
|-------|---------|-------------------|
|
|
68
|
+
| **0** Connector | version, health, guide, help | Expected version range |
|
|
69
|
+
| **1** Customer resources | tasks-index, capabilities, routing, indexes | Confirm routing bullets |
|
|
70
|
+
| **2** Discovery | index status, list, resolve, search | Article/tag types if enabled |
|
|
71
|
+
| **3** Peek | Tree without session | Fallback slug if `/about` missing |
|
|
72
|
+
| **4** Session | open → snapshot → read → diff | Homepage slug from routing |
|
|
73
|
+
| **5** Schema | `schema colours`, `schema types`, `schema fields` | Any site-specific content types |
|
|
74
|
+
| **6** Media | `asset review`, optional `--include-usage --usage-limit 5` | Skip if index empty; do not combine `--include-passing` + `--include-usage` without a limit on hosted MCP |
|
|
75
|
+
| **7** Dry-run writes | set+discard, bulk-rtf dry-run, create from-json dry-run | Skip taxonomy if disabled |
|
|
76
|
+
| **8** Preview | `preview url`, `preview showcase` | Real component type name |
|
|
77
|
+
| **9** Negatives | Removed commands (sitemap, ensure, run, …) | Update when CLI changes |
|
|
78
|
+
|
|
79
|
+
### 3. Safety rules (always include)
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
- Do NOT pass --space on hosted MCP.
|
|
83
|
+
- Do NOT save or create without --dry-run.
|
|
84
|
+
- If you set fields, run discard before finishing.
|
|
85
|
+
- Report PASS / FAIL / SKIP per step.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 4. Final report format
|
|
89
|
+
|
|
90
|
+
Require a markdown results table and P0/P1/P2 fix list so runs are comparable across releases.
|
|
91
|
+
|
|
92
|
+
### 5. Ship with the customer repo
|
|
93
|
+
|
|
94
|
+
1. Add `docs/cms-edit/MCP-E2E-TEST.md` with site name, MCP URL, health URL, expected version.
|
|
95
|
+
2. Link from `cms-edit/README.md` and `AGENTS.md`.
|
|
96
|
+
3. Commit + push to deploy branch — **do not** `vercel deploy` manually (see `Agents.md`).
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Skeleton template
|
|
101
|
+
|
|
102
|
+
Copy into a new customer doc and replace `{{…}}` placeholders:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
# Hosted MCP end-to-end test ({{SITE_NAME}})
|
|
106
|
+
|
|
107
|
+
| MCP URL | {{MCP_URL}} |
|
|
108
|
+
| Expected cms-edit | {{VERSION}} |
|
|
109
|
+
| Deploy branch | {{BRANCH}} |
|
|
110
|
+
|
|
111
|
+
## Prompt
|
|
112
|
+
|
|
113
|
+
\`\`\`
|
|
114
|
+
You are exercising the {{SITE_NAME}} cms-edit hosted MCP end-to-end.
|
|
115
|
+
|
|
116
|
+
RULES
|
|
117
|
+
- Do NOT pass --space …
|
|
118
|
+
- Do NOT save …
|
|
119
|
+
- discard after any set …
|
|
120
|
+
|
|
121
|
+
PHASE 0 — …
|
|
122
|
+
PHASE 1 — Confirm: homepage slug `{{HOMEPAGE_SLUG}}`, articles `{{ARTICLES_BASE}}`
|
|
123
|
+
…
|
|
124
|
+
PHASE 9 — Negatives: sitemap, ensure, run
|
|
125
|
+
FINAL REPORT — table + P0/P1/P2
|
|
126
|
+
\`\`\`
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Shorter smoke variant
|
|
132
|
+
|
|
133
|
+
Document a **5-minute** subset in the same file:
|
|
134
|
+
|
|
135
|
+
- Phases **0, 1, 2, 4, 9** only — enough to catch connector, knowledge, discovery, session, and CLI regressions.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Built-in MCP prompts (lighter alternative)
|
|
140
|
+
|
|
141
|
+
For ad-hoc checks without the full E2E script:
|
|
142
|
+
|
|
143
|
+
| Prompt | Covers |
|
|
144
|
+
|--------|--------|
|
|
145
|
+
| `cms_edit_verify` | version + health + customer resources load |
|
|
146
|
+
| `cms_edit_explore` | list + open homepage + snapshot |
|
|
147
|
+
|
|
148
|
+
The full E2E prompt is for **release QA** and **regression matrices** after CLI or editor-pack changes.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Related docs
|
|
153
|
+
|
|
154
|
+
| Doc | Purpose |
|
|
155
|
+
|-----|---------|
|
|
156
|
+
| [hosted-guide.md](./hosted-guide.md) | Editor + agent MCP reference |
|
|
157
|
+
| [HOSTED.md](../../HOSTED.md) | Editor onboarding |
|
|
158
|
+
| [../../docs/CMS_EDIT_SETUP.md](../../../../docs/CMS_EDIT_SETUP.md) | Customer deploy runbooks |
|
|
159
|
+
| Skill `contentful-cms-regenerate-editor-pack` | Regen + push workflow |
|
package/docs/mcp/hosted-guide.md
CHANGED
|
@@ -58,7 +58,7 @@ When a site editor pack is deployed, these MCP resources provide **site-specific
|
|
|
58
58
|
| `cms_edit_create_article` | Create an article (requires article type; featured image rules) |
|
|
59
59
|
| `cms_edit_create_from_doc` | Create a page from a freeform document (infer → confirm → dry-run) |
|
|
60
60
|
| `cms_edit_create_article_from_doc` | Create an article from a freeform document |
|
|
61
|
-
| `cms_edit_taxonomy` | Import
|
|
61
|
+
| `cms_edit_taxonomy` | Import taxonomy entries (`create … --if-not-exists`) |
|
|
62
62
|
| `cms_edit_bulk_seo` | Update SEO meta descriptions (read `task-seo-descriptions`) |
|
|
63
63
|
| `cms_edit_bulk_find_replace` | Bulk find-replace in rich text across entries |
|
|
64
64
|
| `cms_edit_bulk_article_tags` | Update tags on one or more articles |
|
|
@@ -67,6 +67,10 @@ When a site editor pack is deployed, these MCP resources provide **site-specific
|
|
|
67
67
|
|
|
68
68
|
Read the full guide anytime via the `cms-edit://guide` resource or `cms_edit_help`.
|
|
69
69
|
|
|
70
|
+
## End-to-end QA prompt
|
|
71
|
+
|
|
72
|
+
For release QA after cms-edit or editor-pack upgrades, use a **copy-paste Claude Desktop test script** (phases: connector → customer resources → discovery → session → schema → media → dry-run writes → negatives). See [e2e-test-prompt.md](./e2e-test-prompt.md) to author one per customer site. Example: Brightline `docs/cms-edit/MCP-E2E-TEST.md`.
|
|
73
|
+
|
|
70
74
|
## Core workflow
|
|
71
75
|
|
|
72
76
|
Standard editing flow: **open → snapshot → read → set/rtf → diff → save**
|
|
@@ -81,7 +85,7 @@ Each step is a separate `cms_edit` call. Sessions persist in Redis between calls
|
|
|
81
85
|
["open", "--id", "<entry-id>"]
|
|
82
86
|
```
|
|
83
87
|
|
|
84
|
-
**Homepage (all SE Studio sites):** Contentful stores the marketing homepage slug as `index`. The live site URL is `/`. In cms-edit, `--page-slug /` and `--page-slug /index` are equivalent (both resolve to `index`).
|
|
88
|
+
**Homepage (all SE Studio sites):** Contentful stores the marketing homepage slug as `index`. The live site URL is `/`. In cms-edit, `--page-slug /` and `--page-slug /index` are equivalent (both resolve to `index`). Read `cms-edit://customer/routing` for site-specific exceptions (e.g. Pedestal uses `home`).
|
|
85
89
|
|
|
86
90
|
### 2. Snapshot — see the content tree
|
|
87
91
|
|
|
@@ -169,7 +173,7 @@ Use MCP prompt `cms_edit_create_article` for guided creation.
|
|
|
169
173
|
### List all pages
|
|
170
174
|
|
|
171
175
|
```
|
|
172
|
-
["
|
|
176
|
+
["list", "--type", "page"]
|
|
173
177
|
```
|
|
174
178
|
|
|
175
179
|
### Refresh local index (assets, media, templates, taxonomy)
|
|
@@ -254,12 +258,12 @@ Asset search and media-by-filename list **require** the index. Template/taxonomy
|
|
|
254
258
|
["list", "--type", "article", "--sort", "date", "-n", "10"]
|
|
255
259
|
```
|
|
256
260
|
|
|
257
|
-
|
|
261
|
+
Alternative: `["search", "<keyword>", "--type", "article"]` (also sorts by date).
|
|
258
262
|
|
|
259
263
|
**Draft articles** — `peek` and `open` load drafts via CMA (not published-only). To discover drafts:
|
|
260
264
|
|
|
261
265
|
```json
|
|
262
|
-
["
|
|
266
|
+
["list", "--type", "article", "--sort", "date"]
|
|
263
267
|
["search", "<title>", "--type", "article"]
|
|
264
268
|
["list", "--type", "article", "--slug", "<slug>"]
|
|
265
269
|
```
|
|
@@ -272,7 +276,7 @@ After upgrading cms-edit, run `["index", "sync"]` once so the local index includ
|
|
|
272
276
|
|
|
273
277
|
## Command reference (cms_edit args)
|
|
274
278
|
|
|
275
|
-
**Discovery:** `
|
|
279
|
+
**Discovery:** `list --type <type>`, `search <query>`, `schema <contentType>`, `index sync`, `index status`
|
|
276
280
|
|
|
277
281
|
**Reading:** `open --page-slug <slug>`, `open --id <id>`, `peek --page-slug <slug>`, `peek --id <id>`, `snapshot`, `read <ref>`, `read <ref> <field>`, `read <id> --id [field]`
|
|
278
282
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@se-studio/contentful-cms",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "CLI tool for AI agents to read and edit Contentful draft content without publish permissions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,8 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"bin": {
|
|
52
|
-
"cms-edit": "./dist/bin/cms-edit.js"
|
|
53
|
-
"contentful-cms": "./dist/bin/contentful-cms.js"
|
|
52
|
+
"cms-edit": "./dist/bin/cms-edit.js"
|
|
54
53
|
},
|
|
55
54
|
"files": [
|
|
56
55
|
"dist",
|
package/skills/README.md
CHANGED
|
@@ -18,13 +18,13 @@ pnpm --filter @se-studio/contentful-cms build
|
|
|
18
18
|
|------|--------|
|
|
19
19
|
| **Edit skill content** | `packages/skills/skills/contentful-cms-*/SKILL.md` |
|
|
20
20
|
| **Bundled subset for npm** | This directory (`core`, `editor-tasks`, `templates`, `setup`) via `scripts/sync-cms-edit-skills.mjs` |
|
|
21
|
-
| **Install into a project** | `
|
|
21
|
+
| **Install into a project** | `npx skills add @se-studio/skills` → `.agents/skills/contentful-cms-<name>/` |
|
|
22
22
|
|
|
23
23
|
Full monorepo skill sync (all marketing-site + CMS skills): `pnpm skills:sync` → `.agents/skills/` (gitignored).
|
|
24
24
|
|
|
25
25
|
## Agent skill directories
|
|
26
26
|
|
|
27
27
|
- **In this monorepo:** use `.agents/skills/` (symlinked as `.cursor/skills/`). Never commit hand-edited copies under `.claude/skills/` — that tree is local/optional and untracked.
|
|
28
|
-
- **External projects:** `npx skills add @se-studio/skills
|
|
28
|
+
- **External projects:** `npx skills add @se-studio/skills`.
|
|
29
29
|
|
|
30
30
|
See [docs/SKILLS.md](../docs/SKILLS.md) and [packages/skills/README.md](../../skills/README.md).
|
package/skills/core/SKILL.md
CHANGED
|
@@ -279,8 +279,8 @@ cms-edit add CTA --content-type component --existing-id 4xKj2abcDef
|
|
|
279
279
|
|
|
280
280
|
Discover available types first:
|
|
281
281
|
```bash
|
|
282
|
-
cms-edit types component
|
|
283
|
-
cms-edit types collection
|
|
282
|
+
cms-edit schema types component
|
|
283
|
+
cms-edit schema types collection
|
|
284
284
|
```
|
|
285
285
|
|
|
286
286
|
### Remove a component
|
|
@@ -436,9 +436,9 @@ cms-edit create tag --json-file tag.json --tag-type presentation-type --if-not-e
|
|
|
436
436
|
cms-edit create taxonomy-from-json --file taxonomy.json --if-not-exists
|
|
437
437
|
|
|
438
438
|
# Idempotent single-entry creates
|
|
439
|
-
cms-edit
|
|
440
|
-
cms-edit
|
|
441
|
-
--description "Annual ASCO conference." --featured-image <logoAssetId>
|
|
439
|
+
cms-edit create tag-type --slug conference-venue --name "Conference Venue" --if-not-exists
|
|
440
|
+
cms-edit create tag --slug asco-2025 --name "ASCO 2025" --tag-type conference-venue \
|
|
441
|
+
--description "Annual ASCO conference." --featured-image <logoAssetId> --if-not-exists
|
|
442
442
|
```
|
|
443
443
|
|
|
444
444
|
See `cms-edit help fields-taxonomy` and `cms-edit help taxonomy-from-json` for field reference and batch schema.
|
|
@@ -463,7 +463,7 @@ cms-edit read @c0 bio
|
|
|
463
463
|
|
|
464
464
|
**Site/runtime:** Resolved **person links** (`IPersonLink` from the REST API — article authors, collection contents, `contentfulAllPersonLinks`, related-people helpers) include **`bio`** when set in CMS. Use for team cards, related-people collections, and markdown/search export — not only full person detail pages.
|
|
465
465
|
|
|
466
|
-
**Idempotent taxonomy:** `--if-not-exists`
|
|
466
|
+
**Idempotent taxonomy:** `--if-not-exists` is check-then-create — safe for sequential imports, not for parallel creates on the same slug.
|
|
467
467
|
|
|
468
468
|
```bash
|
|
469
469
|
# Resolve taxonomy IDs without a session
|
|
@@ -481,8 +481,8 @@ cms-edit search "pricing page"
|
|
|
481
481
|
cms-edit search "hero" --type component
|
|
482
482
|
|
|
483
483
|
# List valid type values
|
|
484
|
-
cms-edit types component
|
|
485
|
-
cms-edit types collection
|
|
484
|
+
cms-edit schema types component
|
|
485
|
+
cms-edit schema types collection
|
|
486
486
|
|
|
487
487
|
# List entries with filters
|
|
488
488
|
cms-edit list --type article --sort date -n 10 # recent articles by publication date
|
|
@@ -491,7 +491,7 @@ cms-edit list --type article --slug my-article # article with a specific slug
|
|
|
491
491
|
cms-edit list --type article --has-field tags # articles where tags field is non-empty
|
|
492
492
|
|
|
493
493
|
# Find draft articles, then peek/open (both support drafts via CMA)
|
|
494
|
-
cms-edit
|
|
494
|
+
cms-edit list --type article --sort date
|
|
495
495
|
cms-edit peek --article-slug resources/blog/my-post
|
|
496
496
|
# Only list --published / resolve --published are published-only
|
|
497
497
|
|
|
@@ -566,7 +566,7 @@ cms-edit save
|
|
|
566
566
|
### Add a new section to a page
|
|
567
567
|
```bash
|
|
568
568
|
cms-edit open --page-slug /products
|
|
569
|
-
cms-edit types component # discover what's available
|
|
569
|
+
cms-edit schema types component # discover what's available
|
|
570
570
|
cms-edit add CTA --after @c3
|
|
571
571
|
cms-edit set @c4 heading "Ready to get started?"
|
|
572
572
|
cms-edit rtf @c4 body --markdown "Join thousands of teams who trust us."
|
|
@@ -611,17 +611,11 @@ cms-edit preview showcase --collection CardGrid --param backgroundColour=Navy
|
|
|
611
611
|
|
|
612
612
|
For CMS guidelines batch PNG capture, use `cms-capture-screenshots` from `@se-studio/project-build` (separate from cms-edit; requires agent-browser).
|
|
613
613
|
|
|
614
|
-
##
|
|
614
|
+
## Undo changes
|
|
615
615
|
|
|
616
|
-
|
|
616
|
+
There is no field-level revert command. To abandon unsaved edits: `cms-edit diff` to review, then `cms-edit discard` (or `discard --all`). To roll back saved drafts, use the Contentful web app version history.
|
|
617
617
|
|
|
618
|
-
|
|
619
|
-
cms-edit revert @c0 heading # Revert a single field to its original value
|
|
620
|
-
cms-edit revert @c0 # Revert all fields on an entry
|
|
621
|
-
cms-edit revert --all # Revert all modified entries (session stays open)
|
|
622
|
-
```
|
|
623
|
-
|
|
624
|
-
Note: Entries created via `add` cannot be reverted — use `remove` instead.
|
|
618
|
+
Note: Entries created via `add` that you have not saved can be removed with `cms-edit remove <ref>`.
|
|
625
619
|
|
|
626
620
|
## Health Check
|
|
627
621
|
|
|
@@ -633,25 +627,27 @@ cms-edit health # Check config file, space config, Contentful connectivity
|
|
|
633
627
|
|
|
634
628
|
## Schema Inspection
|
|
635
629
|
|
|
636
|
-
Inspect field definitions for a content type.
|
|
630
|
+
Inspect field definitions for a content type. Use `cms-edit schema types <ct>` for type-discriminator values only.
|
|
637
631
|
|
|
638
632
|
```bash
|
|
639
633
|
cms-edit schema component # Show all fields, types, enum values, link targets
|
|
640
634
|
cms-edit schema component --json # Full JSON output
|
|
641
635
|
```
|
|
642
636
|
|
|
643
|
-
##
|
|
637
|
+
## Content catalog (`list`)
|
|
644
638
|
|
|
645
|
-
Browse
|
|
639
|
+
Browse entries by content type (index-backed for catalog types). Run `cms-edit index sync` once per space, or let commands auto-sync.
|
|
646
640
|
|
|
647
641
|
```bash
|
|
648
|
-
cms-edit
|
|
649
|
-
cms-edit
|
|
650
|
-
cms-edit
|
|
651
|
-
cms-edit
|
|
652
|
-
cms-edit
|
|
653
|
-
cms-edit
|
|
654
|
-
cms-edit
|
|
642
|
+
cms-edit list --type page # All pages (label sort)
|
|
643
|
+
cms-edit list --type page --sort updated # Most recently updated first
|
|
644
|
+
cms-edit list --type article --sort date # Articles by publication date
|
|
645
|
+
cms-edit list --type pageVariant # A/B or variant pages
|
|
646
|
+
cms-edit list --type tag --tag-type-name "Topic" # Tags under a tag type
|
|
647
|
+
cms-edit list --type tagType # Tag types
|
|
648
|
+
cms-edit list --type articleType # Article types
|
|
649
|
+
cms-edit list --type navigation # Navigations
|
|
650
|
+
cms-edit list --type person --force-cma # People (not in catalog index)
|
|
655
651
|
```
|
|
656
652
|
|
|
657
653
|
## Peek
|
|
@@ -663,14 +659,14 @@ cms-edit peek --page-slug /pricing # Show snapshot of /pricing; your active se
|
|
|
663
659
|
cms-edit peek --id <entryId> # Look up by entry ID
|
|
664
660
|
```
|
|
665
661
|
|
|
666
|
-
## Batch Operations (run)
|
|
662
|
+
## Batch Operations (batch run)
|
|
667
663
|
|
|
668
664
|
Run a sequence of operations from a JSON file or stdin.
|
|
669
665
|
|
|
670
666
|
```bash
|
|
671
|
-
cms-edit run --file ops.json # Run batch ops from file
|
|
672
|
-
echo '[...]' | cms-edit run # Pipe from stdin
|
|
673
|
-
cms-edit run --file ops.json --dry-run # Validate without saving
|
|
667
|
+
cms-edit batch run --file ops.json # Run batch ops from file
|
|
668
|
+
echo '[...]' | cms-edit batch run # Pipe from stdin
|
|
669
|
+
cms-edit batch run --file ops.json --dry-run # Validate without saving
|
|
674
670
|
```
|
|
675
671
|
|
|
676
672
|
Supported ops: `open`, `set`, `rtf`, `rtf-replace`, `save`, `add`, `links-add`.
|
|
@@ -823,15 +819,12 @@ cms-edit resolve 4xKj2abcDef
|
|
|
823
819
|
|
|
824
820
|
## Inventory & Status
|
|
825
821
|
|
|
826
|
-
Use `
|
|
822
|
+
Use `list --type <type>` for inventory. Catalog types (page, article, pageVariant, template, taxonomy, navigation) use the local index. Use `--force-cma` for other types (person, customType, pageTest) or published-only with `--published`.
|
|
827
823
|
|
|
828
824
|
```bash
|
|
829
|
-
cms-edit
|
|
830
|
-
cms-edit
|
|
831
|
-
cms-edit
|
|
832
|
-
cms-edit sitemap --sort updated # Most recently updated first
|
|
833
|
-
cms-edit sitemap --tree # Tree view
|
|
834
|
-
cms-edit sitemap --include page,article # Include articles
|
|
825
|
+
cms-edit list --type page
|
|
826
|
+
cms-edit list --type article --sort date -n 20
|
|
827
|
+
cms-edit index dump --reference-only # Full catalog snapshot in terminal
|
|
835
828
|
```
|
|
836
829
|
|
|
837
830
|
**Note on bulk publish:** The tool cannot publish entries — all saves create drafts only. This is intentional. Review and publish drafts from the Contentful web app.
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -41,7 +41,7 @@ For engineering work in a site repo (Cursor, Grok, terminal):
|
|
|
41
41
|
|
|
42
42
|
1. Configure `.contentful-cms.json` in the project (or `~/.contentful-cms.json`) with space credentials
|
|
43
43
|
2. Run `npx skills add @se-studio/skills` or `pnpm skills:sync` in the monorepo
|
|
44
|
-
3.
|
|
44
|
+
3. Bundled cms-edit skills (`core`, `setup`, etc.) are included when you run `npx skills add @se-studio/skills`
|
|
45
45
|
4. Read `cms-edit/<site>/editor-pack/tasks-index.md` before editing content
|
|
46
46
|
|
|
47
47
|
Do **not** register a local `mcpServers.cms-edit` entry in Claude Desktop — use the hosted connector URL instead.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentful-cms.d.ts","sourceRoot":"","sources":["../../src/bin/contentful-cms.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentful-cms.js","sourceRoot":"","sources":["../../src/bin/contentful-cms.ts"],"names":[],"mappings":";AACA,6GAA6G;AAE7G,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC"}
|
package/dist/commands/audit.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8fzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2D3D"}
|