outrank-cli 0.1.0 → 0.2.0

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/SKILL.md CHANGED
@@ -1,15 +1,16 @@
1
1
  ---
2
2
  name: outrank
3
- description: Drive the Outrank agent API from the terminal via outrank-cli. Use when the user asks to list/create/update Outrank products, inspect or manage keyword plans, inspect or edit articles, manage article settings, target audiences, competitors, Google Search Console connections, or quote/buy product slots. Requires outrank-cli on PATH and an Outrank API key (env OUTRANK_API_KEY or stored via auth login).
3
+ description: Drive the Outrank agent API from the terminal via outrank-cli. Use when the user asks to list/create/update Outrank products, inspect or manage publishing integrations, inspect or manage keyword plans, inspect or edit articles, manage article settings, target audiences, competitors, Google Search Console connections, internal linking configuration, or quote/buy product slots. Requires outrank-cli on PATH and an Outrank API key (env OUTRANK_API_KEY or stored via auth login).
4
4
  ---
5
5
 
6
6
  # Outrank Skill
7
7
 
8
8
  Use `outrank-cli` to drive Outrank from the terminal. The CLI is JSON-first and every command returns `agent_guidance`, so read that field after each step and let it steer the next call.
9
9
 
10
- In human-facing responses, call `products get` / `products update` the product's General settings. These cover the non-editorial product basics such as name, URL, description, sitemap URL, blog root URL, publishing cadence, backlink toggles, and similar core product fields.
11
-
12
- In human-facing responses, call product `output-settings` article settings or article preferences. Use `output-settings` only when you are quoting the literal CLI command or API path.
10
+ In human-facing responses, call `products get` / `products update` the product's General settings. These cover the non-editorial product basics such as name, URL, description, sitemap URL, blog root URL, publishing cadence, and similar core product fields.
11
+
12
+ In human-facing responses, call product `output-settings` article settings or article preferences. Use `output-settings` only when you are quoting the literal CLI command or API path.
13
+ Use `products backlinks ...` for backlink exchange settings, credits, review queues, and reverification actions.
13
14
 
14
15
  ## Setup
15
16
 
@@ -49,9 +50,33 @@ Prefer inspecting before mutating:
49
50
  - `outrank-cli keywords export --product <productId>`
50
51
  - `outrank-cli products target-audiences list <productId>`
51
52
  - `outrank-cli products competitors list <productId>`
53
+ - `outrank-cli products integrations providers`
54
+ - `outrank-cli products integrations list <productId>`
55
+ - `outrank-cli products integrations get <productId> <integrationId>`
56
+ - `outrank-cli products integrations prepare wordpress-plugin <productId>`
57
+ - `outrank-cli products integrations connect wordpress-com <productId> --json-file wordpress-com-connect.json`
58
+ - `outrank-cli products integrations connect notion <productId>`
59
+ - `outrank-cli products integrations poll wordpress-com <productId> --attempt-id <attempt-id>`
60
+ - `outrank-cli products integrations poll notion <productId> --attempt-id <attempt-id>`
61
+ - `outrank-cli products integrations notion databases <productId> <integrationId>`
62
+ - `outrank-cli products integrations notion schema <productId> <integrationId> <databaseId>`
63
+ - `outrank-cli products integrations webflow sites --json-file webflow-sites.json`
64
+ - `outrank-cli products integrations webflow collections --json-file webflow-collections.json`
65
+ - `outrank-cli products integrations webflow fields --json-file webflow-fields.json`
66
+ - `outrank-cli products integrations webflow items --json-file webflow-items.json`
67
+ - `outrank-cli products integrations framer collections --json-file framer-collections.json`
68
+ - `outrank-cli products integrations framer fields --json-file framer-fields.json`
52
69
  - `outrank-cli products gsc status <productId>`
53
70
  - `outrank-cli products gsc accounts <productId>`
54
71
  - `outrank-cli products gsc performance <productId>`
72
+ - `outrank-cli products linking sources get <productId>`
73
+ - `outrank-cli products linking targets list <productId>`
74
+ - `outrank-cli products linking target-config get <productId>`
75
+ - `outrank-cli products backlinks get <productId>`
76
+ - `outrank-cli products backlinks credits <productId>`
77
+ - `outrank-cli products backlinks earned <productId>`
78
+ - `outrank-cli products backlinks unverified <productId>`
79
+ - `outrank-cli products backlinks subscription <productId>`
55
80
  - `outrank-cli subscription status`
56
81
  - `outrank-cli usage stats`
57
82
 
@@ -77,6 +102,23 @@ Write commands currently supported:
77
102
  - `outrank-cli products output-settings update <productId> --json-file output-settings.json`
78
103
  - `outrank-cli products target-audiences replace <productId> --json-file target-audiences.json`
79
104
  - `outrank-cli products competitors replace <productId> --json-file competitors.json`
105
+ - `outrank-cli products integrations validate <provider> --json-file integration.json`
106
+ - `outrank-cli products integrations create <productId> --json-file integration-create.json`
107
+ - `outrank-cli products integrations update <productId> <integrationId> --json-file integration-update.json`
108
+ - `outrank-cli products integrations test <productId> <integrationId>`
109
+ - `outrank-cli products integrations delete <productId> <integrationId>`
110
+ - `outrank-cli products integrations connect wordpress-com <productId> --json-file wordpress-com-connect.json`
111
+ - `outrank-cli products integrations poll wordpress-com <productId> --attempt-id <attempt-id>`
112
+ - `outrank-cli products integrations connect notion <productId>`
113
+ - `outrank-cli products integrations poll notion <productId> --attempt-id <attempt-id>`
114
+ - `outrank-cli products integrations notion databases <productId> <integrationId>`
115
+ - `outrank-cli products integrations notion schema <productId> <integrationId> <databaseId>`
116
+ - `outrank-cli products integrations webflow sites --json-file webflow-sites.json`
117
+ - `outrank-cli products integrations webflow collections --json-file webflow-collections.json`
118
+ - `outrank-cli products integrations webflow fields --json-file webflow-fields.json`
119
+ - `outrank-cli products integrations webflow items --json-file webflow-items.json`
120
+ - `outrank-cli products integrations framer collections --json-file framer-collections.json`
121
+ - `outrank-cli products integrations framer fields --json-file framer-fields.json`
80
122
  - `outrank-cli products gsc connect <productId>`
81
123
  - `outrank-cli products gsc reconnect <productId>`
82
124
  - `outrank-cli products gsc disconnect <productId>`
@@ -84,9 +126,20 @@ Write commands currently supported:
84
126
  - `outrank-cli products gsc search-analytics <productId> --dimensions query,page --limit 50`
85
127
  - `outrank-cli products gsc inspect-url <productId> --url https://example.com/blog/post`
86
128
  - `outrank-cli products gsc cannibalization <productId>`
129
+ - `outrank-cli products linking sources update <productId> --json-file linking-sources.json`
130
+ - `outrank-cli products linking detect <productId>`
131
+ - `outrank-cli products linking target-config update <productId> --json-file target-config.json`
132
+ - `outrank-cli products linking targets add-manual <productId> --json-file manual-target.json`
133
+ - `outrank-cli products linking targets upsert <productId> --json-file target-upsert.json`
134
+ - `outrank-cli products linking targets clear-customizations <productId> <targetId>`
135
+ - `outrank-cli products linking targets delete <productId> <targetId>`
136
+ - `outrank-cli products backlinks update <productId> --json-file backlinks.json`
137
+ - `outrank-cli products backlinks check-removal <productId> <backlinkId>`
138
+ - `outrank-cli products backlinks reverify <productId> <backlinkId>`
139
+ - `outrank-cli products backlinks subscribe-quote <productId> --plan premium|enterprise`
87
140
  - `outrank-cli keywords add --product <productId> --json-file keywords.json`
88
- - `outrank-cli keywords bulk-reschedule --json-file keyword-reschedule.json`
89
- - `outrank-cli keywords bulk-delete --json-file keyword-delete.json`
141
+ - `outrank-cli keywords bulk-reschedule --json-file keyword-reschedule.json`
142
+ - `outrank-cli keywords bulk-delete --json-file keyword-delete.json`
90
143
  - `outrank-cli articles update <articleId> --json-file article-patch.json`
91
144
  - `outrank-cli articles update-content <articleId> --json-file article-content.json`
92
145
  - `outrank-cli articles replace <articleId> --json-file replace.json`
@@ -158,7 +211,7 @@ If the live API or current repo context does not expose the full allowed option
158
211
  - if helpful, show the current value from an existing product as a reference point
159
212
  - say clearly when the CLI exposes the field's current value but not the full enum catalog
160
213
 
161
- Business-critical settings that may matter even if the current CLI surface cannot set them yet:
214
+ Business-critical settings that may matter before article generation:
162
215
 
163
216
  - blog URL or publishing destination
164
217
  - internal linking preferences
@@ -166,7 +219,7 @@ Business-critical settings that may matter even if the current CLI surface canno
166
219
  - article examples or brand-writing examples
167
220
  - publishing workflow preferences such as draft-first vs direct publish
168
221
 
169
- If the human has not provided those business-critical settings yet, say so clearly. Explain which of them are currently exposed by `outrank-cli` and which are not. For settings that are not yet supported by the current CLI surface, do not invent commands. Instead, ask the human whether to:
222
+ If the human has not provided those business-critical settings yet, say so clearly. Explain which of them are currently exposed by `outrank-cli` and which are not. Internal linking is now exposed through the `products linking ...` subtree. For settings that are not yet supported by the current CLI surface, do not invent commands. Instead, ask the human whether to:
170
223
 
171
224
  - proceed with existing/default Outrank settings for now, or
172
225
  - stop product creation until those settings are provided and/or configured elsewhere
@@ -223,8 +276,101 @@ Important behavior:
223
276
  - `cannibalization` highlights queries where multiple pages from the same site compete against each other.
224
277
  - Use `reconnect` when the status shows an expired token or refresh failure.
225
278
  - Use `disconnect` to remove the product's Search Console connection.
226
-
227
- ## Keyword workflow
279
+
280
+ ## Linking workflow
281
+
282
+ Use the product-scoped linking commands when the human needs to define where Outrank should discover internal-link candidates, inspect detected URLs, save a priority list, or constrain linking behavior.
283
+
284
+ Recommended flow:
285
+
286
+ 1. Inspect current source settings with `outrank-cli products linking sources get <productId>`.
287
+ 2. Save or change the primary source with `outrank-cli products linking sources update <productId> --json-file linking-sources.json`.
288
+ 3. Re-run discovery with `outrank-cli products linking detect <productId>`.
289
+ 4. Review saved targets with `outrank-cli products linking targets list <productId>`.
290
+ 5. Add missing on-domain URLs with `outrank-cli products linking targets add-manual <productId> --json-file manual-target.json`.
291
+ 6. Prioritize or add anchor text with `outrank-cli products linking targets upsert <productId> --json-file target-upsert.json`.
292
+ 7. Inspect product-wide behavior with `outrank-cli products linking target-config get <productId>`.
293
+ 8. Enable or relax priority-only behavior with `outrank-cli products linking target-config update <productId> --json-file target-config.json`.
294
+ 9. Clear stale anchor-text overrides with `outrank-cli products linking targets clear-customizations <productId> <targetId>`.
295
+ 10. Delete stale targets with `outrank-cli products linking targets delete <productId> <targetId>`.
296
+
297
+ Important behavior:
298
+
299
+ - Linking writes are gated by the product's backlink subscription. If the API returns `subscription_management_url`, stop retrying and ask the human to manage that billing change in the dashboard.
300
+ - `source_type` is not free-form. Use the exact backend values: `sitemap`, `root_url`, or `integration`.
301
+ - `additional_linking_sources` is a replacement list, not a patch. Keep existing items you still want.
302
+ - Manual and upserted target URLs must stay on the product's own domain.
303
+ - `only_prioritized` may fail until enough prioritized targets exist. If the API returns a conflict, add or prioritize more URLs first.
304
+ - `clear-customizations` only clears custom anchor text. It does not delete the target.
305
+
306
+ ## Backlinks workflow
307
+
308
+ Use the product-scoped backlink commands when the human needs to inspect or change backlink exchange participation, review earned placements, work through unverified items, or inspect subscription state.
309
+
310
+ Recommended flow:
311
+
312
+ 1. Inspect current settings with `outrank-cli products backlinks get <productId>`.
313
+ 2. Inspect credits with `outrank-cli products backlinks credits <productId>`.
314
+ 3. Review earned backlinks with `outrank-cli products backlinks earned <productId> --limit 20`.
315
+ 4. Add `--include-article` or `--include-summary` on the earned list when the human needs more article context.
316
+ 5. Review the unverified queue with `outrank-cli products backlinks unverified <productId> --limit 20`.
317
+ 6. Update settings with `outrank-cli products backlinks update <productId> --json-file backlinks.json`.
318
+ 7. Trigger a removal check with `outrank-cli products backlinks check-removal <productId> <backlinkId>`.
319
+ 8. Trigger a reverification with `outrank-cli products backlinks reverify <productId> <backlinkId>`.
320
+ 9. Inspect the current backlink subscription with `outrank-cli products backlinks subscription <productId>`.
321
+ 10. Quote a plan with `outrank-cli products backlinks subscribe-quote <productId> --plan premium|enterprise`.
322
+
323
+ Important behavior:
324
+
325
+ - Do not use `products update` for `backlinks_enabled` or `min_backlink_domain_rating`.
326
+ - Backlink writes are blocked when the product is hidden for inappropriate content, but reads still work.
327
+ - Setting `min_domain_rating` requires an active backlink subscription.
328
+ - `subscribe-quote` is read-only. Purchasing or changing the add-on still requires dashboard checkout.
329
+ - `earned` uses cursor pagination through `data.next_cursor`.
330
+ - `unverified` is the deduped article-level manual-review stream.
331
+
332
+ ## Integrations workflow
333
+
334
+ Use the current integrations commands when the human needs to inspect connected publishing integrations, validate direct credentials, run the WordPress.com or Notion OAuth handoff, inspect discovery data for Notion, Webflow, or Framer, test a saved integration row, or remove a stale one.
335
+
336
+ Recommended flow:
337
+
338
+ 1. Inspect connected integrations with `outrank-cli products integrations list <productId>`.
339
+ 2. Inspect provider availability with `outrank-cli products integrations providers`.
340
+ 3. For webhook, ask only for `endpoint` and `access_token`. Outrank sends `Authorization: Bearer <access_token>` on each request. Do not ask for an HMAC secret because the current webhook integration does not implement HMAC signing.
341
+ 4. For WordPress Plugin, do not ask the human to invent or provide an `api_key`. Start with `outrank-cli products integrations prepare wordpress-plugin <productId>` to generate the integration token, then tell the human to paste that token into the installed plugin and save it in WordPress.
342
+ 5. For WordPress.com, start with `outrank-cli products integrations connect wordpress-com <productId> --json-file wordpress-com-connect.json`, tell the human to open the returned `connect_url`, then poll with `outrank-cli products integrations poll wordpress-com <productId> --attempt-id <attempt-id>` until the handoff completes.
343
+ 6. For Notion, start with `outrank-cli products integrations connect notion <productId>`, tell the human to open the returned `connect_url`, then poll with `outrank-cli products integrations poll notion <productId> --attempt-id <attempt-id>` until the handoff completes.
344
+ 7. After Notion OAuth completes, list databases with `outrank-cli products integrations notion databases <productId> <integrationId>`, inspect one schema with `... notion schema <productId> <integrationId> <databaseId>`, then update the saved integration row with `name`, `database_id`, and `fields`.
345
+ 8. For Shopify, start with `outrank-cli products integrations validate shopify --json '{"access_token":"shpat_xxx"}'`. The response returns `shop_name` and the available blogs, which the agent should use to build the create payload instead of guessing them or asking the human for the store name first.
346
+ 9. For Webflow, start with `outrank-cli products integrations validate webflow --json-file webflow-sites.json`, then use `webflow sites`, `webflow collections`, `webflow fields`, and `webflow items` to build the exact create or update payload for the chosen CMS collection.
347
+ 10. For Framer, use only the newer Server API flow. Start with `outrank-cli products integrations validate framer --json-file framer-validate.json`, then use `framer collections` and `framer fields` when the human wants to publish into an existing editable collection. Do not use or mention the older plugin-based setup.
348
+ 11. For Next.js Blog, do not ask the human for credentials first. Run `outrank-cli products integrations create <productId> --json '{"provider":"nextjs-blog"}'` and treat the returned `data.secrets.api_key` as a one-time secret that must be saved immediately.
349
+ 12. For Wix, use a direct credential flow with `site_id`, `api_key`, and `publish_status`. Validate first, then create or update directly; there is no OAuth or prepare step.
350
+ 13. Validate webhook, Ghost, Shopify, Webflow, Wix, Framer, or WordPress Plugin credentials before saving with `outrank-cli products integrations validate <provider> --json-file integration.json`.
351
+ 14. Create a webhook, Ghost, Shopify, Webflow, Wix, Framer, WordPress Plugin, or Next.js Blog integration with `outrank-cli products integrations create <productId> --json-file integration-create.json`.
352
+ 14. Inspect one row with `outrank-cli products integrations get <productId> <integrationId>`.
353
+ 15. Update a saved webhook, Ghost, Shopify, Webflow, Wix, WordPress Plugin, or Notion integration with `outrank-cli products integrations update <productId> <integrationId> --json-file integration-update.json`.
354
+ 16. Test a saved webhook, Ghost, Shopify, Webflow, Wix, Framer, WordPress Plugin, or Notion integration with `outrank-cli products integrations test <productId> <integrationId>`.
355
+ 17. If the integration is stale or wrong, remove it with `outrank-cli products integrations delete <productId> <integrationId>`.
356
+
357
+ Important behavior:
358
+
359
+ - V2 products are intended to keep exactly one publishing integration. If `list` returns multiple rows, treat the extras as likely legacy V1 leftovers and inspect before deleting.
360
+ - `create` currently supports `webhook`, `ghost`, `shopify`, `webflow`, `wix`, `wordpress-plugin`, and `nextjs-blog` first. Other providers may appear in `providers`, but if their create/update/test capabilities are absent there, do not invent those writes.
361
+ - `wordpress-plugin` should usually start with `prepare`, not with a question asking the human for an integration token. The prepare response includes the generated token plus suggested validate/create payloads.
362
+ - `wordpress-com` should use `connect` plus `poll`, not `create`. The connect payload mirrors the dashboard flow with `name` and `publish_status`, then the human completes browser OAuth.
363
+ - `notion` should use `connect` plus `poll`, not `create`. OAuth only stores the access token row. The agent still needs to list databases, inspect schema, and PATCH the saved row with `name`, `database_id`, and `fields` before the integration is publish-ready.
364
+ - `shopify` should start with validation. The agent should not ask the human to guess `shop_name` or `blog_id` before `validate` returns them.
365
+ - `webflow` should use validation plus discovery before create. The agent should not guess `site_id`, `collection_id`, or Webflow field mappings.
366
+ - `framer` should use the newer Server API flow only. The agent should not mention the older Framer plugin flow. Validate the project URL and Server API key first, then use `framer collections` and `framer fields` only when the human chooses an existing editable collection. There is no separate plugin-config step in the agent surface.
367
+ - `wix` uses direct validate/create/update/test with a site UUID plus API key. The agent should validate `site_id` and `api_key` before create or after credentials change.
368
+ - `nextjs-blog` create returns a one-time API key. The agent must surface and preserve it immediately because later reads only show that a hash exists, not the plain secret.
369
+ - deleting the current active integration clears the product integration fields automatically
370
+ - `validate` tests unsaved credentials without persisting a row, while `test` re-checks a saved integration row
371
+ - the current CLI surface still does not expose create, update, or test for some providers, and only WordPress.com and Notion currently expose an OAuth connect flow; if the human asks for unsupported operations, say they are not shipped in this CLI yet instead of inventing commands
372
+
373
+ ## Keyword workflow
228
374
 
229
375
  Keyword plans now have two buckets:
230
376
 
@@ -313,14 +459,15 @@ Inspect before mutating:
313
459
 
314
460
  Important behavior to remember:
315
461
 
316
- - article metadata and history mirror the current app behavior, including soft-delete instead of hard-delete
317
- - article bodies are markdown in the backend; `--format html` is rendered output, not the source of truth
318
- - featured image is separate from the markdown body and can be updated either through the normal article update payload via `image_url` or by local-file upload with `articles upload-featured-image`
319
- - in-content images can be uploaded from local files with `articles upload-image`; the command returns a hosted URL and alt text for markdown insertion or replacement
320
- - per-article instructions live on the linked scheduled keyword, so they are only editable while that planner relationship still exists and is writable
321
- - slug is readable for reference but read-only in the agent API
322
- - `articles generate <keywordId>` mirrors the current create-and-publish flow for a scheduled keyword
323
- - `articles precreate <keywordId>` mirrors the current pre-generation flow; after calling it, inspect the keyword state until it moves from `generating_article` to `pregenerated` or back to `scheduled`
462
+ - article metadata and history mirror the current app behavior, including soft-delete instead of hard-delete
463
+ - article bodies are markdown in the backend; `--format html` is rendered output, not the source of truth
464
+ - featured image is separate from the markdown body and can be updated either through the normal article update payload via `image_url` or by local-file upload with `articles upload-featured-image`
465
+ - in-content images can be uploaded from local files with `articles upload-image`; the command returns a hosted URL and alt text for markdown insertion or replacement
466
+ - per-article instructions live on the linked scheduled keyword, so they are only editable while that planner relationship still exists and is writable
467
+ - `articles update --json '{"status":"published"}'` attempts a real publish through the product's active integration for eligible attached articles; if the remote publish fails, inspect the returned error and the article's `publish_error`
468
+ - slug is readable for reference but read-only in the agent API
469
+ - `articles generate <keywordId>` mirrors the current create-and-publish flow for a scheduled keyword
470
+ - `articles precreate <keywordId>` mirrors the current pre-generation flow; after calling it, inspect the keyword state until it moves from `generating_article` to `pregenerated` or back to `scheduled`
324
471
  - `articles retry-publish <articleId>` only works for generated articles with a publish error
325
472
  - `articles bulk-replace` is preview-first; review the returned excerpts, then rerun with `"confirm": true` in the JSON payload to write changes
326
473
 
@@ -342,7 +489,7 @@ Do not ask for billing approval until you have already clarified the intended pr
342
489
  - For `403` or `409`, the guidance usually tells you whether to inspect state, pause another product, or ask the human to approve a billing step.
343
490
  - For `402`, stop retrying and ask the human to fix billing.
344
491
 
345
- ## Current limitation
346
-
347
- The implementation plan is broader than the current live API. Keywords and core article flows are now exposed in `outrank-cli`, but integrations, backlinks, and onboarding flows are still incomplete. If the user asks for something not present in `outrank-cli --help`, say that exact command surface is not shipped yet and do not invent unsupported commands.
492
+ ## Current limitation
493
+
494
+ The implementation plan is broader than the current live API. Keywords, core article flows, linking, backlink exchange management, and the current integration-management flows are now exposed in `outrank-cli`, including direct setup for webhook, Ghost, Shopify, Webflow, Wix, Framer, WordPress Plugin, and Next.js Blog, plus OAuth flows for WordPress.com and Notion. Purchasing or changing backlink add-ons and some onboarding flows still require the dashboard. If the user asks for something not present in `outrank-cli --help`, say that exact command surface is not shipped yet and do not invent unsupported commands.
348
495
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "outrank-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Agent-first CLI for the Outrank agent API",
5
5
  "type": "module",
6
6
  "files": [