@clickminded/coauthor-cli 0.0.13 → 0.0.14
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 +4 -0
- package/dist/commands.js +15 -3
- package/dist/parser.js +2 -0
- package/package.json +1 -1
- package/skills/agents/SKILL.md +15 -0
- package/skills/claude/SKILL.md +15 -0
- package/skills/codex/SKILL.md +15 -0
- package/skills/cursor/coauthor-cli.mdc +6 -0
package/README.md
CHANGED
|
@@ -81,6 +81,7 @@ Create and inspect projects:
|
|
|
81
81
|
|
|
82
82
|
```sh
|
|
83
83
|
coauthor project create --title "Post title" --topic "Post brief" --audience "Target reader" --json
|
|
84
|
+
coauthor project create --contract '{"topic":"Post topic","angle":"Specific angle","target_audience":"Target reader","must_include":["Point to cover"]}' --json
|
|
84
85
|
coauthor project list --json
|
|
85
86
|
coauthor project show <project-id> --json
|
|
86
87
|
coauthor workspace show <project-id> --json
|
|
@@ -153,9 +154,12 @@ Then run live actions only when you mean to publish or export:
|
|
|
153
154
|
coauthor publish thread <project-id> --yes --json
|
|
154
155
|
coauthor export blog <project-id> --yes --slug "post-slug" --json
|
|
155
156
|
coauthor export clickminded <project-id> --yes --json
|
|
157
|
+
coauthor export wordpress <project-id> --yes --slug "post-slug" --json
|
|
156
158
|
coauthor operation status <operation-key> --json
|
|
157
159
|
```
|
|
158
160
|
|
|
161
|
+
For multiple WordPress connections, include `--connection-id <id>`.
|
|
162
|
+
|
|
159
163
|
Live actions require both publish scope and `--yes`.
|
|
160
164
|
|
|
161
165
|
## Agent Usage Rules
|
package/dist/commands.js
CHANGED
|
@@ -148,6 +148,12 @@ async function runAuthCommand(action, input, context) {
|
|
|
148
148
|
async function runProjectCommand(action, input, client) {
|
|
149
149
|
if (action === 'create') {
|
|
150
150
|
const body = withNamedOptions(parseJsonOption(input.values), input.values, ['title', 'topic', 'audience']);
|
|
151
|
+
const rawContract = getString(input.values, 'contract');
|
|
152
|
+
if (rawContract !== undefined) {
|
|
153
|
+
if (!rawContract.trim())
|
|
154
|
+
throw new Error('--contract must be a JSON object');
|
|
155
|
+
body.contract = parseJsonOption(input.values, 'contract');
|
|
156
|
+
}
|
|
151
157
|
const data = await client.request({ method: 'POST', path: 'projects', body });
|
|
152
158
|
return { ok: true, message: 'Project created', data };
|
|
153
159
|
}
|
|
@@ -430,7 +436,7 @@ async function runResourceCommand(resource, action, input, client) {
|
|
|
430
436
|
const data = await client.request({ method: 'POST', path: `${basePath}/thread`, body: parseJsonOption(input.values) });
|
|
431
437
|
return { ok: true, data };
|
|
432
438
|
}
|
|
433
|
-
if (resource === 'exports' && (action === 'blog' || action === 'clickminded')) {
|
|
439
|
+
if (resource === 'exports' && (action === 'blog' || action === 'clickminded' || action === 'wordpress')) {
|
|
434
440
|
if (!projectId)
|
|
435
441
|
throw new Error(`Missing project id for export ${action}`);
|
|
436
442
|
if (!getBoolean(input.values, 'yes'))
|
|
@@ -439,8 +445,13 @@ async function runResourceCommand(resource, action, input, client) {
|
|
|
439
445
|
'slug',
|
|
440
446
|
'status',
|
|
441
447
|
'permalink',
|
|
448
|
+
'connection-id',
|
|
442
449
|
'format',
|
|
443
450
|
]);
|
|
451
|
+
if (typeof body.connectionId === 'string') {
|
|
452
|
+
body.integration_id = body.connectionId;
|
|
453
|
+
delete body.connectionId;
|
|
454
|
+
}
|
|
444
455
|
const data = await client.request({ method: 'POST', path: `${basePath}/${action}`, body });
|
|
445
456
|
return { ok: true, data };
|
|
446
457
|
}
|
|
@@ -1073,7 +1084,7 @@ export function helpResult(command = []) {
|
|
|
1073
1084
|
' thread list|show|create|generate|save',
|
|
1074
1085
|
' slideshow show|save',
|
|
1075
1086
|
' publish thread',
|
|
1076
|
-
' export blog|clickminded',
|
|
1087
|
+
' export blog|clickminded|wordpress',
|
|
1077
1088
|
' operation list|show|status',
|
|
1078
1089
|
' credits',
|
|
1079
1090
|
' models list|preferences show|preferences set',
|
|
@@ -1086,9 +1097,10 @@ function commandHelp(command) {
|
|
|
1086
1097
|
const key = command.join(' ');
|
|
1087
1098
|
const help = {
|
|
1088
1099
|
'project create': [
|
|
1089
|
-
'Usage: coauthor project create [--title <title>] [--topic <brief>] [--audience <audience>] [--json]',
|
|
1100
|
+
'Usage: coauthor project create [--title <title>] [--topic <brief>] [--audience <audience>] [--contract <json>] [--json]',
|
|
1090
1101
|
'',
|
|
1091
1102
|
'Creates a project. When --topic or --audience is provided, CoAuthor seeds the saved contract so workflow briefing review can use that context.',
|
|
1103
|
+
'--contract accepts a JSON editorial contract object. Top-level --topic and --audience fill missing contract topic/audience fields.',
|
|
1092
1104
|
].join('\n'),
|
|
1093
1105
|
'workflow run': [
|
|
1094
1106
|
'Usage: coauthor workflow run <project-id> --target <outline|research|draft> [--planning-model <id>] [--writing-model <id>] [--wait] [--briefing-mode auto|strict|off] [--json]',
|
package/dist/parser.js
CHANGED
|
@@ -34,6 +34,7 @@ export function parseCliArgs(argv) {
|
|
|
34
34
|
title: { type: 'string' },
|
|
35
35
|
topic: { type: 'string' },
|
|
36
36
|
audience: { type: 'string' },
|
|
37
|
+
contract: { type: 'string' },
|
|
37
38
|
project: { type: 'string' },
|
|
38
39
|
id: { type: 'string' },
|
|
39
40
|
'placeholder-id': { type: 'string' },
|
|
@@ -50,6 +51,7 @@ export function parseCliArgs(argv) {
|
|
|
50
51
|
image: { type: 'string' },
|
|
51
52
|
slug: { type: 'string' },
|
|
52
53
|
permalink: { type: 'string' },
|
|
54
|
+
'connection-id': { type: 'string' },
|
|
53
55
|
status: { type: 'string' },
|
|
54
56
|
limit: { type: 'string' },
|
|
55
57
|
cursor: { type: 'string' },
|
package/package.json
CHANGED
package/skills/agents/SKILL.md
CHANGED
|
@@ -27,6 +27,19 @@ This skill guides agent use of the CoAuthor CLI.
|
|
|
27
27
|
- After a timeout, interruption, network error, or unclear result, check operation status before retrying.
|
|
28
28
|
- `contract approve`, `outline approve`, and `research-plan approve` approve the saved artifact when `--data` is omitted. Pass `--data` only when intentionally approving a replacement payload.
|
|
29
29
|
|
|
30
|
+
## Project Briefing
|
|
31
|
+
|
|
32
|
+
- For simple starts, use `coauthor project create --title "..." --topic "prose brief" --audience "target reader" --json`.
|
|
33
|
+
- When you know the editorial contract fields, prefer `coauthor project create --contract '<json>' --json` instead of cramming structured data into `--topic`.
|
|
34
|
+
- Keep `--topic` as a plain prose brief. Do not pass JSON through `--topic`.
|
|
35
|
+
- `--contract` accepts a JSON object with editorial contract fields such as `topic`, `angle`, `target_audience`, `core_promise`, `format`, `reading_commitment`, `length_guidance`, `audience_knowledge_assumptions`, `desired_reader_experience`, `structure_preferences`, `must_include`, `must_avoid`, `non_negotiables`, `evidence_expectations`, `citation_expectations`, `liked_examples`, `rejected_examples`, `additional_editorial_guidance`, `editorial_profile`, `style_rules`, `must_not_change`, `structure_preference`, and `confidence_notes`.
|
|
36
|
+
- Top-level `--title`, `--topic`, and `--audience` can still be used with `--contract`; they fill missing project title, contract topic, or contract audience fields.
|
|
37
|
+
- Example:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
coauthor project create --title "AI search attribution" --contract '{"topic":"AI search attribution","angle":"How marketing teams should measure source visibility across AI answer engines","target_audience":"B2B marketing leaders","core_promise":"Give readers a practical measurement framework they can use this quarter.","must_include":["source provenance","measurement tradeoffs","examples of query-level visibility checks"],"must_avoid":["generic SEO advice","unsupported vendor claims"],"evidence_expectations":["Use current platform documentation or credible examples for factual claims."],"editorial_profile":{"tone":"serious","form":"guide","depth":"deep","cadence":"moderate"}}' --json
|
|
41
|
+
```
|
|
42
|
+
|
|
30
43
|
## Safety
|
|
31
44
|
|
|
32
45
|
- Never print access tokens, publish tokens, service-role keys, cookies, or authorization headers.
|
|
@@ -59,3 +72,5 @@ Use `coauthor draft get <project-id> --format html --json` when the user needs H
|
|
|
59
72
|
Use `coauthor draft get <project-id> --format text --json` when the user needs plain text with image URL references.
|
|
60
73
|
|
|
61
74
|
Use `coauthor draft get <project-id> --format json --json` or omit `--format` when the user needs the raw editor document JSON.
|
|
75
|
+
|
|
76
|
+
Use `coauthor export wordpress <project-id> --yes --slug <slug> --json` to export a saved draft to WordPress. If more than one WordPress connection exists, pass `--connection-id <id>`.
|
package/skills/claude/SKILL.md
CHANGED
|
@@ -27,6 +27,19 @@ This skill guides agent use of the CoAuthor CLI.
|
|
|
27
27
|
- After a timeout, interruption, network error, or unclear result, check operation status before retrying.
|
|
28
28
|
- `contract approve`, `outline approve`, and `research-plan approve` approve the saved artifact when `--data` is omitted. Pass `--data` only when intentionally approving a replacement payload.
|
|
29
29
|
|
|
30
|
+
## Project Briefing
|
|
31
|
+
|
|
32
|
+
- For simple starts, use `coauthor project create --title "..." --topic "prose brief" --audience "target reader" --json`.
|
|
33
|
+
- When you know the editorial contract fields, prefer `coauthor project create --contract '<json>' --json` instead of cramming structured data into `--topic`.
|
|
34
|
+
- Keep `--topic` as a plain prose brief. Do not pass JSON through `--topic`.
|
|
35
|
+
- `--contract` accepts a JSON object with editorial contract fields such as `topic`, `angle`, `target_audience`, `core_promise`, `format`, `reading_commitment`, `length_guidance`, `audience_knowledge_assumptions`, `desired_reader_experience`, `structure_preferences`, `must_include`, `must_avoid`, `non_negotiables`, `evidence_expectations`, `citation_expectations`, `liked_examples`, `rejected_examples`, `additional_editorial_guidance`, `editorial_profile`, `style_rules`, `must_not_change`, `structure_preference`, and `confidence_notes`.
|
|
36
|
+
- Top-level `--title`, `--topic`, and `--audience` can still be used with `--contract`; they fill missing project title, contract topic, or contract audience fields.
|
|
37
|
+
- Example:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
coauthor project create --title "AI search attribution" --contract '{"topic":"AI search attribution","angle":"How marketing teams should measure source visibility across AI answer engines","target_audience":"B2B marketing leaders","core_promise":"Give readers a practical measurement framework they can use this quarter.","must_include":["source provenance","measurement tradeoffs","examples of query-level visibility checks"],"must_avoid":["generic SEO advice","unsupported vendor claims"],"evidence_expectations":["Use current platform documentation or credible examples for factual claims."],"editorial_profile":{"tone":"serious","form":"guide","depth":"deep","cadence":"moderate"}}' --json
|
|
41
|
+
```
|
|
42
|
+
|
|
30
43
|
## Safety
|
|
31
44
|
|
|
32
45
|
- Never print access tokens, publish tokens, service-role keys, cookies, or authorization headers.
|
|
@@ -59,3 +72,5 @@ Use `coauthor draft get <project-id> --format html --json` when the user needs H
|
|
|
59
72
|
Use `coauthor draft get <project-id> --format text --json` when the user needs plain text with image URL references.
|
|
60
73
|
|
|
61
74
|
Use `coauthor draft get <project-id> --format json --json` or omit `--format` when the user needs the raw editor document JSON.
|
|
75
|
+
|
|
76
|
+
Use `coauthor export wordpress <project-id> --yes --slug <slug> --json` to export a saved draft to WordPress. If more than one WordPress connection exists, pass `--connection-id <id>`.
|
package/skills/codex/SKILL.md
CHANGED
|
@@ -27,6 +27,19 @@ This skill guides agent use of the CoAuthor CLI.
|
|
|
27
27
|
- After a timeout, interruption, network error, or unclear result, check operation status before retrying.
|
|
28
28
|
- `contract approve`, `outline approve`, and `research-plan approve` approve the saved artifact when `--data` is omitted. Pass `--data` only when intentionally approving a replacement payload.
|
|
29
29
|
|
|
30
|
+
## Project Briefing
|
|
31
|
+
|
|
32
|
+
- For simple starts, use `coauthor project create --title "..." --topic "prose brief" --audience "target reader" --json`.
|
|
33
|
+
- When you know the editorial contract fields, prefer `coauthor project create --contract '<json>' --json` instead of cramming structured data into `--topic`.
|
|
34
|
+
- Keep `--topic` as a plain prose brief. Do not pass JSON through `--topic`.
|
|
35
|
+
- `--contract` accepts a JSON object with editorial contract fields such as `topic`, `angle`, `target_audience`, `core_promise`, `format`, `reading_commitment`, `length_guidance`, `audience_knowledge_assumptions`, `desired_reader_experience`, `structure_preferences`, `must_include`, `must_avoid`, `non_negotiables`, `evidence_expectations`, `citation_expectations`, `liked_examples`, `rejected_examples`, `additional_editorial_guidance`, `editorial_profile`, `style_rules`, `must_not_change`, `structure_preference`, and `confidence_notes`.
|
|
36
|
+
- Top-level `--title`, `--topic`, and `--audience` can still be used with `--contract`; they fill missing project title, contract topic, or contract audience fields.
|
|
37
|
+
- Example:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
coauthor project create --title "AI search attribution" --contract '{"topic":"AI search attribution","angle":"How marketing teams should measure source visibility across AI answer engines","target_audience":"B2B marketing leaders","core_promise":"Give readers a practical measurement framework they can use this quarter.","must_include":["source provenance","measurement tradeoffs","examples of query-level visibility checks"],"must_avoid":["generic SEO advice","unsupported vendor claims"],"evidence_expectations":["Use current platform documentation or credible examples for factual claims."],"editorial_profile":{"tone":"serious","form":"guide","depth":"deep","cadence":"moderate"}}' --json
|
|
41
|
+
```
|
|
42
|
+
|
|
30
43
|
## Safety
|
|
31
44
|
|
|
32
45
|
- Never print access tokens, publish tokens, service-role keys, cookies, or authorization headers.
|
|
@@ -59,3 +72,5 @@ Use `coauthor draft get <project-id> --format html --json` when the user needs H
|
|
|
59
72
|
Use `coauthor draft get <project-id> --format text --json` when the user needs plain text with image URL references.
|
|
60
73
|
|
|
61
74
|
Use `coauthor draft get <project-id> --format json --json` or omit `--format` when the user needs the raw editor document JSON.
|
|
75
|
+
|
|
76
|
+
Use `coauthor export wordpress <project-id> --yes --slug <slug> --json` to export a saved draft to WordPress. If more than one WordPress connection exists, pass `--connection-id <id>`.
|
|
@@ -23,6 +23,11 @@ alwaysApply: true
|
|
|
23
23
|
- Use `coauthor models preferences show|set` to inspect or update saved planning/writing preferences. Internal structuring models are not exposed through the CLI.
|
|
24
24
|
- After timeout, interruption, network error, or ambiguous output, check operation status before retrying or reporting success.
|
|
25
25
|
- `contract approve`, `outline approve`, and `research-plan approve` approve the saved artifact when `--data` is omitted. Pass `--data` only when intentionally approving a replacement payload.
|
|
26
|
+
- For simple starts, use `coauthor project create --title "..." --topic "prose brief" --audience "target reader" --json`.
|
|
27
|
+
- When you know the editorial contract fields, prefer `coauthor project create --contract '<json>' --json` instead of cramming structured data into `--topic`.
|
|
28
|
+
- Keep `--topic` as a plain prose brief. Do not pass JSON through `--topic`.
|
|
29
|
+
- `--contract` accepts a JSON object with editorial contract fields such as `topic`, `angle`, `target_audience`, `core_promise`, `format`, `reading_commitment`, `length_guidance`, `audience_knowledge_assumptions`, `desired_reader_experience`, `structure_preferences`, `must_include`, `must_avoid`, `non_negotiables`, `evidence_expectations`, `citation_expectations`, `liked_examples`, `rejected_examples`, `additional_editorial_guidance`, `editorial_profile`, `style_rules`, `must_not_change`, `structure_preference`, and `confidence_notes`.
|
|
30
|
+
- Top-level `--title`, `--topic`, and `--audience` can still be used with `--contract`; they fill missing project title, contract topic, or contract audience fields.
|
|
26
31
|
- Never print tokens, service-role keys, cookies, or authorization headers.
|
|
27
32
|
- Never ask the user to paste Anthropic, OpenAI, or Gemini provider API keys into chat or the terminal; key entry belongs in CoAuthor AI settings.
|
|
28
33
|
- Pass tokens through environment variables or secret-backed CLI options only.
|
|
@@ -38,3 +43,4 @@ alwaysApply: true
|
|
|
38
43
|
- Use `coauthor draft get <project-id> --format html --json` for HTML with resolved image tags.
|
|
39
44
|
- Use `coauthor draft get <project-id> --format text --json` for plain text with image URL references.
|
|
40
45
|
- Use `coauthor draft get <project-id> --format json --json` or omit `--format` for the raw editor document JSON.
|
|
46
|
+
- Use `coauthor export wordpress <project-id> --yes --slug <slug> --json` to export a saved draft to WordPress. If more than one WordPress connection exists, pass `--connection-id <id>`.
|