@clickminded/coauthor-cli 0.0.59 → 0.0.60
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
|
@@ -93,6 +93,7 @@ coauthor seo-plan show --kind post --json # strategy, Do ne
|
|
|
93
93
|
coauthor seo-plan write <item-id> --json # open a project for a post idea, then continue with workflow run
|
|
94
94
|
coauthor seo-plan dismiss <item-id> --json # hide an idea (--undo brings it back)
|
|
95
95
|
coauthor seo-plan done <item-id> --json # mark an idea done, e.g. after improving the page (--undo clears it)
|
|
96
|
+
coauthor seo-plan monthly-check on|off --json # switch the plan's monthly rank check (uses credits; the first check is free)
|
|
96
97
|
```
|
|
97
98
|
|
|
98
99
|
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
|
@@ -2234,6 +2234,7 @@ const SEO_PLAN_USAGE = [
|
|
|
2234
2234
|
' coauthor seo-plan write <item-id> [--json]',
|
|
2235
2235
|
' coauthor seo-plan dismiss <item-id> [--undo] [--json]',
|
|
2236
2236
|
' coauthor seo-plan done <item-id> [--undo] [--json]',
|
|
2237
|
+
' coauthor seo-plan monthly-check on|off [--profile <profile-id>] [--json]',
|
|
2237
2238
|
].join('\n');
|
|
2238
2239
|
function planRecord(value) {
|
|
2239
2240
|
return value && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
@@ -2303,6 +2304,17 @@ function seoPlanShowMessage(data, kind) {
|
|
|
2303
2304
|
}
|
|
2304
2305
|
if (view.stale === true)
|
|
2305
2306
|
lines.push('The profile\'s website or market changed since this plan was made. `coauthor seo-plan generate` updates it.');
|
|
2307
|
+
const monthly = view.monthly_check === null || view.monthly_check === undefined ? null : planRecord(view.monthly_check);
|
|
2308
|
+
if (monthly) {
|
|
2309
|
+
if (monthly.enabled === true) {
|
|
2310
|
+
const next = planString(monthly, 'next_check_at');
|
|
2311
|
+
const credits = typeof monthly.estimate_credits === 'number' ? monthly.estimate_credits : null;
|
|
2312
|
+
lines.push(`Monthly check: on${credits ? `, about ${credits} credits a month${monthly.first_check_free === true ? ' (the first check is free)' : ''}` : ''}${next ? `, next on ${next.slice(0, 10)}` : ''}. Turn it off with \`coauthor seo-plan monthly-check off\`.`);
|
|
2313
|
+
}
|
|
2314
|
+
else {
|
|
2315
|
+
lines.push('Monthly check: off. Turn it on with `coauthor seo-plan monthly-check on`.');
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2306
2318
|
const strategy = planString(plan, 'strategy_line');
|
|
2307
2319
|
if (strategy)
|
|
2308
2320
|
lines.push(`Strategy: ${strategy}`);
|
|
@@ -2379,7 +2391,7 @@ async function waitForSeoPlan(client, profileId, started) {
|
|
|
2379
2391
|
};
|
|
2380
2392
|
}
|
|
2381
2393
|
async function runSeoPlanCommand(action, input, client) {
|
|
2382
|
-
if (!action || !['show', 'generate', 'write', 'dismiss', 'done'].includes(action))
|
|
2394
|
+
if (!action || !['show', 'generate', 'write', 'dismiss', 'done', 'monthly-check'].includes(action))
|
|
2383
2395
|
throw new Error(SEO_PLAN_USAGE);
|
|
2384
2396
|
if (action === 'show') {
|
|
2385
2397
|
const kind = (getString(input.values, 'kind') ?? 'post').trim().toLowerCase().replace(/-/g, '_');
|
|
@@ -2442,6 +2454,26 @@ async function runSeoPlanCommand(action, input, client) {
|
|
|
2442
2454
|
const result = await waitForSeoPlan(client, profileId, started);
|
|
2443
2455
|
return { ...result, idempotency_key: idempotencyKey };
|
|
2444
2456
|
}
|
|
2457
|
+
if (action === 'monthly-check') {
|
|
2458
|
+
const choice = input.positionals[0]?.trim().toLowerCase();
|
|
2459
|
+
if (choice !== 'on' && choice !== 'off')
|
|
2460
|
+
throw new Error('Usage: coauthor seo-plan monthly-check on|off [--profile <profile-id>]');
|
|
2461
|
+
const profileId = await resolveProfileOption(input, client);
|
|
2462
|
+
const data = await client.request({
|
|
2463
|
+
method: 'PATCH',
|
|
2464
|
+
path: `profiles/${encodeURIComponent(profileId)}/seo-plan/monthly-check`,
|
|
2465
|
+
body: { enabled: choice === 'on' },
|
|
2466
|
+
});
|
|
2467
|
+
const nextCheck = getResponseString(data, 'next_check_at');
|
|
2468
|
+
return {
|
|
2469
|
+
ok: true,
|
|
2470
|
+
message: choice === 'on'
|
|
2471
|
+
? `Monthly check is on${nextCheck ? `; the next one runs on ${nextCheck.slice(0, 10)}` : ''}. It uses credits (your first check is free). Turn it off with \`coauthor seo-plan monthly-check off\`.`
|
|
2472
|
+
: 'Monthly check is off. Rankings and chances stop updating until you turn it on again with `coauthor seo-plan monthly-check on`.',
|
|
2473
|
+
messageIncludesData: true,
|
|
2474
|
+
data,
|
|
2475
|
+
};
|
|
2476
|
+
}
|
|
2445
2477
|
const itemId = input.positionals[0];
|
|
2446
2478
|
if (action === 'write') {
|
|
2447
2479
|
if (!itemId)
|
|
@@ -3295,7 +3327,7 @@ export function helpResult(command = []) {
|
|
|
3295
3327
|
' profile list|show|update (update: --interactive-widgets on|off)',
|
|
3296
3328
|
' widgets list|status|build|build-all|use-image|edit|delete (interactives, beta)',
|
|
3297
3329
|
' site status|reindex [--profile <profile-id>] (limited rollout)',
|
|
3298
|
-
' seo-plan show|generate|write|dismiss|done (limited rollout)',
|
|
3330
|
+
' seo-plan show|generate|write|dismiss|done|monthly-check (limited rollout)',
|
|
3299
3331
|
' source list|add|remove',
|
|
3300
3332
|
' integrations list',
|
|
3301
3333
|
' log add|show',
|
|
@@ -3433,6 +3465,7 @@ function commandHelp(command) {
|
|
|
3433
3465
|
' coauthor seo-plan write <item-id> [--json]',
|
|
3434
3466
|
' coauthor seo-plan dismiss <item-id> [--undo] [--json]',
|
|
3435
3467
|
' coauthor seo-plan done <item-id> [--undo] [--json]',
|
|
3468
|
+
' coauthor seo-plan monthly-check on|off [--profile <profile-id>] [--json]',
|
|
3436
3469
|
'',
|
|
3437
3470
|
'SEO content plan (limited rollout): a business-wide keyword plan for a writer profile, built from live search data and the profile\'s website. Without --profile it uses the default profile.',
|
|
3438
3471
|
'show prints the strategy, the Do next moves, counts per kind, and the ideas of one kind (default post). Kinds: post (written post ideas), improve (existing pages to improve), page (page ideas, not blog posts), left_out (searches skipped, with a reason), covered, not_checked.',
|
|
@@ -3440,6 +3473,7 @@ function commandHelp(command) {
|
|
|
3440
3473
|
'write <item-id> opens a project for a post idea, already set up from the plan, and prints its id and the start prompt. Continue with the normal project flow. Writing the same idea again returns the same project.',
|
|
3441
3474
|
'dismiss hides an idea from the plan; --undo brings it back.',
|
|
3442
3475
|
'done marks an idea as done (for example after you improved the page); --undo clears the mark. A done idea stays in the plan and stays done when the plan is updated.',
|
|
3476
|
+
'monthly-check on|off switches the plan\'s monthly check (free). Once a month it re-checks where each published post ranks on Google, refreshes the plan\'s ranking data and chances, and uses credits (the first check is free). show prints its state: enabled, next_check_at and about how many credits a month. It is absent while monthly checks are not switched on for the account. Turning it on picks the next date at least 25 days after the last check.',
|
|
3443
3477
|
'Errors: not_enabled, profile_not_found, profile_archived, site_required, site_indexing, market_confirmation_needed, market_not_supported, insufficient_credits, plan_running, worker_unavailable, plan_stale, plan_updated, not_writable, plan_item_not_found.',
|
|
3444
3478
|
].join('\n'),
|
|
3445
3479
|
integrations: [
|
package/dist/parser.js
CHANGED
|
@@ -190,7 +190,7 @@ function commandLength(positionals) {
|
|
|
190
190
|
if (first === 'site')
|
|
191
191
|
return second && ['status', 'reindex'].includes(second) ? 2 : 1;
|
|
192
192
|
if (first === 'seo-plan')
|
|
193
|
-
return second && ['show', 'generate', 'write', 'dismiss', 'done'].includes(second) ? 2 : 1;
|
|
193
|
+
return second && ['show', 'generate', 'write', 'dismiss', 'done', 'monthly-check'].includes(second) ? 2 : 1;
|
|
194
194
|
if (first === 'integrations')
|
|
195
195
|
return second === 'list' ? 2 : 1;
|
|
196
196
|
if (first === 'source')
|
package/package.json
CHANGED
package/skills/coauthor/SKILL.md
CHANGED
|
@@ -70,6 +70,7 @@ When the user wants to know what to write about for a business site, or asks for
|
|
|
70
70
|
- `coauthor seo-plan write <item-id> --json` opens a project for a `post` idea, already set up from the plan; continue with `workflow run <project-id> --target outline` as usual. Only `post` items are writable: `improve` items are edits to a page the site already has, and `page` items are site tasks.
|
|
71
71
|
- `coauthor seo-plan dismiss <item-id> [--undo] --json` hides an idea the user rules out.
|
|
72
72
|
- `coauthor seo-plan done <item-id> [--undo] --json` marks an idea done (usually an `improve` page the user has updated). Items carry `done_at`; a done idea stays done when the plan is updated.
|
|
73
|
+
- `coauthor seo-plan monthly-check on|off --json` switches the plan's monthly check, which re-checks where each published post ranks on Google and refreshes the plan's chances. It uses credits (about 30 a month; the first check is free). `show` returns `data.monthly_check` (`enabled`, `next_check_at`, `estimate_credits`), or `null` while it is not switched on for the account.
|
|
73
74
|
|
|
74
75
|
Details, item fields, and what each kind means: `references/seo-content-plan.md`. If a command answers `not_enabled`, the account is outside the rollout; carry on without a plan.
|
|
75
76
|
|
|
@@ -27,6 +27,7 @@ coauthor seo-plan show [--profile <id>] [--kind post|improve|page|left_out|cover
|
|
|
27
27
|
coauthor seo-plan write <item-id> --json
|
|
28
28
|
coauthor seo-plan dismiss <item-id> [--undo] --json
|
|
29
29
|
coauthor seo-plan done <item-id> [--undo] --json
|
|
30
|
+
coauthor seo-plan monthly-check on|off [--profile <id>] --json
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
- Without `--profile` the default profile is used. Run `coauthor profile list --json` first when the user has several profiles and the request names a site or brand.
|
|
@@ -74,6 +75,14 @@ Errors: `plan_stale` (the profile's website or market changed; run `generate` to
|
|
|
74
75
|
|
|
75
76
|
`coauthor seo-plan done <item-id> --json` marks an idea as done and returns `data.item_id` and `data.done_at`. `--undo` clears the mark (`done_at` is `null`). Use it for an `improve` item once the user says the page has been updated, or for any other idea they have finished outside CoAuthor. Do not mark ideas done on your own judgment. Done ideas stay in `show` with a non-null `done_at` (the human output marks them `(done)`), and they stay done when the plan is updated with `generate`. Only `post`, `improve`, `covered` and `page` items can be marked; other ids answer `plan_item_not_found`.
|
|
76
77
|
|
|
78
|
+
## Monthly check
|
|
79
|
+
|
|
80
|
+
Once a month CoAuthor looks up where each published post (one with a target search and a live URL) ranks on Google, refreshes the plan's ranking data and the chance of its top ideas, and records the result. It uses credits, about 30 a month, and the account's first check is free. It is on by default for a plan.
|
|
81
|
+
|
|
82
|
+
`coauthor seo-plan monthly-check on|off [--profile <id>] --json` switches it for that profile's plan and returns `data.enabled` and `data.next_check_at` (`null` when off). Turning it on picks the next date at least 25 days after the last check, so switching does not buy an early check. `show` returns `data.monthly_check` with `enabled`, `next_check_at`, `last_check_at`, `estimate_credits` and `first_check_free`; it is `null` while monthly checks are not switched on for the account, and then there is nothing to switch. Do not turn it off on your own judgment: it is what keeps the plan's rankings and chances current. Errors: `not_enabled`, `profile_not_found`, `plan_not_found` (make the plan first), `invalid_input`.
|
|
83
|
+
|
|
84
|
+
Posts are only tracked once their live URL is known: set it with `coauthor post-details set <id> --live-url <url>` (see `references/publishing-and-export.md`).
|
|
85
|
+
|
|
77
86
|
## What to tell the user
|
|
78
87
|
|
|
79
88
|
Summarize rather than dump: the `strategy_line`, the Do next moves with their `chance` and why, and the counts. Offer to write the first one or two posts. Mention `improve` items separately, because they are quick wins on pages that already rank.
|
|
@@ -72,6 +72,7 @@ When the user wants to know what to write about for a business site, or asks for
|
|
|
72
72
|
- `coauthor seo-plan write <item-id> --json` opens a project for a `post` idea, already set up from the plan; continue with `workflow run <project-id> --target outline` as usual. Only `post` items are writable: `improve` items are edits to a page the site already has, and `page` items are site tasks.
|
|
73
73
|
- `coauthor seo-plan dismiss <item-id> [--undo] --json` hides an idea the user rules out.
|
|
74
74
|
- `coauthor seo-plan done <item-id> [--undo] --json` marks an idea done (usually an `improve` page the user has updated). Items carry `done_at`; a done idea stays done when the plan is updated.
|
|
75
|
+
- `coauthor seo-plan monthly-check on|off --json` switches the plan's monthly check, which re-checks where each published post ranks on Google and refreshes the plan's chances. It uses credits (about 30 a month; the first check is free). `show` returns `data.monthly_check` (`enabled`, `next_check_at`, `estimate_credits`), or `null` while it is not switched on for the account.
|
|
75
76
|
|
|
76
77
|
Details, item fields, and what each kind means: `references/seo-content-plan.md`. If a command answers `not_enabled`, the account is outside the rollout; carry on without a plan.
|
|
77
78
|
|
|
@@ -611,6 +612,7 @@ coauthor seo-plan show [--profile <id>] [--kind post|improve|page|left_out|cover
|
|
|
611
612
|
coauthor seo-plan write <item-id> --json
|
|
612
613
|
coauthor seo-plan dismiss <item-id> [--undo] --json
|
|
613
614
|
coauthor seo-plan done <item-id> [--undo] --json
|
|
615
|
+
coauthor seo-plan monthly-check on|off [--profile <id>] --json
|
|
614
616
|
```
|
|
615
617
|
|
|
616
618
|
- Without `--profile` the default profile is used. Run `coauthor profile list --json` first when the user has several profiles and the request names a site or brand.
|
|
@@ -658,6 +660,14 @@ Errors: `plan_stale` (the profile's website or market changed; run `generate` to
|
|
|
658
660
|
|
|
659
661
|
`coauthor seo-plan done <item-id> --json` marks an idea as done and returns `data.item_id` and `data.done_at`. `--undo` clears the mark (`done_at` is `null`). Use it for an `improve` item once the user says the page has been updated, or for any other idea they have finished outside CoAuthor. Do not mark ideas done on your own judgment. Done ideas stay in `show` with a non-null `done_at` (the human output marks them `(done)`), and they stay done when the plan is updated with `generate`. Only `post`, `improve`, `covered` and `page` items can be marked; other ids answer `plan_item_not_found`.
|
|
660
662
|
|
|
663
|
+
### Monthly check
|
|
664
|
+
|
|
665
|
+
Once a month CoAuthor looks up where each published post (one with a target search and a live URL) ranks on Google, refreshes the plan's ranking data and the chance of its top ideas, and records the result. It uses credits, about 30 a month, and the account's first check is free. It is on by default for a plan.
|
|
666
|
+
|
|
667
|
+
`coauthor seo-plan monthly-check on|off [--profile <id>] --json` switches it for that profile's plan and returns `data.enabled` and `data.next_check_at` (`null` when off). Turning it on picks the next date at least 25 days after the last check, so switching does not buy an early check. `show` returns `data.monthly_check` with `enabled`, `next_check_at`, `last_check_at`, `estimate_credits` and `first_check_free`; it is `null` while monthly checks are not switched on for the account, and then there is nothing to switch. Do not turn it off on your own judgment: it is what keeps the plan's rankings and chances current. Errors: `not_enabled`, `profile_not_found`, `plan_not_found` (make the plan first), `invalid_input`.
|
|
668
|
+
|
|
669
|
+
Posts are only tracked once their live URL is known: set it with `coauthor post-details set <id> --live-url <url>` (see `references/publishing-and-export.md`).
|
|
670
|
+
|
|
661
671
|
### What to tell the user
|
|
662
672
|
|
|
663
673
|
Summarize rather than dump: the `strategy_line`, the Do next moves with their `chance` and why, and the counts. Offer to write the first one or two posts. Mention `improve` items separately, because they are quick wins on pages that already rank.
|