@clickminded/coauthor-cli 0.0.25 → 0.0.27
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 +2 -1
- package/dist/commands.js +141 -0
- package/dist/parser.js +3 -0
- package/package.json +1 -1
- package/skills/coauthor/SKILL.md +2 -2
- package/skills/coauthor/references/images-and-social.md +1 -1
- package/skills/coauthor/references/repurposing.md +56 -0
- package/skills/cursor/coauthor-cli.mdc +62 -3
package/README.md
CHANGED
|
@@ -71,7 +71,8 @@ Images, social, and export:
|
|
|
71
71
|
coauthor image list <id> --json
|
|
72
72
|
coauthor image generate <id> --placeholder-id <placeholder id> --json
|
|
73
73
|
coauthor image status <id> --json
|
|
74
|
-
coauthor
|
|
74
|
+
coauthor repurpose generate <id> --format all --json # X thread and post, LinkedIn, Facebook, email newsletter
|
|
75
|
+
coauthor repurpose download <id> --out ./social # copy-ready files plus the article
|
|
75
76
|
coauthor share <id> --json # public read-only link
|
|
76
77
|
coauthor export wordpress <id> --yes --slug <slug> --json # creates a WordPress draft post
|
|
77
78
|
coauthor credits <id> --json
|
package/dist/commands.js
CHANGED
|
@@ -29,6 +29,8 @@ export async function runCommand(input, context) {
|
|
|
29
29
|
return runArtifactCommand('research-plan', action, input, context.client);
|
|
30
30
|
if (scope === 'research')
|
|
31
31
|
return runResearchCommand(action, input, context);
|
|
32
|
+
if (scope === 'repurpose')
|
|
33
|
+
return runRepurposeCommand(action, input, context.client);
|
|
32
34
|
if (scope === 'brief')
|
|
33
35
|
return runBriefCommand(action, input, context.client);
|
|
34
36
|
if (scope === 'log')
|
|
@@ -1452,6 +1454,133 @@ async function runLogCommand(action, input, client) {
|
|
|
1452
1454
|
}
|
|
1453
1455
|
throw new Error('Usage: coauthor log <add|show> <projectId>');
|
|
1454
1456
|
}
|
|
1457
|
+
const REPURPOSE_FORMATS = ['x-thread', 'x-post', 'linkedin', 'facebook', 'email', 'slideshow', 'video'];
|
|
1458
|
+
const REPURPOSE_GENERATABLE = ['x-thread', 'x-post', 'linkedin', 'facebook', 'email'];
|
|
1459
|
+
async function runRepurposeCommand(action, input, client) {
|
|
1460
|
+
const projectId = requireProjectId(input);
|
|
1461
|
+
const base = `projects/${encodeURIComponent(projectId)}/repurpose`;
|
|
1462
|
+
const format = getString(input.values, 'format');
|
|
1463
|
+
if (!action || action === 'list')
|
|
1464
|
+
return { ok: true, data: await client.request({ path: base }) };
|
|
1465
|
+
if (action === 'show') {
|
|
1466
|
+
if (!format)
|
|
1467
|
+
throw new Error(`Usage: coauthor repurpose show <project-id> --format <${REPURPOSE_FORMATS.join('|')}>`);
|
|
1468
|
+
return { ok: true, data: await client.request({ path: `${base}/${encodeURIComponent(format)}` }) };
|
|
1469
|
+
}
|
|
1470
|
+
if (action === 'generate') {
|
|
1471
|
+
if (!format)
|
|
1472
|
+
throw new Error(`Usage: coauthor repurpose generate <project-id> --format <${REPURPOSE_GENERATABLE.join('|')}|all> [--writing-model <id>]`);
|
|
1473
|
+
const formats = format === 'all' ? REPURPOSE_GENERATABLE : [format];
|
|
1474
|
+
const writingModel = getString(input.values, 'writing-model');
|
|
1475
|
+
const results = {};
|
|
1476
|
+
for (const entry of formats) {
|
|
1477
|
+
results[entry] = await client.request({
|
|
1478
|
+
method: 'POST',
|
|
1479
|
+
path: `${base}/${encodeURIComponent(entry)}/generate`,
|
|
1480
|
+
body: writingModel ? { writingModel } : {},
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
return {
|
|
1484
|
+
ok: true,
|
|
1485
|
+
message: `Generated ${formats.join(', ')}. Review with: coauthor repurpose show ${projectId} --format <format> --json, or save files with: coauthor repurpose download ${projectId} --format ${format}`,
|
|
1486
|
+
data: format === 'all' ? results : results[format],
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1489
|
+
if (action === 'save') {
|
|
1490
|
+
if (!format || readJsonOptionText(input.values) === undefined) {
|
|
1491
|
+
throw new Error('Usage: coauthor repurpose save <project-id> --format <format> --data @edits.json');
|
|
1492
|
+
}
|
|
1493
|
+
return {
|
|
1494
|
+
ok: true,
|
|
1495
|
+
data: await client.request({ method: 'POST', path: `${base}/${encodeURIComponent(format)}/save`, body: parseJsonOption(input.values) }),
|
|
1496
|
+
};
|
|
1497
|
+
}
|
|
1498
|
+
if (action === 'download')
|
|
1499
|
+
return downloadRepurposed(projectId, format ?? 'all', getString(input.values, 'out'), client);
|
|
1500
|
+
throw new Error('Usage: coauthor repurpose <list|show|generate|save|download> <project-id> --format <format>');
|
|
1501
|
+
}
|
|
1502
|
+
async function downloadRepurposed(projectId, format, outOption, client) {
|
|
1503
|
+
const outDir = resolve(outOption ?? `coauthor-${projectId.slice(0, 8)}`);
|
|
1504
|
+
await mkdir(outDir, { recursive: true });
|
|
1505
|
+
const written = [];
|
|
1506
|
+
const skipped = [];
|
|
1507
|
+
const write = async (name, contents) => {
|
|
1508
|
+
await writeFile(join(outDir, name), contents.endsWith('\n') ? contents : `${contents}\n`);
|
|
1509
|
+
written.push(name);
|
|
1510
|
+
};
|
|
1511
|
+
if (format === 'all' || format === 'article') {
|
|
1512
|
+
const [project, draft] = await Promise.all([
|
|
1513
|
+
client.request({ path: `projects/${encodeURIComponent(projectId)}` }),
|
|
1514
|
+
client.request({ path: `projects/${encodeURIComponent(projectId)}/draft/get?format=markdown` }),
|
|
1515
|
+
]);
|
|
1516
|
+
const title = extractNestedString(project, ['project', 'title']);
|
|
1517
|
+
const markdown = getResponseString(draft, 'markdown') ?? '';
|
|
1518
|
+
await write('article.md', `${title ? `# ${title}\n\n` : ''}${markdown}`);
|
|
1519
|
+
}
|
|
1520
|
+
const formats = format === 'all' ? REPURPOSE_FORMATS : format === 'article' ? [] : [format];
|
|
1521
|
+
const manifest = {};
|
|
1522
|
+
const missingLink = [];
|
|
1523
|
+
for (const entry of formats) {
|
|
1524
|
+
const shown = await client.request({ path: `projects/${encodeURIComponent(projectId)}/repurpose/${encodeURIComponent(entry)}` });
|
|
1525
|
+
const artifact = getResponseValue(shown, 'artifact');
|
|
1526
|
+
const copy = getResponseValue(shown, 'copy');
|
|
1527
|
+
if (!artifact || !copy) {
|
|
1528
|
+
skipped.push(entry);
|
|
1529
|
+
continue;
|
|
1530
|
+
}
|
|
1531
|
+
const markdown = renderRepurposeMarkdown(entry, copy);
|
|
1532
|
+
if (markdown.includes('{{POST_URL}}'))
|
|
1533
|
+
missingLink.push(entry);
|
|
1534
|
+
await write(`${entry}.md`, markdown);
|
|
1535
|
+
await write(`${entry}.json`, JSON.stringify(artifact, null, 2));
|
|
1536
|
+
manifest[entry] = {
|
|
1537
|
+
stale: Boolean(getResponseValue(artifact, 'stale_at')),
|
|
1538
|
+
updated_at: getResponseValue(artifact, 'updated_at') ?? null,
|
|
1539
|
+
};
|
|
1540
|
+
}
|
|
1541
|
+
await write('manifest.json', JSON.stringify({ project_id: projectId, downloaded_at: new Date().toISOString(), formats: manifest, skipped, missing_article_link: missingLink }, null, 2));
|
|
1542
|
+
const staleNote = Object.entries(manifest).filter(([, value]) => value.stale).map(([key]) => key);
|
|
1543
|
+
return {
|
|
1544
|
+
ok: true,
|
|
1545
|
+
message: [
|
|
1546
|
+
`Wrote ${written.length} files to ${outDir}`,
|
|
1547
|
+
skipped.length > 0 ? `Not generated yet: ${skipped.join(', ')} (coauthor repurpose generate ${projectId} --format <format>; slideshow and video are made in the web app).` : '',
|
|
1548
|
+
staleNote.length > 0 ? `Stale (the draft changed since they were made): ${staleNote.join(', ')}. Regenerate them before posting.` : '',
|
|
1549
|
+
missingLink.length > 0
|
|
1550
|
+
? `No article link yet: ${missingLink.join(', ')} still contain {{POST_URL}}. Set it with coauthor repurpose save ${projectId} --format <format> --data '{"destination_url":"https://..."}' and download again, or replace it when posting.`
|
|
1551
|
+
: '',
|
|
1552
|
+
].filter(Boolean).join('\n'),
|
|
1553
|
+
data: { out_dir: outDir, files: written, skipped },
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
function renderRepurposeMarkdown(format, copy) {
|
|
1557
|
+
const asRecord = (value) => value && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
1558
|
+
const asList = (value) => Array.isArray(value) ? value : [];
|
|
1559
|
+
const text = (value) => typeof value === 'string' ? value : '';
|
|
1560
|
+
const data = asRecord(copy);
|
|
1561
|
+
const titles = { 'x-thread': 'X thread', 'x-post': 'X post', linkedin: 'LinkedIn post', facebook: 'Facebook post', email: 'Email newsletter' };
|
|
1562
|
+
const lines = [`# ${titles[format] ?? format}`, ''];
|
|
1563
|
+
if (format === 'x-thread') {
|
|
1564
|
+
const posts = asList(data.posts).map(text);
|
|
1565
|
+
posts.forEach((post, index) => lines.push(`**${index + 1}/${posts.length}**`, '', post, ''));
|
|
1566
|
+
return lines.join('\n');
|
|
1567
|
+
}
|
|
1568
|
+
for (const variation of asList(data.variations).map(asRecord)) {
|
|
1569
|
+
lines.push(`## ${text(variation.label) || 'Variation'}`, '');
|
|
1570
|
+
if (format === 'x-post') {
|
|
1571
|
+
for (const post of asList(variation.posts).map(asRecord)) {
|
|
1572
|
+
lines.push(text(post.role) === 'link_reply' ? '**Link reply**' : '**Post**', '', text(post.text), '');
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
else {
|
|
1576
|
+
lines.push(text(variation.text), '');
|
|
1577
|
+
}
|
|
1578
|
+
const hooks = asList(variation.alternate_hooks).map(text).filter(Boolean);
|
|
1579
|
+
if (hooks.length > 0)
|
|
1580
|
+
lines.push('**Alternate hooks**', '', ...hooks.map((hook) => `- ${hook.replace(/\n+/g, ' ')}`), '');
|
|
1581
|
+
}
|
|
1582
|
+
return lines.join('\n');
|
|
1583
|
+
}
|
|
1455
1584
|
function enrichResearchStatus(data) {
|
|
1456
1585
|
if (!data || typeof data !== 'object' || Array.isArray(data))
|
|
1457
1586
|
return data;
|
|
@@ -1633,6 +1762,7 @@ export function helpResult(command = []) {
|
|
|
1633
1762
|
' contract show|save|approve',
|
|
1634
1763
|
' outline show|generate|revise|save|approve',
|
|
1635
1764
|
' research-plan show|generate|revise|save|approve',
|
|
1765
|
+
' repurpose list|generate|show|save|download',
|
|
1636
1766
|
' brief review|answer',
|
|
1637
1767
|
' profile list|show',
|
|
1638
1768
|
' source list|add|remove',
|
|
@@ -1734,6 +1864,17 @@ function commandHelp(command) {
|
|
|
1734
1864
|
'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
1865
|
'Add them before research runs. Adding or removing one after research marks the research and draft stale.',
|
|
1736
1866
|
].join('\n'),
|
|
1867
|
+
repurpose: [
|
|
1868
|
+
'Usage: coauthor repurpose list <project-id> [--json]',
|
|
1869
|
+
' coauthor repurpose generate <project-id> --format <x-thread|x-post|linkedin|facebook|email|all> [--writing-model <id>] [--json]',
|
|
1870
|
+
' coauthor repurpose show <project-id> --format <format> [--json]',
|
|
1871
|
+
' coauthor repurpose save <project-id> --format <format> --data @edits.json [--json]',
|
|
1872
|
+
' coauthor repurpose download <project-id> [--format <format|article|all>] [--out <dir>]',
|
|
1873
|
+
'',
|
|
1874
|
+
'Turns the finished draft into social posts and an email newsletter. generate takes about 20-90 seconds per format and replaces the previous version.',
|
|
1875
|
+
'show returns data.copy (copy-ready text with the destination link filled in). download writes article.md, <format>.md, <format>.json, and manifest.json.',
|
|
1876
|
+
'Slideshows and videos are generated in the web app; download includes them only as JSON once they exist. Publish an X thread with coauthor publish thread.',
|
|
1877
|
+
].join('\n'),
|
|
1737
1878
|
brief: [
|
|
1738
1879
|
'Usage: coauthor brief review <project-id> [--json]',
|
|
1739
1880
|
' coauthor brief answer <project-id> --data @answers.json [--force] [--json]',
|
package/dist/parser.js
CHANGED
|
@@ -68,6 +68,7 @@ const OPTIONS = {
|
|
|
68
68
|
scope: { type: 'string' },
|
|
69
69
|
feedback: { type: 'string' },
|
|
70
70
|
profile: { type: 'string' },
|
|
71
|
+
out: { type: 'string' },
|
|
71
72
|
kind: { type: 'string' },
|
|
72
73
|
apply: { type: 'boolean', default: false },
|
|
73
74
|
accept: { type: 'string' },
|
|
@@ -163,6 +164,8 @@ function commandLength(positionals) {
|
|
|
163
164
|
: 1;
|
|
164
165
|
if (first === 'workflow')
|
|
165
166
|
return second ? 2 : 1;
|
|
167
|
+
if (first === 'repurpose')
|
|
168
|
+
return second && ['list', 'show', 'generate', 'save', 'download'].includes(second) ? 2 : 1;
|
|
166
169
|
if (first === 'draft' && second === 'revision')
|
|
167
170
|
return positionals[2] && ['show', 'apply', 'discard'].includes(positionals[2]) ? 3 : 2;
|
|
168
171
|
if (first === 'credits')
|
package/package.json
CHANGED
package/skills/coauthor/SKILL.md
CHANGED
|
@@ -39,7 +39,7 @@ Typical timing: brief and outline under a minute; research and draft 3–10 minu
|
|
|
39
39
|
6. **Quality pass.** `coauthor draft get <id> --format markdown --json` and read `data.markdown` in full. Check it against the brief's must-include, must-avoid, and non-negotiables. Look for: notes about the research process ("the retrieved sources do not…"), invented "checked <date>" lines, numbered lists that restart at 1, garbled `*`, `_`, or code spans, literal `[ ]` in checklists, the same caveat repeated across sections, claims without a source or cited to a page that doesn't support them, contradictions, and a messy Sources list (generic titles like "Google", duplicate entries). Fix them in step 8.
|
|
40
40
|
7. **Images.** `coauthor image list <id> --json`, then for each placeholder `coauthor image generate <id> --placeholder-id <placeholder id> --json` (the `id` UUID, not `placeholder_id`), then poll `coauthor image status <id> --json` until none are generating. CoAuthor decides how many images a draft gets, sometimes only the featured image; the CLI can't add more, so tell the user if they expected several. Open each image and check it does not state numbers or claims the article does not make, then rewrite its alt text to match what is actually visible (the stored alt text describes the plan, not the result). See `references/images-and-social.md`.
|
|
41
41
|
8. **Edits.** For prose changes: `coauthor draft revise <id> --instruction "..." --wait --json` (be specific: name the section and give a number, such as "cut the intro to under 60 words"), review each group's `before_markdown` and `after_markdown`, then `coauthor draft revision apply <id> <revision-id> --json` (optionally `--accept` or `--reject` with ids copied from `data.groups[].id`) or `coauthor draft revision discard <id> <revision-id> --json`. For exact text you already have, edit the document JSON and `draft save`. See `references/editing-drafts.md`.
|
|
42
|
-
9. **Deliver.** Give the user the final markdown (or `--format html`), the decision log (`coauthor log show <id> --json`: what you approved, what you asked CoAuthor to change, what you assumed), and the credits used (`coauthor credits <id> --json`). The user also sees the log in the project's workspace in the web app. With their yes: share link
|
|
42
|
+
9. **Deliver.** Give the user the final markdown (or `--format html`), the decision log (`coauthor log show <id> --json`: what you approved, what you asked CoAuthor to change, what you assumed), and the credits used (`coauthor credits <id> --json`). The user also sees the log in the project's workspace in the web app. With their yes: share link or WordPress export (`references/publishing-and-export.md`). For social posts and an email newsletter, `coauthor repurpose generate <id> --format all --json`, review `data.copy`, and `coauthor repurpose download <id> --out <dir>` (`references/repurposing.md`).
|
|
43
43
|
|
|
44
44
|
## When something stops
|
|
45
45
|
|
|
@@ -62,4 +62,4 @@ Everything else, including auth problems: `references/troubleshooting.md`. Credi
|
|
|
62
62
|
|
|
63
63
|
## Not in the CLI yet
|
|
64
64
|
|
|
65
|
-
Creating or editing writer profiles, PDFs over about 3.3 MB, adding more images than CoAuthor planned,
|
|
65
|
+
Creating or editing writer profiles, PDFs over about 3.3 MB, adding more images than CoAuthor planned, slideshows, and video. Point the user to the CoAuthor web app at https://tools.clickminded.com/coauthor for these instead of improvising.
|
|
@@ -25,4 +25,4 @@ Images cost credits each time they are generated or edited, so check the brief a
|
|
|
25
25
|
|
|
26
26
|
## Other formats
|
|
27
27
|
|
|
28
|
-
LinkedIn, Facebook, and email newsletter versions
|
|
28
|
+
X posts, LinkedIn, Facebook, and email newsletter versions: see `references/repurposing.md`. Carousel slideshows and short videos are generated in the CoAuthor web app (open the project, then Promote).
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Repurposing: social posts and an email newsletter
|
|
2
|
+
|
|
3
|
+
Once the draft is final, CoAuthor turns it into distribution copy in the project's voice.
|
|
4
|
+
|
|
5
|
+
| Format | `--format` | What you get |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| X thread | `x-thread` | A numbered thread linking back to the article |
|
|
8
|
+
| X post | `x-post` | Variations, each a main post plus a link reply, with alternate hooks |
|
|
9
|
+
| LinkedIn post | `linkedin` | Variations with alternate hooks |
|
|
10
|
+
| Facebook post | `facebook` | Variations with alternate hooks |
|
|
11
|
+
| Email newsletter | `email` | Variations with subject line, preheader, and body |
|
|
12
|
+
|
|
13
|
+
Slideshows (carousels) and short videos are generated in the CoAuthor web app (open the project, then Promote). `repurpose download` includes them as JSON once they exist.
|
|
14
|
+
|
|
15
|
+
## Generate
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
coauthor repurpose generate <id> --format linkedin --json # one format, about 20-90 seconds
|
|
19
|
+
coauthor repurpose generate <id> --format all --json # all five text formats, in turn
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- Generate only after the draft is final. Regenerating replaces the previous version of that format.
|
|
23
|
+
- The full set costs roughly 100-150 credits on top of the article.
|
|
24
|
+
- `coauthor repurpose list <id> --json` shows which formats exist and which are `stale` (the draft changed since they were made). Regenerate stale ones before anyone posts them.
|
|
25
|
+
|
|
26
|
+
## Review
|
|
27
|
+
|
|
28
|
+
`coauthor repurpose show <id> --format <format> --json` returns:
|
|
29
|
+
- `data.copy`: copy-ready text, with the article link filled in exactly as the web app's Copy button produces it
|
|
30
|
+
- `data.artifact`: the stored version with ids, used for edits
|
|
31
|
+
|
|
32
|
+
Review every variation against the brief and the article: claims must match the article, the voice must match the profile, and there must be no invented numbers.
|
|
33
|
+
|
|
34
|
+
## Edit
|
|
35
|
+
|
|
36
|
+
Save edits with the stored ids (`data.artifact.variations[].id`):
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
coauthor repurpose save <id> --format linkedin --data '{"variation_id":"<id>","post_text":"..."}' --json
|
|
40
|
+
coauthor repurpose save <id> --format email --data '{"variation_id":"<id>","subject_line":"...","preheader":"...","body_text":"..."}' --json
|
|
41
|
+
coauthor repurpose save <id> --format x-post --data '{"variation_id":"<id>","posts":[<main>,<link_reply>]}' --json # exactly the 2 posts from the artifact, edited
|
|
42
|
+
coauthor repurpose save <id> --format x-thread --data '{"posts":[...]}' --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Add `"destination_url": "https://..."` to point the posts at the published article. Keep the `{{POST_URL}}` placeholder in stored text; it is replaced with the destination URL on copy.
|
|
46
|
+
|
|
47
|
+
## Deliver
|
|
48
|
+
|
|
49
|
+
`coauthor repurpose download <id> --out <dir>` writes:
|
|
50
|
+
- `article.md` (with its title)
|
|
51
|
+
- `<format>.md` with copy-ready text and `<format>.json` for each format that exists
|
|
52
|
+
- `manifest.json` (stale flags)
|
|
53
|
+
|
|
54
|
+
Hand the user the folder, or paste from `data.copy`.
|
|
55
|
+
|
|
56
|
+
Only X can be posted directly. A thread posts with `coauthor publish thread <id> --yes` after the user's explicit OK. LinkedIn, Facebook, and email are copy-and-paste.
|
|
@@ -41,7 +41,7 @@ Typical timing: brief and outline under a minute; research and draft 3–10 minu
|
|
|
41
41
|
6. **Quality pass.** `coauthor draft get <id> --format markdown --json` and read `data.markdown` in full. Check it against the brief's must-include, must-avoid, and non-negotiables. Look for: notes about the research process ("the retrieved sources do not…"), invented "checked <date>" lines, numbered lists that restart at 1, garbled `*`, `_`, or code spans, literal `[ ]` in checklists, the same caveat repeated across sections, claims without a source or cited to a page that doesn't support them, contradictions, and a messy Sources list (generic titles like "Google", duplicate entries). Fix them in step 8.
|
|
42
42
|
7. **Images.** `coauthor image list <id> --json`, then for each placeholder `coauthor image generate <id> --placeholder-id <placeholder id> --json` (the `id` UUID, not `placeholder_id`), then poll `coauthor image status <id> --json` until none are generating. CoAuthor decides how many images a draft gets, sometimes only the featured image; the CLI can't add more, so tell the user if they expected several. Open each image and check it does not state numbers or claims the article does not make, then rewrite its alt text to match what is actually visible (the stored alt text describes the plan, not the result). See `references/images-and-social.md`.
|
|
43
43
|
8. **Edits.** For prose changes: `coauthor draft revise <id> --instruction "..." --wait --json` (be specific: name the section and give a number, such as "cut the intro to under 60 words"), review each group's `before_markdown` and `after_markdown`, then `coauthor draft revision apply <id> <revision-id> --json` (optionally `--accept` or `--reject` with ids copied from `data.groups[].id`) or `coauthor draft revision discard <id> <revision-id> --json`. For exact text you already have, edit the document JSON and `draft save`. See `references/editing-drafts.md`.
|
|
44
|
-
9. **Deliver.** Give the user the final markdown (or `--format html`), the decision log (`coauthor log show <id> --json`: what you approved, what you asked CoAuthor to change, what you assumed), and the credits used (`coauthor credits <id> --json`). The user also sees the log in the project's workspace in the web app. With their yes: share link
|
|
44
|
+
9. **Deliver.** Give the user the final markdown (or `--format html`), the decision log (`coauthor log show <id> --json`: what you approved, what you asked CoAuthor to change, what you assumed), and the credits used (`coauthor credits <id> --json`). The user also sees the log in the project's workspace in the web app. With their yes: share link or WordPress export (`references/publishing-and-export.md`). For social posts and an email newsletter, `coauthor repurpose generate <id> --format all --json`, review `data.copy`, and `coauthor repurpose download <id> --out <dir>` (`references/repurposing.md`).
|
|
45
45
|
|
|
46
46
|
## When something stops
|
|
47
47
|
|
|
@@ -64,7 +64,7 @@ Everything else, including auth problems: `references/troubleshooting.md`. Credi
|
|
|
64
64
|
|
|
65
65
|
## Not in the CLI yet
|
|
66
66
|
|
|
67
|
-
Creating or editing writer profiles, PDFs over about 3.3 MB, adding more images than CoAuthor planned,
|
|
67
|
+
Creating or editing writer profiles, PDFs over about 3.3 MB, adding more images than CoAuthor planned, slideshows, and video. Point the user to the CoAuthor web app at https://tools.clickminded.com/coauthor for these instead of improvising.
|
|
68
68
|
|
|
69
69
|
# Reference sections
|
|
70
70
|
|
|
@@ -350,7 +350,7 @@ Images cost credits each time they are generated or edited, so check the brief a
|
|
|
350
350
|
|
|
351
351
|
### Other formats
|
|
352
352
|
|
|
353
|
-
LinkedIn, Facebook, and email newsletter versions
|
|
353
|
+
X posts, LinkedIn, Facebook, and email newsletter versions: see `references/repurposing.md`. Carousel slideshows and short videos are generated in the CoAuthor web app (open the project, then Promote).
|
|
354
354
|
|
|
355
355
|
## references/publishing-and-export.md
|
|
356
356
|
|
|
@@ -392,6 +392,65 @@ See `references/images-and-social.md`. Publishing a thread posts immediately and
|
|
|
392
392
|
|
|
393
393
|
After a network error or an unclear result on an export or publish, do not run it again straight away. Check `coauthor operation list --json` for the operation and its status first, then decide.
|
|
394
394
|
|
|
395
|
+
## references/repurposing.md
|
|
396
|
+
|
|
397
|
+
## Repurposing: social posts and an email newsletter
|
|
398
|
+
|
|
399
|
+
Once the draft is final, CoAuthor turns it into distribution copy in the project's voice.
|
|
400
|
+
|
|
401
|
+
| Format | `--format` | What you get |
|
|
402
|
+
| --- | --- | --- |
|
|
403
|
+
| X thread | `x-thread` | A numbered thread linking back to the article |
|
|
404
|
+
| X post | `x-post` | Variations, each a main post plus a link reply, with alternate hooks |
|
|
405
|
+
| LinkedIn post | `linkedin` | Variations with alternate hooks |
|
|
406
|
+
| Facebook post | `facebook` | Variations with alternate hooks |
|
|
407
|
+
| Email newsletter | `email` | Variations with subject line, preheader, and body |
|
|
408
|
+
|
|
409
|
+
Slideshows (carousels) and short videos are generated in the CoAuthor web app (open the project, then Promote). `repurpose download` includes them as JSON once they exist.
|
|
410
|
+
|
|
411
|
+
### Generate
|
|
412
|
+
|
|
413
|
+
```sh
|
|
414
|
+
coauthor repurpose generate <id> --format linkedin --json # one format, about 20-90 seconds
|
|
415
|
+
coauthor repurpose generate <id> --format all --json # all five text formats, in turn
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
- Generate only after the draft is final. Regenerating replaces the previous version of that format.
|
|
419
|
+
- The full set costs roughly 100-150 credits on top of the article.
|
|
420
|
+
- `coauthor repurpose list <id> --json` shows which formats exist and which are `stale` (the draft changed since they were made). Regenerate stale ones before anyone posts them.
|
|
421
|
+
|
|
422
|
+
### Review
|
|
423
|
+
|
|
424
|
+
`coauthor repurpose show <id> --format <format> --json` returns:
|
|
425
|
+
- `data.copy`: copy-ready text, with the article link filled in exactly as the web app's Copy button produces it
|
|
426
|
+
- `data.artifact`: the stored version with ids, used for edits
|
|
427
|
+
|
|
428
|
+
Review every variation against the brief and the article: claims must match the article, the voice must match the profile, and there must be no invented numbers.
|
|
429
|
+
|
|
430
|
+
### Edit
|
|
431
|
+
|
|
432
|
+
Save edits with the stored ids (`data.artifact.variations[].id`):
|
|
433
|
+
|
|
434
|
+
```sh
|
|
435
|
+
coauthor repurpose save <id> --format linkedin --data '{"variation_id":"<id>","post_text":"..."}' --json
|
|
436
|
+
coauthor repurpose save <id> --format email --data '{"variation_id":"<id>","subject_line":"...","preheader":"...","body_text":"..."}' --json
|
|
437
|
+
coauthor repurpose save <id> --format x-post --data '{"variation_id":"<id>","posts":[<main>,<link_reply>]}' --json # exactly the 2 posts from the artifact, edited
|
|
438
|
+
coauthor repurpose save <id> --format x-thread --data '{"posts":[...]}' --json
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Add `"destination_url": "https://..."` to point the posts at the published article. Keep the `{{POST_URL}}` placeholder in stored text; it is replaced with the destination URL on copy.
|
|
442
|
+
|
|
443
|
+
### Deliver
|
|
444
|
+
|
|
445
|
+
`coauthor repurpose download <id> --out <dir>` writes:
|
|
446
|
+
- `article.md` (with its title)
|
|
447
|
+
- `<format>.md` with copy-ready text and `<format>.json` for each format that exists
|
|
448
|
+
- `manifest.json` (stale flags)
|
|
449
|
+
|
|
450
|
+
Hand the user the folder, or paste from `data.copy`.
|
|
451
|
+
|
|
452
|
+
Only X can be posted directly. A thread posts with `coauthor publish thread <id> --yes` after the user's explicit OK. LinkedIn, Facebook, and email are copy-and-paste.
|
|
453
|
+
|
|
395
454
|
## references/troubleshooting.md
|
|
396
455
|
|
|
397
456
|
## Troubleshooting
|