outrank-cli 0.1.1 → 0.3.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/README.md +218 -25
- package/SKILL.md +439 -282
- package/package.json +1 -1
- package/src/commands/keywords.js +17 -24
- package/src/commands/products.js +711 -2
- package/src/index.js +5 -1
package/README.md
CHANGED
|
@@ -4,20 +4,20 @@ Agent-first CLI for the Outrank agent API.
|
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
Requires Node.js 18+.
|
|
7
|
+
Requires Node.js 18+. Works on macOS, Linux, and Windows.
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```bash
|
|
10
10
|
npm install -g outrank-cli
|
|
11
11
|
outrank-cli --help
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Or run it from a clone without installing globally:
|
|
15
15
|
|
|
16
|
-
```
|
|
16
|
+
```bash
|
|
17
17
|
git clone https://github.com/Outrank-SAS/outrank-cli.git
|
|
18
18
|
cd outrank-cli
|
|
19
19
|
npm install
|
|
20
|
-
node
|
|
20
|
+
node ./src/index.js --help
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Get an API key
|
|
@@ -35,11 +35,20 @@ This repo currently targets the agent endpoints that already exist in `outrank`:
|
|
|
35
35
|
|
|
36
36
|
- `auth whoami`
|
|
37
37
|
- `products list|get|create|update|pause|resume`
|
|
38
|
+
- `products integrations providers|prepare|connect|poll|validate|list|create|get|update|test|delete`
|
|
39
|
+
- `products integrations notion databases|schema`
|
|
40
|
+
- `products integrations framer collections|fields`
|
|
41
|
+
- `products integrations webflow sites|collections|fields|items`
|
|
38
42
|
- `products output-settings get|update` for product article settings
|
|
39
43
|
- `products target-audiences list|replace`
|
|
40
44
|
- `products competitors list|replace`
|
|
41
45
|
- `products gsc status|connect|poll|reconnect|disconnect|accounts|properties|set-property|performance|search-analytics|inspect-url|cannibalization`
|
|
42
|
-
- `
|
|
46
|
+
- `products linking sources get|update`
|
|
47
|
+
- `products linking detect`
|
|
48
|
+
- `products linking target-config get|update`
|
|
49
|
+
- `products linking targets list|add-manual|upsert|clear-customizations|delete`
|
|
50
|
+
- `products backlinks get|update|credits|earned|unverified|check-removal|reverify|subscription|subscribe-quote`
|
|
51
|
+
- `keywords list|get|export|generation-status|add|update|suggest|generate|bulk-reschedule|delete|bulk-delete`
|
|
43
52
|
- `articles list|get|get-content|update|update-content|replace|bulk-replace|upload-image|upload-featured-image|retry-publish|delete|precreate|generate`
|
|
44
53
|
- `subscription status`
|
|
45
54
|
- `usage stats`
|
|
@@ -58,42 +67,45 @@ The CLI reads credentials in this order of precedence:
|
|
|
58
67
|
|
|
59
68
|
Pick one. For interactive use on your own machine, `auth login` is simplest. For CI / ephemeral environments, prefer the env var.
|
|
60
69
|
|
|
61
|
-
```
|
|
70
|
+
```bash
|
|
62
71
|
# One-time persistent setup
|
|
63
72
|
outrank-cli auth login outr_live_xxx
|
|
64
73
|
outrank-cli auth status # confirms the key is stored
|
|
65
74
|
outrank-cli auth whoami # round-trips it against the server
|
|
66
75
|
|
|
67
76
|
# OR per-shell env var (no config file written)
|
|
68
|
-
|
|
77
|
+
export OUTRANK_API_KEY="outr_live_xxx" # macOS / Linux (bash, zsh)
|
|
69
78
|
outrank-cli auth whoami
|
|
70
79
|
|
|
71
80
|
# OR per-call (useful in scripts)
|
|
72
81
|
outrank-cli auth whoami --api-key outr_live_xxx
|
|
73
82
|
```
|
|
74
83
|
|
|
84
|
+
On Windows PowerShell, set the env var with `$env:OUTRANK_API_KEY = "outr_live_xxx"`. On Windows `cmd.exe`, use `set OUTRANK_API_KEY=outr_live_xxx`.
|
|
85
|
+
|
|
75
86
|
Sign out / rotate:
|
|
76
87
|
|
|
77
|
-
```
|
|
88
|
+
```bash
|
|
78
89
|
outrank-cli auth logout # clears apiKey from ~/.outrank/config.json
|
|
79
90
|
```
|
|
80
91
|
|
|
81
92
|
## Examples
|
|
82
93
|
|
|
83
|
-
```
|
|
94
|
+
```bash
|
|
84
95
|
outrank-cli auth login outr_live_xxx
|
|
85
96
|
outrank-cli auth status
|
|
86
97
|
outrank-cli auth whoami
|
|
87
98
|
outrank-cli products list --limit 20
|
|
88
99
|
outrank-cli keywords list --product 00000000-0000-0000-0000-000000000000 --scope all
|
|
100
|
+
outrank-cli keywords list --product 00000000-0000-0000-0000-000000000000 --scope scheduled --q "best seo tools"
|
|
89
101
|
outrank-cli keywords generation-status --product 00000000-0000-0000-0000-000000000000
|
|
90
102
|
outrank-cli articles list --product 00000000-0000-0000-0000-000000000000 --status published
|
|
91
103
|
outrank-cli articles get 00000000-0000-0000-0000-000000000000
|
|
92
104
|
outrank-cli articles get-content 00000000-0000-0000-0000-000000000000 --format html
|
|
93
105
|
outrank-cli articles update 00000000-0000-0000-0000-000000000000 --json '{"title":"New title"}'
|
|
94
106
|
outrank-cli articles update 00000000-0000-0000-0000-000000000000 --json '{"image_url":"https://example.com/featured.jpg"}'
|
|
95
|
-
outrank-cli articles upload-image --file
|
|
96
|
-
outrank-cli articles upload-featured-image 00000000-0000-0000-0000-000000000000 --file
|
|
107
|
+
outrank-cli articles upload-image --file ./diagram.png --article 00000000-0000-0000-0000-000000000000
|
|
108
|
+
outrank-cli articles upload-featured-image 00000000-0000-0000-0000-000000000000 --file ./hero.jpg
|
|
97
109
|
outrank-cli articles replace 00000000-0000-0000-0000-000000000000 --json '{"find":"Old brand","replace_with":"New brand","preview_only":true}'
|
|
98
110
|
outrank-cli articles retry-publish 00000000-0000-0000-0000-000000000000
|
|
99
111
|
outrank-cli articles precreate 00000000-0000-0000-0000-000000000000
|
|
@@ -101,17 +113,55 @@ outrank-cli articles generate 00000000-0000-0000-0000-000000000000
|
|
|
101
113
|
outrank-cli subscription status
|
|
102
114
|
outrank-cli usage stats
|
|
103
115
|
outrank-cli products get 00000000-0000-0000-0000-000000000000
|
|
116
|
+
outrank-cli products integrations providers
|
|
117
|
+
outrank-cli products integrations prepare wordpress-plugin 00000000-0000-0000-0000-000000000000
|
|
118
|
+
outrank-cli products integrations connect wordpress-com 00000000-0000-0000-0000-000000000000 --json '{"name":"Main WordPress.com","publish_status":"publish"}'
|
|
119
|
+
outrank-cli products integrations connect notion 00000000-0000-0000-0000-000000000000
|
|
120
|
+
outrank-cli products integrations poll wordpress-com 00000000-0000-0000-0000-000000000000 --attempt-id <attempt-id>
|
|
121
|
+
outrank-cli products integrations poll notion 00000000-0000-0000-0000-000000000000 --attempt-id <attempt-id>
|
|
122
|
+
outrank-cli products integrations notion databases 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111
|
|
123
|
+
outrank-cli products integrations notion schema 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111 aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
|
|
124
|
+
outrank-cli products integrations framer collections --json '{"project_url":"https://framer.com/projects/your-project","server_api_key":"framer_server_key"}'
|
|
125
|
+
outrank-cli products integrations framer fields --json '{"project_url":"https://framer.com/projects/your-project","server_api_key":"framer_server_key","collection_id":"collection_id"}'
|
|
126
|
+
outrank-cli products integrations webflow sites --json-file webflow-sites.json
|
|
127
|
+
outrank-cli products integrations webflow collections --json '{"api_token":"wf_token","site_id":"site_id"}'
|
|
128
|
+
outrank-cli products integrations webflow fields --json '{"api_token":"wf_token","collection_id":"collection_id"}'
|
|
129
|
+
outrank-cli products integrations webflow items --json '{"api_token":"wf_token","collection_id":"collection_id"}'
|
|
130
|
+
outrank-cli products integrations validate webhook --json '{"endpoint":"https://api.example.com/webhook","access_token":"secret"}'
|
|
131
|
+
outrank-cli products integrations validate framer --json '{"project_url":"https://framer.com/projects/your-project","server_api_key":"framer_server_key"}'
|
|
132
|
+
outrank-cli products integrations validate shopify --json '{"access_token":"shpat_xxx"}'
|
|
133
|
+
outrank-cli products integrations validate webflow --json '{"api_token":"wf_token"}'
|
|
134
|
+
outrank-cli products integrations validate wix --json '{"site_id":"00000000-0000-0000-0000-000000000000","api_key":"wix_api_key"}'
|
|
135
|
+
outrank-cli products integrations validate wordpress-plugin --json '{"domain":"https://example.com","api_key":"secret-token"}'
|
|
136
|
+
outrank-cli products integrations validate ghost --json '{"url":"https://example.ghost.io","api_key":"abcdef1234567890:abcdef1234567890abcdef1234567890"}'
|
|
137
|
+
outrank-cli products integrations list 00000000-0000-0000-0000-000000000000
|
|
138
|
+
outrank-cli products integrations create 00000000-0000-0000-0000-000000000000 --json '{"provider":"webhook","name":"Main Webhook","endpoint":"https://api.example.com/webhook","access_token":"secret"}'
|
|
139
|
+
outrank-cli products integrations create 00000000-0000-0000-0000-000000000000 --json '{"provider":"framer","name":"Main Framer","project_url":"https://framer.com/projects/your-project","server_api_key":"framer_server_key","author_name":"Outrank AI","publish_mode":"deploy","collection_setup_mode":"create"}'
|
|
140
|
+
outrank-cli products integrations create 00000000-0000-0000-0000-000000000000 --json '{"provider":"shopify","name":"Main Shopify","access_token":"shpat_xxx","blog_id":"123456789","author_name":"Outrank","publish_status":"publish"}'
|
|
141
|
+
outrank-cli products integrations create 00000000-0000-0000-0000-000000000000 --json '{"provider":"wix","name":"Main Wix","site_id":"00000000-0000-0000-0000-000000000000","api_key":"wix_api_key","publish_status":"publish"}'
|
|
142
|
+
outrank-cli products integrations create 00000000-0000-0000-0000-000000000000 --json-file webflow-create.json
|
|
143
|
+
outrank-cli products integrations create 00000000-0000-0000-0000-000000000000 --json '{"provider":"wordpress-plugin","domain":"https://example.com","api_key":"secret-token"}'
|
|
144
|
+
outrank-cli products integrations create 00000000-0000-0000-0000-000000000000 --json '{"provider":"ghost","name":"Main Ghost","url":"https://example.ghost.io","api_key":"abcdef1234567890:abcdef1234567890abcdef1234567890","publish_status":"draft"}'
|
|
145
|
+
outrank-cli products integrations create 00000000-0000-0000-0000-000000000000 --json '{"provider":"nextjs-blog"}'
|
|
146
|
+
outrank-cli products integrations get 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111
|
|
147
|
+
outrank-cli products integrations update 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111 --json '{"endpoint":"https://api.example.com/webhook-v2"}'
|
|
148
|
+
outrank-cli products integrations update 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111 --json '{"publish_status":"draft"}'
|
|
149
|
+
outrank-cli products integrations update 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111 --json-file webflow-update.json
|
|
150
|
+
outrank-cli products integrations update 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111 --json '{"domain":"https://example.com/blog","api_key":"new-secret-token"}'
|
|
151
|
+
outrank-cli products integrations update 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111 --json '{"publish_status":"published"}'
|
|
152
|
+
outrank-cli products integrations test 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111
|
|
104
153
|
outrank-cli keywords suggest --product 00000000-0000-0000-0000-000000000000 --theme "email marketing"
|
|
105
154
|
outrank-cli keywords generate --product 00000000-0000-0000-0000-000000000000 --count 10 --source both
|
|
106
|
-
outrank-cli keywords add --product 00000000-0000-0000-0000-000000000000 --json-file
|
|
155
|
+
outrank-cli keywords add --product 00000000-0000-0000-0000-000000000000 --json-file ./keywords.json
|
|
156
|
+
outrank-cli keywords update 00000000-0000-0000-0000-000000000000 --json '{"instructions":"Write for beginners and include a step-by-step setup section"}'
|
|
107
157
|
outrank-cli keywords export --product 00000000-0000-0000-0000-000000000000
|
|
108
|
-
outrank-cli products create --json-file
|
|
109
|
-
# products create
|
|
158
|
+
outrank-cli products create --json-file ./product.json
|
|
159
|
+
# products create auto-queues the initial ~30-day keyword plan; poll with keywords generation-status / keywords list
|
|
110
160
|
outrank-cli billing portal-url
|
|
111
161
|
outrank-cli products update 00000000-0000-0000-0000-000000000000 --json '{"daily_article_count":2}'
|
|
112
|
-
outrank-cli products output-settings update 00000000-0000-0000-0000-000000000000 --json-file
|
|
113
|
-
outrank-cli products target-audiences replace 00000000-0000-0000-0000-000000000000 --json-file
|
|
114
|
-
outrank-cli products competitors replace 00000000-0000-0000-0000-000000000000 --json-file
|
|
162
|
+
outrank-cli products output-settings update 00000000-0000-0000-0000-000000000000 --json-file ./output-settings.json
|
|
163
|
+
outrank-cli products target-audiences replace 00000000-0000-0000-0000-000000000000 --json-file ./target-audiences.json
|
|
164
|
+
outrank-cli products competitors replace 00000000-0000-0000-0000-000000000000 --json-file ./competitors.json
|
|
115
165
|
outrank-cli products gsc status 00000000-0000-0000-0000-000000000000
|
|
116
166
|
outrank-cli products gsc connect 00000000-0000-0000-0000-000000000000
|
|
117
167
|
outrank-cli products gsc poll 00000000-0000-0000-0000-000000000000 --attempt-id <attempt-id>
|
|
@@ -122,7 +172,25 @@ outrank-cli products gsc performance 00000000-0000-0000-0000-000000000000 --mont
|
|
|
122
172
|
outrank-cli products gsc search-analytics 00000000-0000-0000-0000-000000000000 --dimensions query,page --limit 50 --query "brand"
|
|
123
173
|
outrank-cli products gsc inspect-url 00000000-0000-0000-0000-000000000000 --url https://example.com/blog/post
|
|
124
174
|
outrank-cli products gsc cannibalization 00000000-0000-0000-0000-000000000000
|
|
125
|
-
outrank-cli
|
|
175
|
+
outrank-cli products linking sources get 00000000-0000-0000-0000-000000000000
|
|
176
|
+
outrank-cli products linking sources update 00000000-0000-0000-0000-000000000000 --json-file ./linking-sources.json
|
|
177
|
+
outrank-cli products linking detect 00000000-0000-0000-0000-000000000000
|
|
178
|
+
outrank-cli products linking target-config update 00000000-0000-0000-0000-000000000000 --json '{"only_prioritized":true}'
|
|
179
|
+
outrank-cli products linking targets list 00000000-0000-0000-0000-000000000000
|
|
180
|
+
outrank-cli products linking targets add-manual 00000000-0000-0000-0000-000000000000 --json-file ./manual-target.json
|
|
181
|
+
outrank-cli products linking targets upsert 00000000-0000-0000-0000-000000000000 --json-file ./target-upsert.json
|
|
182
|
+
outrank-cli products linking targets clear-customizations 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111
|
|
183
|
+
outrank-cli products linking targets delete 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111
|
|
184
|
+
outrank-cli products backlinks get 00000000-0000-0000-0000-000000000000
|
|
185
|
+
outrank-cli products backlinks update 00000000-0000-0000-0000-000000000000 --json '{"enabled":true,"min_domain_rating":10}'
|
|
186
|
+
outrank-cli products backlinks credits 00000000-0000-0000-0000-000000000000
|
|
187
|
+
outrank-cli products backlinks earned 00000000-0000-0000-0000-000000000000 --limit 10 --include-article
|
|
188
|
+
outrank-cli products backlinks unverified 00000000-0000-0000-0000-000000000000 --limit 10
|
|
189
|
+
outrank-cli products backlinks check-removal 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111
|
|
190
|
+
outrank-cli products backlinks reverify 00000000-0000-0000-0000-000000000000 11111111-1111-1111-1111-111111111111
|
|
191
|
+
outrank-cli products backlinks subscription 00000000-0000-0000-0000-000000000000
|
|
192
|
+
outrank-cli products backlinks subscribe-quote 00000000-0000-0000-0000-000000000000 --plan premium
|
|
193
|
+
outrank-cli keywords update 00000000-0000-0000-0000-000000000000 --json '{"scheduled_for":"2026-05-20"}'
|
|
126
194
|
outrank-cli billing purchase-products quote --additional-products 2
|
|
127
195
|
```
|
|
128
196
|
|
|
@@ -140,16 +208,88 @@ outrank-cli billing purchase-products quote --additional-products 2
|
|
|
140
208
|
- Analyze overlapping-query cannibalization with `outrank-cli products gsc cannibalization <product-id>`.
|
|
141
209
|
- Use `reconnect` when the token is expired and `disconnect` to remove the product connection.
|
|
142
210
|
|
|
211
|
+
## Linking workflow
|
|
212
|
+
|
|
213
|
+
- Inspect current source selection with `outrank-cli products linking sources get <product-id>`.
|
|
214
|
+
- Update the primary or additional sources with `outrank-cli products linking sources update <product-id> --json-file linking-sources.json`.
|
|
215
|
+
- Re-run discovery with `outrank-cli products linking detect <product-id>`.
|
|
216
|
+
- List saved targets with `outrank-cli products linking targets list <product-id>`.
|
|
217
|
+
- Add a manual on-domain URL with `outrank-cli products linking targets add-manual <product-id> --json-file manual-target.json`.
|
|
218
|
+
- Create or update a saved target with `outrank-cli products linking targets upsert <product-id> --json-file target-upsert.json`.
|
|
219
|
+
- Inspect or update product-wide behavior with `outrank-cli products linking target-config get|update <product-id>`.
|
|
220
|
+
- Clear custom anchor text with `outrank-cli products linking targets clear-customizations <product-id> <target-id>`.
|
|
221
|
+
- Remove a stale target with `outrank-cli products linking targets delete <product-id> <target-id>`.
|
|
222
|
+
|
|
223
|
+
Example payloads:
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"source_type": "sitemap",
|
|
228
|
+
"source_url": "https://example.com/sitemap.xml",
|
|
229
|
+
"additional_linking_sources": [
|
|
230
|
+
{
|
|
231
|
+
"id": "docs-root",
|
|
232
|
+
"source_type": "root_url",
|
|
233
|
+
"source_url": "https://docs.example.com/blog",
|
|
234
|
+
"purpose": "linking"
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"url": "https://example.com/blog/best-page",
|
|
243
|
+
"title": "Best Page",
|
|
244
|
+
"is_prioritized": true,
|
|
245
|
+
"anchor_texts": [
|
|
246
|
+
"best page",
|
|
247
|
+
"example guide"
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Backlinks workflow
|
|
253
|
+
|
|
254
|
+
- Inspect current backlink settings with `outrank-cli products backlinks get <product-id>`.
|
|
255
|
+
- Update backlink settings with `outrank-cli products backlinks update <product-id> --json-file backlinks.json`.
|
|
256
|
+
- Inspect current credits with `outrank-cli products backlinks credits <product-id>`.
|
|
257
|
+
- Review earned backlinks with `outrank-cli products backlinks earned <product-id> --limit 20`.
|
|
258
|
+
- Add `--include-article` or `--include-summary` when the human needs article context in the earned list.
|
|
259
|
+
- Review the unverified queue with `outrank-cli products backlinks unverified <product-id> --limit 20`.
|
|
260
|
+
- Trigger a live removal check with `outrank-cli products backlinks check-removal <product-id> <backlink-id>`.
|
|
261
|
+
- Trigger manual reverification with `outrank-cli products backlinks reverify <product-id> <backlink-id>`.
|
|
262
|
+
- Inspect the current backlink subscription state with `outrank-cli products backlinks subscription <product-id>`.
|
|
263
|
+
- Quote a dashboard-equivalent subscription plan with `outrank-cli products backlinks subscribe-quote <product-id> --plan premium`.
|
|
264
|
+
|
|
265
|
+
Example payload:
|
|
266
|
+
|
|
267
|
+
```json
|
|
268
|
+
{
|
|
269
|
+
"enabled": true,
|
|
270
|
+
"min_domain_rating": 10
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
143
274
|
## Keyword mutation rules
|
|
144
275
|
|
|
145
276
|
- Run `outrank-cli keywords generation-status --product <product-id>` before keyword writes when you are not sure the product is writable.
|
|
146
|
-
- `keywords generate`
|
|
277
|
+
- `keywords generate` mirrors the dashboard Generate Keywords flow. Ask the human how many keywords to generate before calling it if they did not specify a count.
|
|
147
278
|
- The allowed generation count is 5-30, but the real upper bound depends on free scheduler slots. Check `keywords generation-status` first when you need the current capacity.
|
|
148
279
|
- Stored keywords are read-only inventory. They can be promoted into the plan with `keywords add`, but they cannot be deleted directly.
|
|
149
280
|
- Scheduled keywords with created or pre-created articles are read-only.
|
|
150
281
|
- Keywords in `generating_article` are read-only until generation finishes.
|
|
151
282
|
- Past keywords are read-only except past `scheduled` or `disabled` keywords without an article, which can still be rescheduled.
|
|
152
283
|
- If the main subscription is `past_due`, keyword mutations are blocked and reads still work.
|
|
284
|
+
- `keywords list` defaults to planner-first ordering for scheduled results, so page 1 prioritizes upcoming scheduled items before past ones.
|
|
285
|
+
- Use `keywords list --product <product-id> --scope scheduled --q "<keyword>"` when looking for one planner keyword by text. If `next_offset` is not `null`, keep paging before claiming the keyword is absent.
|
|
286
|
+
- Keyword records return top-level `article_type`, `article_subtype`, `expected_length`, and label fields. Read those from the keyword itself when answering article-type or expected-length questions; do not look in product output-settings for per-keyword length.
|
|
287
|
+
- Use `keywords update <keyword-id> --json '{"instructions":"..."}'` to add or change per-keyword instructions after creation. This matches the dashboard flow, which creates the keyword first and updates the brief afterward.
|
|
288
|
+
- Use `keywords update <keyword-id> --json '{"quality_questions":[{"id":"...","question":"...","answer":"..."}]}'` to answer or replace the keyword's quality questions through the same PATCH route.
|
|
289
|
+
- Use `keywords update <keyword-id> --json '{"scheduled_for":"YYYY-MM-DD","instructions":"..."}'` when you need to change the date and brief in one PATCH request.
|
|
290
|
+
- Use `keywords update <keyword-id> --json '{"scheduled_for":"YYYY-MM-DD"}'` for date-only rescheduling too; there is no separate reschedule command.
|
|
291
|
+
- `keywords get <keyword-id>` returns `article_type_options`, which lists the valid dropdown values for `article_type`, `article_subtype`, and `expected_length`.
|
|
292
|
+
- Use `keywords update --json '{"article_type":"guide","article_subtype":"explainer","expected_length":"long"}'` to mirror the scheduler card's "Article Type Settings" modal. The API rejects values outside the returned option lists.
|
|
153
293
|
|
|
154
294
|
## Article behavior notes
|
|
155
295
|
|
|
@@ -157,22 +297,75 @@ outrank-cli billing purchase-products quote --additional-products 2
|
|
|
157
297
|
- Featured image can be updated either by hosted URL through `articles update --json '{"image_url":"..."}'` or by local-file upload through `articles upload-featured-image`.
|
|
158
298
|
- In-content images can be uploaded from a local file with `articles upload-image`; the command returns the hosted URL plus generated alt text so the agent can insert or replace the markdown image reference.
|
|
159
299
|
- Per-article instructions are stored on the linked scheduled keyword, so `articles update --json '{"instructions":"..."}'` only works for articles that still have a linked planner keyword.
|
|
300
|
+
- `articles get <article-id>` returns `article_type_options`, which lists the valid dropdown values for `article_type`, `article_subtype`, and `expected_length`.
|
|
301
|
+
- Article records with a linked scheduled keyword also return top-level `article_type`, `article_subtype`, `expected_length`, and label fields for direct reads.
|
|
302
|
+
- Use `articles update --json '{"article_type":"guide","article_subtype":"comparison","expected_length":"long"}'` to mirror the dashboard's "Article Type Settings" modal. The API rejects values outside the returned option lists.
|
|
303
|
+
- `articles update --json '{"status":"published"}'` attempts a real publish through the product's active integration for eligible attached articles; it is not just a local status flip.
|
|
160
304
|
- Slug is returned for read-only reference but cannot be changed through the agent API.
|
|
161
305
|
- `articles generate <keyword-id>` is only valid for scheduled keywords due today; it mirrors the dashboard's create-and-publish action.
|
|
162
306
|
- `articles precreate <keyword-id>` is only valid for eligible future scheduled keywords, is unavailable on trial subscriptions, and should be polled through the keyword state afterward.
|
|
163
307
|
- `articles update --json '{"status":"published"}'` cannot be used to manually publish a future scheduled article before its due date.
|
|
164
308
|
- `articles retry-publish <article-id>` is only valid for generated articles with a publish error.
|
|
165
309
|
|
|
310
|
+
## Linking behavior notes
|
|
311
|
+
|
|
312
|
+
- Linking writes are blocked unless the product has an active backlink subscription.
|
|
313
|
+
- `products linking sources update` accepts `source_type` values `sitemap`, `root_url`, or `integration`.
|
|
314
|
+
- When `source_type` is `sitemap` or `root_url`, `source_url` is required.
|
|
315
|
+
- `additional_linking_sources` is a full replacement list. Each item needs `id`, `source_type`, `source_url`, and `purpose`.
|
|
316
|
+
- `products linking detect` refreshes discovered article URLs from the saved primary source.
|
|
317
|
+
- `products linking targets add-manual` and `upsert` only accept URLs on the product's own domain.
|
|
318
|
+
- `products linking target-config update --json '{"only_prioritized":true}'` requires enough prioritized targets; if not, the API returns a conflict with guidance.
|
|
319
|
+
|
|
320
|
+
## Backlink behavior notes
|
|
321
|
+
|
|
322
|
+
- Use `products backlinks update`, not `products update`, for backlink exchange settings.
|
|
323
|
+
- Backlink writes are blocked when the product is hidden for inappropriate content, but reads still work.
|
|
324
|
+
- Setting `min_domain_rating` requires an active backlink subscription.
|
|
325
|
+
- `products backlinks subscribe-quote` is read-only. Purchasing or changing the add-on still requires the dashboard checkout flow.
|
|
326
|
+
- `products backlinks earned` uses cursor pagination through `data.next_cursor`.
|
|
327
|
+
- `products backlinks unverified` is the deduped article-level manual-review stream.
|
|
328
|
+
|
|
329
|
+
## Integrations workflow
|
|
330
|
+
|
|
331
|
+
- Inspect connected publishing integrations with `outrank-cli products integrations list <product-id>`.
|
|
332
|
+
- Inspect provider availability with `outrank-cli products integrations providers`.
|
|
333
|
+
- Webhook uses `endpoint` plus `access_token`. Outrank sends `Authorization: Bearer <access_token>` on each request. HMAC signing is not implemented in the current webhook integration.
|
|
334
|
+
- WordPress Plugin uses `domain` plus `api_key`. The Outrank plugin must already be installed and configured on the target site.
|
|
335
|
+
- Start WordPress Plugin setup with `outrank-cli products integrations prepare wordpress-plugin <product-id>`. That mirrors the dashboard flow by generating the integration token first, before validate/create.
|
|
336
|
+
- WordPress.com uses OAuth instead of direct credentials. Start with `outrank-cli products integrations connect wordpress-com <product-id> --json-file wordpress-com-connect.json`, have the human open the returned `connect_url`, then poll with `outrank-cli products integrations poll wordpress-com <product-id> --attempt-id <attempt-id>` until the handoff completes.
|
|
337
|
+
- Notion uses OAuth plus a second configuration step. Start with `outrank-cli products integrations connect notion <product-id>`, have the human open the returned `connect_url`, then poll with `outrank-cli products integrations poll notion <product-id> --attempt-id <attempt-id>`. After OAuth completes, use `outrank-cli products integrations notion databases <product-id> <integration-id>` and `... notion schema <product-id> <integration-id> <database-id>` before `update` to save `name`, `database_id`, and `fields`.
|
|
338
|
+
- Framer uses the newer Server API flow, not the older plugin flow. Start with `outrank-cli products integrations validate framer --json '{"project_url":"https://framer.com/projects/your-project","server_api_key":"framer_server_key"}'`. If you want to publish into an existing user-owned collection, then use `framer collections` and `framer fields` before `create`; otherwise use `collection_setup_mode: "create"` and let Outrank create the collection automatically.
|
|
339
|
+
- Shopify uses a direct app access token. Start with `outrank-cli products integrations validate shopify --json '{"access_token":"shpat_xxx"}'`; the response returns `shop_name` and the available blogs you can use in the create payload, so the human does not need to provide the store name separately.
|
|
340
|
+
- Webflow uses a direct API token plus pre-save discovery. 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.
|
|
341
|
+
- Wix is a direct credential flow using `site_id`, `api_key`, and `publish_status`. Validate first, then create or update directly; there is no OAuth or prepare step.
|
|
342
|
+
- Next.js Blog is a one-step create flow. Run `outrank-cli products integrations create <product-id> --json '{"provider":"nextjs-blog"}'` and store the returned `data.secrets.api_key` immediately because it is not readable later.
|
|
343
|
+
- Validate unsaved webhook, Ghost, Framer, Shopify, Webflow, Wix, or WordPress Plugin credentials with `outrank-cli products integrations validate <provider> --json-file integration.json`.
|
|
344
|
+
- Create a webhook, Ghost, Framer, Shopify, Webflow, Wix, WordPress Plugin, or Next.js Blog integration with `outrank-cli products integrations create <product-id> --json-file integration-create.json`.
|
|
345
|
+
- Inspect one integration with `outrank-cli products integrations get <product-id> <integration-id>`.
|
|
346
|
+
- Update a saved webhook, Ghost, Shopify, Webflow, Wix, WordPress Plugin, or Notion integration with `outrank-cli products integrations update <product-id> <integration-id> --json-file integration-update.json`.
|
|
347
|
+
- Test a saved webhook, Ghost, Framer, Shopify, Webflow, Wix, WordPress Plugin, or Notion integration with `outrank-cli products integrations test <product-id> <integration-id>`.
|
|
348
|
+
- Delete a stale integration with `outrank-cli products integrations delete <product-id> <integration-id>`.
|
|
349
|
+
|
|
350
|
+
Current scope note:
|
|
351
|
+
|
|
352
|
+
- Webhook, Ghost, Shopify, Webflow, and Wix support direct validate/create/update/test. Framer supports validate, provider-specific discovery, create, and test for the newer Server API flow. WordPress Plugin supports prepare plus validate/create/update/test. Next.js Blog supports one-step create plus the shared list|get|delete surface, returning a one-time API key on create. WordPress.com supports OAuth connect plus poll, then the shared list|get|delete surface. Notion supports OAuth connect plus poll, provider-specific database/schema discovery, then update/test on the saved row.
|
|
353
|
+
- V2 products are intended to keep one publishing integration. If `list` returns multiple rows, that usually means legacy V1 residue and stale rows should be reviewed and deleted.
|
|
354
|
+
- Backlink exchange management covers configuration, status reads, earned/unverified review queues, and reverification actions. Purchasing or changing backlink add-ons still requires the dashboard checkout flow.
|
|
355
|
+
- Other providers are still mostly read/delete only while create, update, test, and provider-specific discovery are added one by one.
|
|
356
|
+
|
|
166
357
|
## Custom API target (advanced)
|
|
167
358
|
|
|
168
359
|
The CLI talks to `https://www.outrank.so` by default and you should not need to change that. The override below exists only for Outrank staff debugging against a staging deployment.
|
|
169
360
|
|
|
170
|
-
```
|
|
171
|
-
|
|
361
|
+
```bash
|
|
362
|
+
export OUTRANK_BASE_URL="https://staging.example" # macOS / Linux
|
|
172
363
|
outrank-cli auth whoami
|
|
173
364
|
```
|
|
174
365
|
|
|
175
|
-
|
|
366
|
+
On Windows PowerShell, use `$env:OUTRANK_BASE_URL = "https://staging.example"`. On Windows `cmd.exe`, use `set OUTRANK_BASE_URL=https://staging.example`.
|
|
367
|
+
|
|
368
|
+
`--base-url <url>` is the per-command form and works on every platform.
|
|
176
369
|
|
|
177
370
|
The agent API expects product UUIDs, not numeric ids like `88`.
|
|
178
371
|
|
|
@@ -182,8 +375,8 @@ The agent API expects product UUIDs, not numeric ids like `88`.
|
|
|
182
375
|
|
|
183
376
|
If you do not want a global link yet, you can run the CLI directly from this repo:
|
|
184
377
|
|
|
185
|
-
```
|
|
186
|
-
node
|
|
378
|
+
```bash
|
|
379
|
+
node ./src/index.js auth whoami --api-key outr_live_xxx
|
|
187
380
|
```
|
|
188
381
|
|
|
189
382
|
## JSON-first contract
|
|
@@ -198,7 +391,7 @@ This makes the CLI easier for AI agents to drive reliably.
|
|
|
198
391
|
|
|
199
392
|
## Using the agent skill (`SKILL.md`)
|
|
200
393
|
|
|
201
|
-
`SKILL.md` ships alongside this CLI as a Claude Code skill. It tells an AI agent how to drive `outrank-cli` end-to-end — when to inspect before writing, how to interpret `agent_guidance`, the new-product preflight, the GSC flow, keyword/article rules, and how to handle 401/402/403/409 errors.
|
|
394
|
+
`SKILL.md` ships alongside this CLI as a Claude Code skill. It tells an AI agent how to drive `outrank-cli` end-to-end — when to inspect before writing, how to interpret `agent_guidance`, the new-product preflight, the GSC flow, the linking flow, keyword/article rules, and how to handle 401/402/403/409 errors.
|
|
202
395
|
|
|
203
396
|
You do not need it if you are using the CLI by hand from a terminal. You want it when you are letting an AI assistant operate the CLI for you.
|
|
204
397
|
|