@gscdump/cli 5.8.0 → 5.9.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 +1 -1
- package/dist/commands/sitemaps.mjs +50 -0
- package/dist/package.mjs +1 -1
- package/package.json +7 -7
- package/skills/gscdump/SKILL.md +17 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Google Search Console CLI and MCP server.
|
|
4
4
|
|
|
5
|
-
Choose [Local or Hosted mode](../../docs/gscdump-cli/guides/1.start/2.choose-access.md) before login. Local mode calls Google with your own credentials: a service account or an OAuth client. Hosted mode opens gscdump.com, saves a CLI session, and reads your hosted record. Explicit `indexing inspect --yes` requests spend URL Inspections through the platform.
|
|
5
|
+
Choose [Local or Hosted mode](../../docs/gscdump-cli/guides/1.start/2.choose-access.md) before login. Local mode calls Google with your own credentials: a service account or an OAuth client. Hosted mode opens gscdump.com, saves a CLI session, and reads your hosted record. Explicit `indexing inspect --yes` requests spend URL Inspections through the platform. `sitemaps inspect --engine google` reads one Sitemap live through the platform. It uses Google's API quota, without spending URL Inspections. Bing Sitemap inspection reads dated stored evidence.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g @gscdump/cli
|
|
@@ -3,8 +3,10 @@ import { OUTPUT_ARGS, applyOutputMode, logger, parseIntegerOption, plural } from
|
|
|
3
3
|
import { createCommandContext } from "../context.mjs";
|
|
4
4
|
import { HOSTED_ARGS, resolveHostedSite } from "../hosted-site.mjs";
|
|
5
5
|
import { discoverLiveSitemap, loadSitemapUrls } from "../sitemap.mjs";
|
|
6
|
+
import process from "node:process";
|
|
6
7
|
import { defineCommand } from "citty";
|
|
7
8
|
import { fetchSitemap } from "gscdump/sites";
|
|
9
|
+
import { sitemapInspectQueryV1Schema } from "@gscdump/contracts/v1";
|
|
8
10
|
const HOSTED_SITEMAP_ALTERNATIVE = "read a live sitemap with `gscdump sitemaps urls <sitemap-url>`";
|
|
9
11
|
function hostedSitemapSite(args, name) {
|
|
10
12
|
return resolveHostedSite(args, {
|
|
@@ -260,6 +262,53 @@ const urlsCommand = defineCommand({
|
|
|
260
262
|
for (const u of urls) console.log(u);
|
|
261
263
|
}
|
|
262
264
|
});
|
|
265
|
+
const inspectCommand = defineCommand({
|
|
266
|
+
meta: {
|
|
267
|
+
name: "inspect",
|
|
268
|
+
description: "Read provider evidence for one exact Sitemap URL (hosted)"
|
|
269
|
+
},
|
|
270
|
+
args: {
|
|
271
|
+
...OUTPUT_ARGS,
|
|
272
|
+
...HOSTED_ARGS,
|
|
273
|
+
url: {
|
|
274
|
+
type: "positional",
|
|
275
|
+
required: true,
|
|
276
|
+
description: "Exact Sitemap URL"
|
|
277
|
+
},
|
|
278
|
+
engine: {
|
|
279
|
+
type: "string",
|
|
280
|
+
default: "google",
|
|
281
|
+
description: "Search Engine: google or bing"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
async run({ args }) {
|
|
285
|
+
const { json } = applyOutputMode(args);
|
|
286
|
+
const query = sitemapInspectQueryV1Schema.parse({
|
|
287
|
+
searchEngine: args.engine,
|
|
288
|
+
url: args.url
|
|
289
|
+
});
|
|
290
|
+
const { client, site } = await hostedSitemapSite({
|
|
291
|
+
...args,
|
|
292
|
+
_: []
|
|
293
|
+
}, "inspect");
|
|
294
|
+
const { data } = await client.inspectSiteSitemap({
|
|
295
|
+
params: { siteId: site.siteId },
|
|
296
|
+
query
|
|
297
|
+
});
|
|
298
|
+
if (data.state._tag === "unavailable") process.exitCode = 1;
|
|
299
|
+
if (json) {
|
|
300
|
+
console.log(JSON.stringify(data, null, 2));
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
console.log(`${data.searchEngine}: ${data.sitemapUrl}`);
|
|
304
|
+
console.log(`Evidence: ${data.state._tag}`);
|
|
305
|
+
if (data.capture._tag === "captured") console.log(`Capture: ${data.capture.capturedAt} (${data.capture.source})`);
|
|
306
|
+
if (data.state._tag === "unavailable") console.log(`Reason: ${data.state.reason}`);
|
|
307
|
+
if (data.state._tag === "listed") {
|
|
308
|
+
for (const [key, value] of Object.entries(data.state)) if (key !== "_tag") console.log(`${key}: ${value ?? "unknown"}`);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
});
|
|
263
312
|
const currentCommand = defineCommand({
|
|
264
313
|
meta: {
|
|
265
314
|
name: "current",
|
|
@@ -436,6 +485,7 @@ const sitemapsCommand = defineCommand({
|
|
|
436
485
|
discover: discoverCommand,
|
|
437
486
|
urls: urlsCommand,
|
|
438
487
|
current: currentCommand,
|
|
488
|
+
inspect: inspectCommand,
|
|
439
489
|
history: historyCommand,
|
|
440
490
|
membership: membershipCommand,
|
|
441
491
|
lastmod: lastmodCommand,
|
package/dist/package.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var version = "5.
|
|
1
|
+
var version = "5.9.0";
|
|
2
2
|
export { version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.9.0",
|
|
5
5
|
"description": "CLI for Google Search Console and Bing with hosted or local authentication, data exports, and an MCP server",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@clack/prompts": "^1.8.1",
|
|
46
46
|
"@duckdb/node-api": "1.5.5-r.5",
|
|
47
|
-
"@gscdump/analysis": "^5.
|
|
48
|
-
"@gscdump/contracts": "^5.
|
|
49
|
-
"@gscdump/engine": "^5.
|
|
50
|
-
"@gscdump/engine-gsc-api": "^5.
|
|
51
|
-
"@gscdump/sdk": "^5.
|
|
47
|
+
"@gscdump/analysis": "^5.9.0",
|
|
48
|
+
"@gscdump/contracts": "^5.9.0",
|
|
49
|
+
"@gscdump/engine": "^5.9.0",
|
|
50
|
+
"@gscdump/engine-gsc-api": "^5.9.0",
|
|
51
|
+
"@gscdump/sdk": "^5.9.0",
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
53
53
|
"citty": "^0.2.2",
|
|
54
54
|
"consola": "^3.4.2",
|
|
55
55
|
"google-auth-library": "^11.1.0",
|
|
56
|
-
"gscdump": "^5.
|
|
56
|
+
"gscdump": "^5.9.0",
|
|
57
57
|
"ofetch": "^1.5.1",
|
|
58
58
|
"open": "^11.0.4",
|
|
59
59
|
"proper-lockfile": "^4.1.2",
|
package/skills/gscdump/SKILL.md
CHANGED
|
@@ -72,7 +72,7 @@ gscdump query --site example.com -d page -f json
|
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Hosted mode can run only these commands: `sites`, `query`, `sitemaps current`, `sitemaps history`, `sitemaps membership`,
|
|
75
|
-
`sitemaps lastmod`, `sitemaps export`, `indexing urls`, `indexing inspect --yes`, `indexing summary`, `indexing watch list|add|remove`,
|
|
75
|
+
`sitemaps lastmod`, `sitemaps export`, `sitemaps inspect`, `indexing urls`, `indexing inspect --yes`, `indexing summary`, `indexing watch list|add|remove`,
|
|
76
76
|
and the `bing` commands `login --site`, `sites`, `status`, `dump`, `inspect`, and `verify`.
|
|
77
77
|
Direct Google commands need Local mode: `sync`, `inspect`, `query --live`, `analyze --live`, `report --live`,
|
|
78
78
|
`sites add|get|delete|verify*`, `sitemaps list|get|submit|delete`, `indexing submit|remove|status|batch`, `entities`, and `mcp`.
|
|
@@ -468,6 +468,22 @@ gscdump indexing urls --site example.com --status not_indexed --all --format csv
|
|
|
468
468
|
- Pages hold 100 rows by default and 500 at most. Use `--offset` for the next page, or `--all` for every page.
|
|
469
469
|
- With local authentication, the command fails. Pipe `gscdump sitemaps urls <sitemap-url>` into `gscdump inspect --site <site>` instead.
|
|
470
470
|
|
|
471
|
+
## Inspect one Sitemap (hosted)
|
|
472
|
+
|
|
473
|
+
```sh
|
|
474
|
+
gscdump sitemaps inspect https://example.com/sitemap-old.xml --site example.com --engine google --json
|
|
475
|
+
gscdump sitemaps inspect https://example.com/sitemap-old.xml --site example.com --engine bing --json
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
Google reads that exact Sitemap from Search Console during the request.
|
|
479
|
+
That read uses Google's API quota, without spending URL Inspections.
|
|
480
|
+
Bing reads its stored provider list. Quote `capture.capturedAt` and `capture.source` with the answer.
|
|
481
|
+
`listed` carries provider dates, flags, and counts. A null date means the provider supplied no date.
|
|
482
|
+
`missing` means that exact Sitemap was absent at Capture time.
|
|
483
|
+
`unavailable` means gscdump could not establish the evidence. The command exits with code 1.
|
|
484
|
+
The command never submits a Sitemap or inspects URLs inside it.
|
|
485
|
+
For Hosted MCP, use `inspect-sitemap` at `https://gscdump.com/mcp`.
|
|
486
|
+
|
|
471
487
|
## Read the coverage ladder (hosted)
|
|
472
488
|
|
|
473
489
|
```sh
|