@clickminded/coauthor-cli 0.0.24 → 0.0.25

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/README.md CHANGED
@@ -45,7 +45,9 @@ Updating the CLI updates installed skills automatically, unless you edited them;
45
45
  A typical piece:
46
46
 
47
47
  ```sh
48
- coauthor project create --title "Post title" --contract @brief.json --json
48
+ coauthor profile list --json # pick the writer profile (voice, context, image style)
49
+ coauthor project create --title "Post title" --contract @brief.json --profile <profile id> --json
50
+ coauthor source add <id> notes.pdf --json # optional reference documents, before research
49
51
  coauthor workflow run <id> --target contract --briefing-mode strict --json # CoAuthor questions the brief
50
52
  coauthor outline generate <id> --json # review, then:
51
53
  coauthor outline approve <id> --json
@@ -73,6 +75,7 @@ coauthor thread generate <id> --json
73
75
  coauthor share <id> --json # public read-only link
74
76
  coauthor export wordpress <id> --yes --slug <slug> --json # creates a WordPress draft post
75
77
  coauthor credits <id> --json
78
+ coauthor integrations list --json # WordPress sites and X accounts
76
79
  ```
77
80
 
78
81
  Run `coauthor --help` or `coauthor <command> --help` for every command and option. `--json` gives machine-readable output, `--wait` waits for long-running work, and JSON options such as `--data` and `--contract` accept `@file.json` (or `@-` for stdin).
package/dist/commands.js CHANGED
@@ -4,7 +4,7 @@ import { createHash } from 'node:crypto';
4
4
  import { existsSync } from 'node:fs';
5
5
  import { mkdir, readFile, readdir, writeFile } from 'node:fs/promises';
6
6
  import { homedir } from 'node:os';
7
- import { dirname, join, resolve } from 'node:path';
7
+ import { basename, dirname, join, resolve } from 'node:path';
8
8
  import { fileURLToPath } from 'node:url';
9
9
  import { AgentHttpError, normalizeBaseUrl } from './client.js';
10
10
  import { clearConfig, loadConfig, saveConfig } from './config.js';
@@ -33,6 +33,12 @@ export async function runCommand(input, context) {
33
33
  return runBriefCommand(action, input, context.client);
34
34
  if (scope === 'log')
35
35
  return runLogCommand(action, input, context.client);
36
+ if (scope === 'profile')
37
+ return runProfileCommand(action, input, context.client);
38
+ if (scope === 'integrations')
39
+ return { ok: true, data: await context.client.request({ path: 'integrations' }) };
40
+ if (scope === 'source')
41
+ return runSourceCommand(action, input, context.client);
36
42
  if (scope === 'draft')
37
43
  return runDraftCommand(action, input, context);
38
44
  if (scope === 'workflow')
@@ -207,6 +213,9 @@ function inactiveAgentTokenCode(error) {
207
213
  async function runProjectCommand(action, input, client) {
208
214
  if (action === 'create') {
209
215
  const body = withNamedOptions(parseJsonOption(input.values), input.values, ['title', 'topic', 'audience']);
216
+ const profile = getString(input.values, 'profile');
217
+ if (profile)
218
+ body.profile_id = profile;
210
219
  const rawContract = getString(input.values, 'contract');
211
220
  if (rawContract !== undefined) {
212
221
  if (!rawContract.trim())
@@ -1351,6 +1360,64 @@ function revisionMessage(artifact, data) {
1351
1360
  lines.push(`Review it with: coauthor ${artifact} show <project-id> --json, then approve with: coauthor ${artifact} approve <project-id> --json`);
1352
1361
  return lines.join('\n');
1353
1362
  }
1363
+ async function runProfileCommand(action, input, client) {
1364
+ if (!action || action === 'list')
1365
+ return { ok: true, data: await client.request({ path: 'profiles' }) };
1366
+ if (action === 'show') {
1367
+ const profileId = input.positionals[0];
1368
+ if (!profileId)
1369
+ throw new Error('Usage: coauthor profile show <profile-id>');
1370
+ return { ok: true, data: await client.request({ path: `profiles/${encodeURIComponent(profileId)}` }) };
1371
+ }
1372
+ throw new Error('Usage: coauthor profile <list|show>');
1373
+ }
1374
+ const SOURCE_TYPES = { pdf: 'application/pdf', txt: 'text/plain', md: 'text/markdown', markdown: 'text/markdown' };
1375
+ // Mirrors the server: base64 over the API caps PDFs at ~3.3 MB; text at 512 KB.
1376
+ const MAX_SOURCE_PDF_BYTES = 3_300_000;
1377
+ const MAX_SOURCE_TEXT_BYTES = 512 * 1024;
1378
+ async function runSourceCommand(action, input, client) {
1379
+ const projectId = requireProjectId(input);
1380
+ const path = `projects/${encodeURIComponent(projectId)}/sources`;
1381
+ if (!action || action === 'list')
1382
+ return { ok: true, data: await client.request({ path }) };
1383
+ if (action === 'add') {
1384
+ const filePath = input.positionals[1];
1385
+ if (!filePath)
1386
+ throw new Error('Usage: coauthor source add <project-id> <file.pdf|.txt|.md>');
1387
+ const fileName = basename(filePath);
1388
+ const extension = fileName.split('.').pop()?.toLowerCase() ?? '';
1389
+ const mimeType = SOURCE_TYPES[extension];
1390
+ if (!mimeType)
1391
+ throw new Error(`Unsupported file type ".${extension}". CoAuthor accepts PDF, .txt, and .md sources.`);
1392
+ const bytes = await readFile(filePath);
1393
+ const limit = mimeType === 'application/pdf' ? MAX_SOURCE_PDF_BYTES : MAX_SOURCE_TEXT_BYTES;
1394
+ if (bytes.byteLength > limit) {
1395
+ throw new Error(`${fileName} is ${Math.round(bytes.byteLength / 1024)} KB; the CLI accepts up to ${Math.round(limit / 1024)} KB for this type. Upload larger files in the web app.`);
1396
+ }
1397
+ const data = await client.request({
1398
+ method: 'POST',
1399
+ path,
1400
+ body: { file_name: fileName, mime_type: mimeType, content_base64: bytes.toString('base64') },
1401
+ });
1402
+ const invalidated = getResponseValue(data, 'research_invalidated') === true;
1403
+ return {
1404
+ ok: true,
1405
+ message: invalidated
1406
+ ? `Added ${fileName}. Existing research and the draft are now stale; run research again so they use it.`
1407
+ : `Added ${fileName}. It is used the next time research runs.`,
1408
+ data,
1409
+ };
1410
+ }
1411
+ if (action === 'remove') {
1412
+ const documentId = input.positionals[1];
1413
+ if (!documentId)
1414
+ throw new Error('Usage: coauthor source remove <project-id> <source-id> --yes');
1415
+ if (!getBoolean(input.values, 'yes'))
1416
+ throw new Error('Removing a source can mark existing research and the draft stale. Re-run with --yes to confirm.');
1417
+ return { ok: true, data: await client.request({ method: 'DELETE', path: `${path}/${encodeURIComponent(documentId)}` }) };
1418
+ }
1419
+ throw new Error('Usage: coauthor source <list|add|remove> <project-id>');
1420
+ }
1354
1421
  async function runBriefCommand(action, input, client) {
1355
1422
  const projectId = requireProjectId(input);
1356
1423
  const path = `projects/${encodeURIComponent(projectId)}/brief`;
@@ -1567,6 +1634,9 @@ export function helpResult(command = []) {
1567
1634
  ' outline show|generate|revise|save|approve',
1568
1635
  ' research-plan show|generate|revise|save|approve',
1569
1636
  ' brief review|answer',
1637
+ ' profile list|show',
1638
+ ' source list|add|remove',
1639
+ ' integrations list',
1570
1640
  ' log add|show',
1571
1641
  ' research run|status|structured',
1572
1642
  ' draft generate|status|get|save|revise',
@@ -1598,7 +1668,7 @@ function commandHelp(command) {
1598
1668
  '--local-only removes the local credential without revoking the remote token. Use it only when explicitly abandoning remote revocation.',
1599
1669
  ].join('\n'),
1600
1670
  'project create': [
1601
- 'Usage: coauthor project create [--title <title>] [--topic <brief>] [--audience <audience>] [--contract <json>] [--json]',
1671
+ 'Usage: coauthor project create [--title <title>] [--topic <brief>] [--audience <audience>] [--contract <json>] [--profile <profile-id>] [--json]',
1602
1672
  '',
1603
1673
  'Creates a project. When --topic or --audience is provided, CoAuthor seeds the saved contract so workflow briefing review can use that context.',
1604
1674
  '--contract accepts a JSON editorial contract object. Top-level --topic and --audience fill missing contract topic/audience fields.',
@@ -1645,6 +1715,25 @@ function commandHelp(command) {
1645
1715
  '',
1646
1716
  'create: --title, --topic, --audience, --contract <json|@file>. list: --limit. show: one project.',
1647
1717
  ].join('\n'),
1718
+ profile: [
1719
+ 'Usage: coauthor profile list [--json]',
1720
+ ' coauthor profile show <profile-id> [--json]',
1721
+ '',
1722
+ 'Writer profiles hold the voice, writer and business context, and visual style. New projects use the default (most recently used) profile unless you pass --profile to project create. A project keeps its profile for good.',
1723
+ ].join('\n'),
1724
+ integrations: [
1725
+ 'Usage: coauthor integrations list [--json]',
1726
+ '',
1727
+ 'Connected WordPress sites (ids for export wordpress --connection-id) and X accounts. Connect new ones in the web app.',
1728
+ ].join('\n'),
1729
+ source: [
1730
+ 'Usage: coauthor source list <project-id> [--json]',
1731
+ ' coauthor source add <project-id> <file.pdf|.txt|.md> [--json]',
1732
+ ' coauthor source remove <project-id> <source-id> --yes [--json]',
1733
+ '',
1734
+ 'Reference documents CoAuthor researches from (up to 5 per project; PDF up to ~3.3 MB via the CLI, text up to 512 KB).',
1735
+ 'Add them before research runs. Adding or removing one after research marks the research and draft stale.',
1736
+ ].join('\n'),
1648
1737
  brief: [
1649
1738
  'Usage: coauthor brief review <project-id> [--json]',
1650
1739
  ' coauthor brief answer <project-id> --data @answers.json [--force] [--json]',
package/dist/parser.js CHANGED
@@ -67,6 +67,7 @@ const OPTIONS = {
67
67
  instruction: { type: 'string' },
68
68
  scope: { type: 'string' },
69
69
  feedback: { type: 'string' },
70
+ profile: { type: 'string' },
70
71
  kind: { type: 'string' },
71
72
  apply: { type: 'boolean', default: false },
72
73
  accept: { type: 'string' },
@@ -148,6 +149,12 @@ function commandLength(positionals) {
148
149
  return second && ['review', 'answer'].includes(second) ? 2 : 1;
149
150
  if (first === 'log')
150
151
  return second && ['add', 'show'].includes(second) ? 2 : 1;
152
+ if (first === 'profile')
153
+ return second && ['list', 'show'].includes(second) ? 2 : 1;
154
+ if (first === 'integrations')
155
+ return second === 'list' ? 2 : 1;
156
+ if (first === 'source')
157
+ return second && ['list', 'add', 'remove'].includes(second) ? 2 : 1;
151
158
  if (first === 'skills')
152
159
  return second && ['list', 'install'].includes(second) ? 2 : 1;
153
160
  if (first === 'models')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickminded/coauthor-cli",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "coauthor": "dist/index.js",
@@ -29,7 +29,9 @@ You drive it with the `coauthor` CLI. CoAuthor does the writing. **You are the u
29
29
  Typical timing: brief and outline under a minute; research and draft 3–10 minutes (deep research can take 20+); images about 20 seconds each; a revision 15–40 seconds. A typical article uses about 300 credits.
30
30
 
31
31
  1. **Brief.** Gather topic, audience, angle, core promise, length, must-include points, and sources from the conversation and your context (the repo, docs, the user's site). Ask the user only what you cannot infer, in one message of at most 2–3 questions. Write the contract to a file (schema, field guide, and examples: `references/brief-and-contract.md`), then:
32
- `coauthor project create --title "..." --contract @brief.json --json` → `data.project.id`
32
+ `coauthor project create --title "..." --contract @brief.json --profile <profile id> --json` → `data.project.id`
33
+ **Profile first.** A writer profile carries the voice, writer and business context, and image style, and a project keeps its profile for good. Run `coauthor profile list --json`. With one profile, omit `--profile`. With several, pick the one that fits the request (for example the company blog vs a personal newsletter) and ask the user if it isn't clear.
34
+ **Sources.** If the user gave you documents to work from (PDF, .txt, .md), add each before research: `coauthor source add <id> <file> --json` (up to 5; see `references/brief-and-contract.md`). Put source URLs in the brief instead.
33
35
  2. **Brief review.** `coauthor brief review <id> --json`. CoAuthor critiques the brief and returns `data.verdict`, `data.concerns`, and `data.questions`, each with `why`, the `field` it changes, and `answerable_by`. Answer the `agent` questions from your context; take `human` ones (opinions, private business facts, numbers, risk tolerance) to the user in one message, or, if they asked not to be interrupted, answer them as assumptions. Write `{"answers":[{"question","answer","source":"agent|user|assumption"}]}` to a file (add `"apply_suggested_patch": <data.suggested_patch>` if its suggestions are good) and run `coauthor brief answer <id> --data @answers.json --json`. Repeat once if the verdict was `needs_answers`, then approve: `coauthor contract approve <id> --json`. Log what you assumed: `coauthor log add <id> --kind assumption --message "..." --json`.
34
36
  3. **Outline checkpoint.** `coauthor outline generate <id> --json` (this does not approve it; sections are in `data.sections`). Review it as the user's editor: every section serves the core promise, must-includes are covered, the order builds, nothing is generic, repeated, or unsupported. Find problems; a bare approval is the exception. Send all your changes in one request: `coauthor outline revise <id> --feedback "Merge sections 3 and 4. Replace the conclusion with a one-week checklist." --json`. It saves the revision and returns `data.diff` (added, removed, renamed, changed, reordered); check the diff matches what you asked, and revise again (at most twice) if not. For exact wording you already have, `coauthor outline save <id> --data @outline.json --json` with the complete `{"sections":[...]}` instead. Then `coauthor outline approve <id> --json` and log it (`coauthor log add <id> --message "Approved the outline after …" --json`). If the user asked to see the outline, show it to them here and wait.
35
37
  4. **Research-plan checkpoint.** `coauthor research-plan generate <id> --json` (tasks in `data.research_tasks`). Check every section has a task, every claim that needs proof points at the right sources (including URLs the user gave you), and deep research is used only where it matters. Fix it with `coauthor research-plan revise <id> --feedback "Add a task for the checklist section. Use https://… as a required source for the limits section." --json` and check `data.diff`, then `coauthor research-plan approve <id> --json` and log it.
@@ -60,4 +62,4 @@ Everything else, including auth problems: `references/troubleshooting.md`. Credi
60
62
 
61
63
  ## Not in the CLI yet
62
64
 
63
- Choosing a writer profile (projects use the profile most recently selected in the web app), uploading source documents (put URLs in the brief instead), adding more images than CoAuthor planned, LinkedIn, Facebook, and email versions, slideshows, and video. Point the user to the CoAuthor web app at https://tools.clickminded.com/coauthor for these instead of improvising.
65
+ Creating or editing writer profiles, PDFs over about 3.3 MB, adding more images than CoAuthor planned, LinkedIn, Facebook, and email versions, slideshows, and video. Point the user to the CoAuthor web app at https://tools.clickminded.com/coauthor for these instead of improvising.
@@ -10,6 +10,12 @@ coauthor project create --title "Working title" --contract @brief.json --json
10
10
 
11
11
  All fields are optional and omitted ones get defaults, but always include at least `topic`, `target_audience`, `core_promise`, and either `angle` or `additional_editorial_guidance`. `--topic` and `--audience` flags fill those fields when the contract leaves them empty. Keep `--topic` plain prose; never put JSON in it.
12
12
 
13
+ ## Profiles and source documents
14
+
15
+ - `coauthor profile list --json` shows the user's writer profiles: `is_default` marks the one new projects get without `--profile`, plus a `summary` and the `visual_style`. `coauthor profile show <profile id> --json` shows the voice, writer context, and business context in full. Pass `--profile <id>` to `project create`; the profile can't be changed later, so pick deliberately. Profiles are created and edited in the web app (`manage_url`).
16
+ - `coauthor source add <id> <file>` uploads a reference document CoAuthor's research reads (PDF up to about 3.3 MB through the CLI, .txt or .md up to 512 KB, 5 per project). `coauthor source list <id> --json` shows them; `coauthor source remove <id> <source id> --yes` deletes one.
17
+ - Add sources before research runs. Adding or removing one after research marks the research and draft stale (the output says `research_invalidated`), so research has to run again.
18
+
13
19
  ## Writing a sharp brief
14
20
 
15
21
  - **Angle over topic.** "Google Business Profile descriptions" is a topic. "Most descriptions fail Google's rules in the first sentence; here is a 20-minute fix" is an angle. Push for the specific claim the piece will make.
@@ -22,7 +22,7 @@ Export creates a **draft post** in the user's WordPress site (it is not publishe
22
22
  1. The token needs publish permission. If an export fails with `insufficient_scope`, have the user run `coauthor auth login --with-publish` (in the background with `--no-browser`; they approve in the browser).
23
23
  2. With the user's yes:
24
24
  `coauthor export wordpress <id> --yes --slug <url-slug> --json`
25
- 3. If they have several WordPress sites connected, the error `wordpress_connection_required` lists them in `details.connections` (`id`, `label`, `site_base_url`). Ask which one, then add `--connection-id <id>`.
25
+ 3. `coauthor integrations list --json` shows the connected WordPress sites (`id`, `label`, `site_base_url`, `enabled`) and X accounts. With several sites, ask which one and add `--connection-id <id>` (the error `wordpress_connection_required` lists them too).
26
26
  4. `wordpress_not_connected` means no site is connected yet. The user connects one in CoAuthor's settings (Publishing).
27
27
  5. Give the user `wordpress_edit_url` from the response (also `wordpress_link`) so they can review and publish the post in WordPress.
28
28
 
@@ -31,7 +31,9 @@ You drive it with the `coauthor` CLI. CoAuthor does the writing. **You are the u
31
31
  Typical timing: brief and outline under a minute; research and draft 3–10 minutes (deep research can take 20+); images about 20 seconds each; a revision 15–40 seconds. A typical article uses about 300 credits.
32
32
 
33
33
  1. **Brief.** Gather topic, audience, angle, core promise, length, must-include points, and sources from the conversation and your context (the repo, docs, the user's site). Ask the user only what you cannot infer, in one message of at most 2–3 questions. Write the contract to a file (schema, field guide, and examples: `references/brief-and-contract.md`), then:
34
- `coauthor project create --title "..." --contract @brief.json --json` → `data.project.id`
34
+ `coauthor project create --title "..." --contract @brief.json --profile <profile id> --json` → `data.project.id`
35
+ **Profile first.** A writer profile carries the voice, writer and business context, and image style, and a project keeps its profile for good. Run `coauthor profile list --json`. With one profile, omit `--profile`. With several, pick the one that fits the request (for example the company blog vs a personal newsletter) and ask the user if it isn't clear.
36
+ **Sources.** If the user gave you documents to work from (PDF, .txt, .md), add each before research: `coauthor source add <id> <file> --json` (up to 5; see `references/brief-and-contract.md`). Put source URLs in the brief instead.
35
37
  2. **Brief review.** `coauthor brief review <id> --json`. CoAuthor critiques the brief and returns `data.verdict`, `data.concerns`, and `data.questions`, each with `why`, the `field` it changes, and `answerable_by`. Answer the `agent` questions from your context; take `human` ones (opinions, private business facts, numbers, risk tolerance) to the user in one message, or, if they asked not to be interrupted, answer them as assumptions. Write `{"answers":[{"question","answer","source":"agent|user|assumption"}]}` to a file (add `"apply_suggested_patch": <data.suggested_patch>` if its suggestions are good) and run `coauthor brief answer <id> --data @answers.json --json`. Repeat once if the verdict was `needs_answers`, then approve: `coauthor contract approve <id> --json`. Log what you assumed: `coauthor log add <id> --kind assumption --message "..." --json`.
36
38
  3. **Outline checkpoint.** `coauthor outline generate <id> --json` (this does not approve it; sections are in `data.sections`). Review it as the user's editor: every section serves the core promise, must-includes are covered, the order builds, nothing is generic, repeated, or unsupported. Find problems; a bare approval is the exception. Send all your changes in one request: `coauthor outline revise <id> --feedback "Merge sections 3 and 4. Replace the conclusion with a one-week checklist." --json`. It saves the revision and returns `data.diff` (added, removed, renamed, changed, reordered); check the diff matches what you asked, and revise again (at most twice) if not. For exact wording you already have, `coauthor outline save <id> --data @outline.json --json` with the complete `{"sections":[...]}` instead. Then `coauthor outline approve <id> --json` and log it (`coauthor log add <id> --message "Approved the outline after …" --json`). If the user asked to see the outline, show it to them here and wait.
37
39
  4. **Research-plan checkpoint.** `coauthor research-plan generate <id> --json` (tasks in `data.research_tasks`). Check every section has a task, every claim that needs proof points at the right sources (including URLs the user gave you), and deep research is used only where it matters. Fix it with `coauthor research-plan revise <id> --feedback "Add a task for the checklist section. Use https://… as a required source for the limits section." --json` and check `data.diff`, then `coauthor research-plan approve <id> --json` and log it.
@@ -62,7 +64,7 @@ Everything else, including auth problems: `references/troubleshooting.md`. Credi
62
64
 
63
65
  ## Not in the CLI yet
64
66
 
65
- Choosing a writer profile (projects use the profile most recently selected in the web app), uploading source documents (put URLs in the brief instead), adding more images than CoAuthor planned, LinkedIn, Facebook, and email versions, slideshows, and video. Point the user to the CoAuthor web app at https://tools.clickminded.com/coauthor for these instead of improvising.
67
+ Creating or editing writer profiles, PDFs over about 3.3 MB, adding more images than CoAuthor planned, LinkedIn, Facebook, and email versions, slideshows, and video. Point the user to the CoAuthor web app at https://tools.clickminded.com/coauthor for these instead of improvising.
66
68
 
67
69
  # Reference sections
68
70
 
@@ -82,6 +84,12 @@ coauthor project create --title "Working title" --contract @brief.json --json
82
84
 
83
85
  All fields are optional and omitted ones get defaults, but always include at least `topic`, `target_audience`, `core_promise`, and either `angle` or `additional_editorial_guidance`. `--topic` and `--audience` flags fill those fields when the contract leaves them empty. Keep `--topic` plain prose; never put JSON in it.
84
86
 
87
+ ### Profiles and source documents
88
+
89
+ - `coauthor profile list --json` shows the user's writer profiles: `is_default` marks the one new projects get without `--profile`, plus a `summary` and the `visual_style`. `coauthor profile show <profile id> --json` shows the voice, writer context, and business context in full. Pass `--profile <id>` to `project create`; the profile can't be changed later, so pick deliberately. Profiles are created and edited in the web app (`manage_url`).
90
+ - `coauthor source add <id> <file>` uploads a reference document CoAuthor's research reads (PDF up to about 3.3 MB through the CLI, .txt or .md up to 512 KB, 5 per project). `coauthor source list <id> --json` shows them; `coauthor source remove <id> <source id> --yes` deletes one.
91
+ - Add sources before research runs. Adding or removing one after research marks the research and draft stale (the output says `research_invalidated`), so research has to run again.
92
+
85
93
  ### Writing a sharp brief
86
94
 
87
95
  - **Angle over topic.** "Google Business Profile descriptions" is a topic. "Most descriptions fail Google's rules in the first sentence; here is a 20-minute fix" is an angle. Push for the specific claim the piece will make.
@@ -370,7 +378,7 @@ Export creates a **draft post** in the user's WordPress site (it is not publishe
370
378
  1. The token needs publish permission. If an export fails with `insufficient_scope`, have the user run `coauthor auth login --with-publish` (in the background with `--no-browser`; they approve in the browser).
371
379
  2. With the user's yes:
372
380
  `coauthor export wordpress <id> --yes --slug <url-slug> --json`
373
- 3. If they have several WordPress sites connected, the error `wordpress_connection_required` lists them in `details.connections` (`id`, `label`, `site_base_url`). Ask which one, then add `--connection-id <id>`.
381
+ 3. `coauthor integrations list --json` shows the connected WordPress sites (`id`, `label`, `site_base_url`, `enabled`) and X accounts. With several sites, ask which one and add `--connection-id <id>` (the error `wordpress_connection_required` lists them too).
374
382
  4. `wordpress_not_connected` means no site is connected yet. The user connects one in CoAuthor's settings (Publishing).
375
383
  5. Give the user `wordpress_edit_url` from the response (also `wordpress_link`) so they can review and publish the post in WordPress.
376
384