@siteoshq/cli 2.3.1 → 2.5.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 +7 -1
- package/dist/cli.js +53 -10
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# SiteOS CLI
|
|
2
2
|
|
|
3
3
|
`@siteoshq/cli` exposes one `siteos` binary for Auth, common Projects, Pulse, Cookie, Forms,
|
|
4
|
-
Search, Trace, SEO/GEO and Integrations. This source is version 2.
|
|
4
|
+
Search, Trace, SEO/GEO and Integrations. This source is version 2.4.0; source changes require a separate release to reach npm.
|
|
5
5
|
|
|
6
6
|
CLI 2 requires `siteos project use <id-or-slug> --environment <slug>` once per repository.
|
|
7
7
|
It stores only the common selection in private `projects.json`; older service bindings are not
|
|
@@ -222,6 +222,7 @@ siteos seo research serp export <run-id> --keyword "website analytics" --format
|
|
|
222
222
|
siteos seo research plan --input ./research-request.json --json
|
|
223
223
|
siteos seo research run --input ./research-request.json --idempotency-key <retry-key> --json
|
|
224
224
|
siteos seo research wait <run-id> --json
|
|
225
|
+
siteos seo research retry <run-id> --idempotency-key <continuation-key> --json
|
|
225
226
|
siteos seo research export <run-id> --format json --output ./research-report.json --json
|
|
226
227
|
siteos seo gsc status --json
|
|
227
228
|
siteos seo gsc report --dataset queries --filter all --json
|
|
@@ -230,6 +231,11 @@ siteos seo gsc export --dataset queries --format csv --output ./gsc-queries.csv
|
|
|
230
231
|
|
|
231
232
|
Run `siteos seo --help` for request JSON, limits, saved inputs, cancellation and GSC settings.
|
|
232
233
|
Research supports keywords, Domain Overview (`domain`), rankings, backlinks, brand and AI visibility without GSC.
|
|
234
|
+
AI Visibility category history uses `--kind ai-rankings`; Prompt checks stays separate under
|
|
235
|
+
`--kind ai-visibility`. Category requests use `kind: ai-visibility` with a `category-aeo-v2`
|
|
236
|
+
category. Reports and exports preserve AEO scores, recommendation roles, first choices, objections,
|
|
237
|
+
model settings and the exact supporting answers. See the SEO skill's AI visibility reference for
|
|
238
|
+
the versioned request and scoring method; historical v1 reports remain readable without inferred scores.
|
|
233
239
|
Domain Overview collects domain totals, up to 100 ranking keywords, pages and competitors for a market.
|
|
234
240
|
`--kind domain` includes legacy `competitors` history; existing `competitors` inputs keep their original two-part plan.
|
|
235
241
|
New request example: `{"kind":"domain","target":"example.com","country":"US","language":"en"}`.
|
package/dist/cli.js
CHANGED
|
@@ -9001,6 +9001,7 @@ var RESEARCH_HELP = `
|
|
|
9001
9001
|
siteos seo research show <run-id> [--environment <slug>] [--json]
|
|
9002
9002
|
siteos seo research plan --input <request.json> [--environment <slug>] [--json]
|
|
9003
9003
|
siteos seo research run --input <request.json> [--idempotency-key <key>] [--environment <slug>] [--json]
|
|
9004
|
+
siteos seo research retry <run-id> [--idempotency-key <key>] [--environment <slug>] [--json]
|
|
9004
9005
|
siteos seo research wait <run-id> [--timeout <seconds>] [--environment <slug>] [--json]
|
|
9005
9006
|
siteos seo research cancel <run-id> [--environment <slug>] [--json]
|
|
9006
9007
|
siteos seo research export <run-id> --format <json|csv> --output <new-file> [--environment <slug>] [--json]
|
|
@@ -9012,17 +9013,20 @@ var RESEARCH_HELP = `
|
|
|
9012
9013
|
siteos seo research saved save --input <request.json> --name <name> [--id <saved-id>] [--environment <slug>] [--json]
|
|
9013
9014
|
siteos seo research saved remove <saved-id> [--environment <slug>] [--json]
|
|
9014
9015
|
|
|
9015
|
-
Research kinds: keywords, domain, rankings, backlinks, brand, ai-visibility.
|
|
9016
|
+
Research request kinds: keywords, domain, rankings, backlinks, brand, ai-visibility.
|
|
9017
|
+
Read sections also accept --kind ai-rankings for category comparisons; --kind ai-visibility selects Prompt checks.
|
|
9018
|
+
Category run/plan inputs use kind ai-visibility with category-aeo-v2; both sections share AI request execution.
|
|
9016
9019
|
Domain Overview: {"kind":"domain","target":"example.com","country":"US","language":"en"}.
|
|
9017
9020
|
Domain collects summary, ranking keywords, top pages and competitors. The legacy competitors kind retains its two-part plan; domain history includes those reports.
|
|
9018
9021
|
Request JSON: {"kind":"keywords","target":"example.com","keywords":["website analytics"],"country":"US","language":"en"}.
|
|
9019
|
-
Rankings accepts up to 10 keywords and 5 competitors. AI visibility
|
|
9022
|
+
Rankings accepts up to 10 keywords and 5 competitors. AI visibility accepts brand, platforms and either prompt or a category-aeo-v2 category with products and questions.
|
|
9020
9023
|
Markets: US, GB, ES, DE, FR, CA, AU. Languages: en, es, de, fr, pt, it, nl, ru.
|
|
9021
9024
|
Platforms: chat_gpt, claude, gemini, perplexity. Brand lookup uses brandPlatform chat_gpt|google and brandMatch domain|brand.
|
|
9022
9025
|
Plan validates the request and shows planned parts and available research credits without enqueueing work.
|
|
9026
|
+
Retry creates a continuation using the original questions and settings; it preserves usable saved answers and only requests missing parts. It consumes credits and requires explicit scope authorization, like Run. Original reports and observation dates remain available.
|
|
9023
9027
|
Run consumes Organization research credits through the same worker as the interface. Preserve the retry key after an uncertain response.
|
|
9024
9028
|
SERP ensure collects one saved organic snapshot for a keyword returned by the selected completed Keyword Research report. It uses research credits once; repeating the same report/word returns the saved job, including failures. Show/wait/export only read and never spend. New reports can collect fresh snapshots.
|
|
9025
|
-
History returns the latest 30 checks per
|
|
9029
|
+
History returns the latest 30 checks per section; show/export can address older retained run IDs. Saved checks are limited to 100 per resource.
|
|
9026
9030
|
Wait defaults to 120 seconds (maximum 900); exit 3 means still pending, exit 4 means failed or cancelled. Partial evidence stays accessible.
|
|
9027
9031
|
Exports preserve scope, dates and partial state. CSV stores one dataset row as JSON per row, including failed parts; it never converts missing metrics to zero.
|
|
9028
9032
|
`;
|
|
@@ -9034,6 +9038,8 @@ var kinds = [
|
|
|
9034
9038
|
"brand",
|
|
9035
9039
|
"ai-visibility"
|
|
9036
9040
|
];
|
|
9041
|
+
var sections = [...kinds, "ai-rankings"];
|
|
9042
|
+
var sectionOf = (request) => request.kind === "ai-visibility" && request.category ? "ai-rankings" : request.kind;
|
|
9037
9043
|
var requestSchema = z17.object({
|
|
9038
9044
|
kind: z17.enum(["domain", ...kinds]).transform((kind) => kind === "domain" ? "competitors" : kind),
|
|
9039
9045
|
target: z17.string().min(1).max(253)
|
|
@@ -9085,6 +9091,7 @@ async function runSeoResearchCommand(options) {
|
|
|
9085
9091
|
show: { args: 2, flags: [] },
|
|
9086
9092
|
plan: { args: 1, flags: ["input"] },
|
|
9087
9093
|
run: { args: 1, flags: ["input", "idempotency-key"] },
|
|
9094
|
+
retry: { args: 2, flags: ["idempotency-key"] },
|
|
9088
9095
|
wait: { args: 2, flags: ["timeout"] },
|
|
9089
9096
|
cancel: { args: 2, flags: [] },
|
|
9090
9097
|
export: { args: 2, flags: ["format", "output"] },
|
|
@@ -9104,7 +9111,7 @@ async function runSeoResearchCommand(options) {
|
|
|
9104
9111
|
"Provide --keyword with 1 to 200 characters from the selected keyword report."
|
|
9105
9112
|
);
|
|
9106
9113
|
if (values.kind === "domain") values.kind = "competitors";
|
|
9107
|
-
if (operation.flags.includes("kind") && !
|
|
9114
|
+
if (operation.flags.includes("kind") && !sections.includes(values.kind))
|
|
9108
9115
|
throw new Error("Choose a documented --kind.");
|
|
9109
9116
|
if (operation.flags.includes("input") && !values.input)
|
|
9110
9117
|
throw new Error("Provide --input with a research request JSON file.");
|
|
@@ -9127,7 +9134,7 @@ async function runSeoResearchCommand(options) {
|
|
|
9127
9134
|
"The request file needs a research kind and target domain. Run siteos seo --help."
|
|
9128
9135
|
);
|
|
9129
9136
|
}
|
|
9130
|
-
if (action === "run") {
|
|
9137
|
+
if (action === "run" || action === "retry") {
|
|
9131
9138
|
idempotencyKey = values["idempotency-key"] ?? randomUUID6();
|
|
9132
9139
|
if (!/^[a-zA-Z0-9_-]{8,100}$/u.test(idempotencyKey))
|
|
9133
9140
|
throw new Error(
|
|
@@ -9270,7 +9277,24 @@ async function runSeoResearchCommand(options) {
|
|
|
9270
9277
|
stdout: JSON.stringify(record, null, 2)
|
|
9271
9278
|
};
|
|
9272
9279
|
}
|
|
9273
|
-
if (action === "
|
|
9280
|
+
if (action === "retry") {
|
|
9281
|
+
const source = await get(`/runs/${encodeURIComponent(id)}`);
|
|
9282
|
+
resourceSchema.parse(source.resource);
|
|
9283
|
+
const original = runSchema.parse(source.run);
|
|
9284
|
+
if (original.id !== id || ["queued", "running"].includes(original.state))
|
|
9285
|
+
throw new Error("Choose the exact stopped research report to retry.");
|
|
9286
|
+
record = await get("/runs", "run", {
|
|
9287
|
+
request: original.request,
|
|
9288
|
+
retryOf: id,
|
|
9289
|
+
idempotencyKey
|
|
9290
|
+
});
|
|
9291
|
+
const next = runSchema.parse(record.run);
|
|
9292
|
+
if (next.retryOf !== id || !isDeepStrictEqual(next.request, original.request))
|
|
9293
|
+
throw new Error(
|
|
9294
|
+
"The continued check does not match the original report."
|
|
9295
|
+
);
|
|
9296
|
+
record = { ...record, idempotencyKey };
|
|
9297
|
+
} else if (action === "plan" || action === "run" || action === "saved save") {
|
|
9274
9298
|
const plan = await get("/plan", "read", input);
|
|
9275
9299
|
resourceSchema.parse(plan.resource);
|
|
9276
9300
|
const canonical = requestSchema.parse(plan.request);
|
|
@@ -9312,7 +9336,7 @@ async function runSeoResearchCommand(options) {
|
|
|
9312
9336
|
} else if (action === "summary") {
|
|
9313
9337
|
record = await get("/summary");
|
|
9314
9338
|
resourceSchema.parse(record.resource);
|
|
9315
|
-
z17.array(z17.object({ kind: z17.enum(
|
|
9339
|
+
z17.array(z17.object({ kind: z17.enum(sections), summary: z17.unknown() })).parse(
|
|
9316
9340
|
record.checks
|
|
9317
9341
|
);
|
|
9318
9342
|
} else if (["status", "history", "saved list"].includes(action)) {
|
|
@@ -9326,13 +9350,13 @@ async function runSeoResearchCommand(options) {
|
|
|
9326
9350
|
request: requestSchema
|
|
9327
9351
|
}).passthrough()
|
|
9328
9352
|
).parse(view.saved);
|
|
9329
|
-
if (runs.some((r) => r.request
|
|
9353
|
+
if (runs.some((r) => sectionOf(r.request) !== values.kind) || saved.some((r) => sectionOf(r.request) !== values.kind))
|
|
9330
9354
|
throw new Error(
|
|
9331
9355
|
"The response does not match the requested research kind."
|
|
9332
9356
|
);
|
|
9333
9357
|
if (view.run != null) {
|
|
9334
9358
|
const selected = runSchema.parse(view.run);
|
|
9335
|
-
if (selected.request
|
|
9359
|
+
if (sectionOf(selected.request) !== values.kind)
|
|
9336
9360
|
throw new Error("The selected report has a different research kind.");
|
|
9337
9361
|
}
|
|
9338
9362
|
record = {
|
|
@@ -9395,6 +9419,25 @@ async function runSeoResearchCommand(options) {
|
|
|
9395
9419
|
row
|
|
9396
9420
|
]);
|
|
9397
9421
|
});
|
|
9422
|
+
if (run.categoryReport) {
|
|
9423
|
+
rows.push([
|
|
9424
|
+
run.id,
|
|
9425
|
+
run.websiteUrl,
|
|
9426
|
+
run.request.kind,
|
|
9427
|
+
run.request.target,
|
|
9428
|
+
run.createdAt,
|
|
9429
|
+
run.state,
|
|
9430
|
+
run.error,
|
|
9431
|
+
null,
|
|
9432
|
+
null,
|
|
9433
|
+
null,
|
|
9434
|
+
null,
|
|
9435
|
+
"category-report",
|
|
9436
|
+
run.request,
|
|
9437
|
+
{ version: run.categoryReport.version },
|
|
9438
|
+
run.categoryReport
|
|
9439
|
+
]);
|
|
9440
|
+
}
|
|
9398
9441
|
const content = values.format === "json" ? JSON.stringify(record, null, 2) : [
|
|
9399
9442
|
[
|
|
9400
9443
|
"run_id",
|
|
@@ -9888,7 +9931,7 @@ var SEO_HELP = `SEO/GEO: audit your website and research search-engine and AI vi
|
|
|
9888
9931
|
|
|
9889
9932
|
Site Audit checks public HTML, canonical, robots.txt, sitemap and technical GEO signals.
|
|
9890
9933
|
Performance measures selected pages with Lighthouse and compares response/rendered HTML.
|
|
9891
|
-
Research covers keywords, rankings, competitors, backlinks, Brand lookup and
|
|
9934
|
+
Research covers keywords, rankings, competitors, backlinks, Brand lookup and AI visibility.
|
|
9892
9935
|
GSC Insights reads your connected property's Google Search Console data; other research needs no GSC.
|
|
9893
9936
|
Technical GEO checks crawler policies, content, snippets and structured-data syntax/shape.
|
|
9894
9937
|
These checks do not measure autonomous agent journeys or guarantee AI inclusion or citations.
|