@nuxtseo/cli 0.1.3 → 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/README.md +120 -36
- package/dist/api.js +7 -1
- package/dist/cli.js +62 -11
- package/dist/command-contract.d.ts +2 -1
- package/dist/command-contract.js +14 -2
- package/dist/commands.d.ts +19 -0
- package/dist/commands.js +1263 -89
- package/dist/failures.d.ts +2 -1
- package/dist/failures.js +21 -1
- package/dist/parse.d.ts +9 -0
- package/dist/parse.js +21 -0
- package/dist/render.d.ts +44 -8
- package/dist/render.js +648 -5
- package/dist/skill.d.ts +22 -0
- package/dist/skill.js +56 -0
- package/package.json +9 -8
- package/skills/nuxtseo-cli/SKILL.md +236 -107
- package/skills/nuxtseo-cli/references/commands.md +162 -0
- package/skills/nuxtseo-cli/references/indexing.md +60 -0
- package/skills/nuxtseo-cli/references/protocol.md +17 -5
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# CLI command reference
|
|
2
|
+
|
|
3
|
+
Every command, with the flags you need most, their ranges, and their defaults.
|
|
4
|
+
Some commands take more flags than a row lists. Ask the command itself for the
|
|
5
|
+
full set: `nuxtseo <command> --help --json`.
|
|
6
|
+
|
|
7
|
+
Pass `--json` and `--site <site-id>` on every command below, except `whoami`,
|
|
8
|
+
`sites list`, `config`, and `skill install`.
|
|
9
|
+
|
|
10
|
+
`Mutation` marks a command that changes server state. A mutation needs `--yes`
|
|
11
|
+
in a non-interactive shell.
|
|
12
|
+
|
|
13
|
+
`Needs a Site URL` marks a command that reads the Site's own domain. If the Site
|
|
14
|
+
has no URL, the command exits `2`. Set the Site URL first; retrying will not
|
|
15
|
+
help.
|
|
16
|
+
|
|
17
|
+
`--all` repeats a paged read until every page is written, one envelope per line.
|
|
18
|
+
It is available on `actions list`, `page inspect`, `page issues`, `vitals
|
|
19
|
+
findings`, `backlinks recoverable`, `search analytics` row views, `search
|
|
20
|
+
indexing urls`, `sitemaps urls` and `content briefs list`.
|
|
21
|
+
|
|
22
|
+
## Contents
|
|
23
|
+
|
|
24
|
+
- Account and Site
|
|
25
|
+
- Assessment and Actions
|
|
26
|
+
- Pages, Scans, and lab performance
|
|
27
|
+
- Field Core Web Vitals
|
|
28
|
+
- Search Console and sitemaps
|
|
29
|
+
- Web Analytics
|
|
30
|
+
- Research, backlinks, and mentions
|
|
31
|
+
- Crawl audit
|
|
32
|
+
- Content Briefs, Timeline, and annotations
|
|
33
|
+
- Ask the CLI for its own help
|
|
34
|
+
|
|
35
|
+
## Account and Site
|
|
36
|
+
|
|
37
|
+
| Command | What it returns, and its flags |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `whoami` | Credential, Team, role, granted scopes, token expiry. The cheapest health check. Reads no Site |
|
|
40
|
+
| `login` | Pairs the CLI with a Team through the browser. A person must approve the pairing, so ask the user to run it. `--with-token` reads a token from a hidden prompt or stdin. `--no-browser` skips opening the browser |
|
|
41
|
+
| `logout` | Discards the stored credential. Returns a `CliLogout` value |
|
|
42
|
+
| `sites list` | Every accessible Site. The source of Site IDs |
|
|
43
|
+
| `sites use <site-id>` | Persists a default Site in local config, for the human, not for you |
|
|
44
|
+
| `usage` | `data.plan`, and `data.meters[]` carrying `used`, `limit` and `blocked` per limit. `--group integrations\|compute\|capacity` |
|
|
45
|
+
| `config` | Local config path, API host, selected Site. Local only |
|
|
46
|
+
| `skill install` | Copies this skill into an agent skill directory. `--agent claude\|codex`, `--target <dir>` |
|
|
47
|
+
|
|
48
|
+
## Assessment and Actions
|
|
49
|
+
|
|
50
|
+
| Command | What it returns, and its flags |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `status` | The Site assessment in one read: verdict, the single ranked Next Action, open and verified counts, degraded pipeline steps, recent changes, Receipts. `available: false` means the first assessment has not run. If the Site is archived or paused, this exits `4` or `5` rather than answering |
|
|
53
|
+
| `actions list` | Server-ranked issues and opportunities. `--limit 1..25` (default 10), `--offset`. Each row carries `evidence.freshness`; `verdict: "aged"` means the observation is over a day old, so live-check before fixing |
|
|
54
|
+
| `actions show <action-id>` | One issue or opportunity, plus its evidence. `--limit 1..100` (default 50), `--group-id`, `--cursor` |
|
|
55
|
+
| `actions resolve <action-id>` | Mutation. Claims the issue or opportunity and starts server verification. Reads the action first and sends `artifactVersion` for you |
|
|
56
|
+
| `actions dismiss <action-id>` | Mutation. Says the page stays removed. Needs `--artifact-version`, read from `actions show`. Admitted only for a broken-page action with complete 404 or 410 evidence and no internal referrers |
|
|
57
|
+
|
|
58
|
+
## Pages, Scans, and lab performance
|
|
59
|
+
|
|
60
|
+
| Command | What it returns, and its flags |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| `page inspect <url>` | Stored observations, Lighthouse rows and keywords for one Page. `--limit 1..200`, `--offset`, `--include-resolved`. Carries `observations.coverage`: `never-scanned` means no source recorded this Page, `scanned-clear` means recorded and all clear |
|
|
63
|
+
| `page issues` | Raw Page Issue rows. Pass `--action-id`, or pass both `--source` and `--issue`. Passing both selectors exits `2`. `--url`, `--path-prefix`, `--include-resolved`, `--limit 1..200`, `--offset`. When the selector matches nothing, `availableKeys` lists the pairs this Site does have. If the Site is archived or paused, this exits `4` or `5` rather than answering |
|
|
64
|
+
| `page scan <url>` | Mutation. Starts a mobile Scan and a desktop Scan |
|
|
65
|
+
| `performance` | Stored Lighthouse lab overview for the Site: medians for perf, a11y, SEO, LCP, TBT, CLS. Lab Scans, never real-user field data |
|
|
66
|
+
| `scans list` | Retained Lighthouse Scans, newest first, with scores, lab vitals, and the error on a failed Scan. `--limit 1..100` (default 25) |
|
|
67
|
+
| `scans show <scan-id>` | One Scan, and the evidence behind its scores: wasteful assets, repeat-visit cache policy, third-party scripts, the LCP element, and every failing accessibility and best-practices check with its CSS selectors and DOM snippets. Read `coverage` before quoting a total |
|
|
68
|
+
| `scans pages` | The Pages this Site scans on a schedule. Add one with `page scan <url>` |
|
|
69
|
+
|
|
70
|
+
`page inspect` and `page scan` take an absolute URL, for example
|
|
71
|
+
`https://example.com/about`.
|
|
72
|
+
|
|
73
|
+
## Field Core Web Vitals
|
|
74
|
+
|
|
75
|
+
| Command | What it returns, and its flags |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `vitals summary` | Field Core Web Vitals from CrUX: the latest p75, plus its change over the window. `--url` for one Page, `--form-factor phone\|desktop\|all`. `available: false` means the target is under the CrUX traffic floor |
|
|
78
|
+
| `vitals trend` | A 25-week field p75 series. Same inputs as `vitals summary` |
|
|
79
|
+
| `vitals findings` | Failing field vitals attributed to a DOM element. `--metric lcp\|inp\|cls`, `--limit 1..50` (default 20), `--offset`, `--no-only-failing`. Each finding carries the CSS selector and a ready-to-apply `fixPrompt`. Needs a connected Web Analytics provider |
|
|
80
|
+
|
|
81
|
+
## Search Console and sitemaps
|
|
82
|
+
|
|
83
|
+
| Command | What it returns, and its flags |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| `search status` | Stored Search Console connection state. Provider free. Never waits for Google |
|
|
86
|
+
| `search analytics <view>` | Search Console rows, trend, detail, or analysis. Views: `pages`, `keywords`, `countries`, `devices`, `timeseries`, `page-detail`, `keyword-detail`, `analysis`. `--period`, `--limit`, `--page`, `--search`, `--sort`, `--filter`, `--min-clicks`, `--max-clicks`, `--min-impressions`, `--max-impressions`, `--min-position`, `--max-position`, `--max-ctr`. The `analysis` view needs `--preset`, and the brand presets also need `--brand-terms` |
|
|
87
|
+
| `search indexing <summary\|urls>` | Retained URL Inspection coverage. `summary` returns indexed counts. `urls` supports `--issue`, `--status`, `--limit 1..500` (default 50), `--offset` |
|
|
88
|
+
| `search index-history` | Retained indexing changes and candidate causes. `--url`, `--field`, `--days 1..730`. Dates a regression against a release |
|
|
89
|
+
| `search inspect <url>` | Google's own verdict for one URL. Takes an absolute URL or a site-relative path |
|
|
90
|
+
| `search cohorts` | Not-indexed rate per route family. `--limit 1..50` (default 12), `--min-pages 1..500` (default 5). If the Site is archived or paused, this exits `4` or `5` rather than answering |
|
|
91
|
+
| `sitemaps list` | Search Console sitemap snapshot: errors, warnings, URL counts, sync status |
|
|
92
|
+
| `sitemaps urls` | Sitemap URL membership. `--generation-id`, `--feedpath`, `--cursor`, `--limit 1..1000` |
|
|
93
|
+
| `sitemaps submit <sitemap-url>` | Mutation. Submits one sitemap through the Site's stored Search Console credential |
|
|
94
|
+
| `sitemaps delete <sitemap-url>` | Mutation. Removes one sitemap through the Site's stored Search Console credential |
|
|
95
|
+
|
|
96
|
+
Analysis presets for `search analytics analysis` are `striking-distance`,
|
|
97
|
+
`opportunity`, `decay`, `zero-click`, `non-brand`, `brand-only`,
|
|
98
|
+
`movers-rising`, and `movers-declining`. `brand-only` and `non-brand` also need
|
|
99
|
+
`--brand-terms`. A missing argument exits `2` before any request.
|
|
100
|
+
|
|
101
|
+
## Web Analytics
|
|
102
|
+
|
|
103
|
+
| Command | What it returns, and its flags |
|
|
104
|
+
| --- | --- |
|
|
105
|
+
| `analytics <view>` | Web Analytics from the connected provider. Views: `performance`, `top-pages`, `source-medium`, `key-events`, `countries`, `devices`, `dimension`. `--period`, `--compare`, `--dimension`, `--filters` |
|
|
106
|
+
|
|
107
|
+
## Research, backlinks, and mentions
|
|
108
|
+
|
|
109
|
+
Every command here can start live research, except `research overview`,
|
|
110
|
+
`backlinks recoverable` and `mentions list`, which read retained rows. Read the
|
|
111
|
+
research boundary in SKILL.md first.
|
|
112
|
+
|
|
113
|
+
| Command | What it returns, and its flags |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `research overview` | Stored Site and competitor research: metrics, history, gaps, quick wins |
|
|
116
|
+
| `research keywords <topic>` | Live keyword ideas, with volume, difficulty, intent, and cost data |
|
|
117
|
+
| `research serp <keyword>` | A live SERP snapshot: results, features, fetch time |
|
|
118
|
+
| `research rankings <domain>` | Live domain rankings: current keywords and domain metrics |
|
|
119
|
+
| `research domain-traffic <domain>` | A live organic traffic estimate for any domain: trend, top pages, top countries. The domain does not have to be one of your Sites |
|
|
120
|
+
| `research domain-availability <domains>` | Registration status. One comma-separated positional, up to 10 domains |
|
|
121
|
+
| `backlinks summary` | Whole-domain inbound link totals. `evidence` reports cache use. Needs a Site URL |
|
|
122
|
+
| `backlinks referring-domains` | Domains that link to the Site. `--limit 1..1000` (default 100). `sessions` is 90-day referral traffic, or null when no Web Analytics property is linked. Needs a Site URL |
|
|
123
|
+
| `backlinks anchors` | Anchor text distribution of inbound links. `--limit 1..1000` (default 100). Needs a Site URL |
|
|
124
|
+
| `backlinks history` | A monthly inbound link series. `--from YYYY-MM-DD`. Defaults to about twelve months. Needs a Site URL |
|
|
125
|
+
| `backlinks recoverable` | Stored recoverable backlinks. `--limit 1..200`, `--offset`. Reads retained rows |
|
|
126
|
+
| `mentions list` | Stored mentions. `--limit 1..200`. Reads retained rows |
|
|
127
|
+
|
|
128
|
+
## Crawl audit
|
|
129
|
+
|
|
130
|
+
| Command | What it returns, and its flags |
|
|
131
|
+
| --- | --- |
|
|
132
|
+
| `audit changes` | The latest crawl compared with its baseline. `--from`, `--to`. The read for "did my deploy break anything" |
|
|
133
|
+
| `audit link-opportunities` | Stored internal link opportunities, with crawl coverage |
|
|
134
|
+
| `audit link-structure` | Template links, dead ends, and generic anchors. Shows where link equity goes |
|
|
135
|
+
| `audit content-decay` | Stored decaying Pages, with Search Console loss evidence |
|
|
136
|
+
| `audit duplicates` | Stored duplicate clusters, with members and keep candidate |
|
|
137
|
+
|
|
138
|
+
## Content Briefs, Timeline, and annotations
|
|
139
|
+
|
|
140
|
+
| Command | What it returns, and its flags |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| `content briefs list` | Content Brief summaries. `--status`, `--limit`, `--offset` |
|
|
143
|
+
| `content briefs show <brief-id>` | One Content Brief, including its grounded payload |
|
|
144
|
+
| `content briefs create <keyword>` | Mutation. Creates one Content Brief. `--target-page` is optional |
|
|
145
|
+
| `timeline list` | Stored Timeline Entries. `--kind`, `--feature`, `--severity`, `--since`, `--limit`, `--cursor`, `--include-closed` |
|
|
146
|
+
| `annotations list` | This Site's own chart annotations: date-anchored markers on traffic and ranking charts |
|
|
147
|
+
| `annotations create` | Mutation, so it needs `--yes`. Marks the day you shipped a fix. `--date YYYY-MM-DD` and `--title` are required. `--note` and `--url` are optional |
|
|
148
|
+
| `annotations update <annotation-id>` | Mutation, so it needs `--yes`. Send only what changes. Pass `--note ""` or `--url ""` to clear that field |
|
|
149
|
+
| `annotations delete <annotation-id>` | Mutation. Permanent |
|
|
150
|
+
|
|
151
|
+
## Ask the CLI for its own help
|
|
152
|
+
|
|
153
|
+
`--help --json` returns a `CliHelp` value for one command level. It separates
|
|
154
|
+
positional `arguments`, command-specific `localOptions`, inherited
|
|
155
|
+
`globalOptions`, and `subcommands`.
|
|
156
|
+
|
|
157
|
+
```sh
|
|
158
|
+
nuxtseo actions list --help --json
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Use it instead of guessing a flag. Prefer the tables above for anything they
|
|
162
|
+
already answer.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Indexing questions
|
|
2
|
+
|
|
3
|
+
Read this before you report an indexed count, or name the URLs Google indexed.
|
|
4
|
+
Two datasets answer indexing questions, and they are not interchangeable.
|
|
5
|
+
Retained URL Inspection evidence says what Google decided. Search Console
|
|
6
|
+
performance rows say which URLs appeared in search results.
|
|
7
|
+
|
|
8
|
+
Start with the retained URL Inspection summary:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
nuxtseo search indexing summary --site <site-id> --json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Report `data.totalUrls`, `data.indexed`, and `data.asOf`. These are exact for
|
|
15
|
+
the retained URL Inspection evidence at that timestamp. They are not a live
|
|
16
|
+
count of Google's whole index. State that boundary with the result. If
|
|
17
|
+
`data.asOf` is null, say the retained snapshot time is unavailable. Never call
|
|
18
|
+
that result current or live.
|
|
19
|
+
|
|
20
|
+
Use the URL view when the user asks which URLs hold a verdict:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
nuxtseo search indexing urls --site <site-id> --status indexed --all --json
|
|
24
|
+
nuxtseo search indexing urls --site <site-id> --status not_indexed --all --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Each output line is one protocol envelope. Use `data.total` for the exact
|
|
28
|
+
filtered count. Read `data.urls` across every returned envelope for the URL
|
|
29
|
+
list. If exit `9` stops the read, the list is Provisional. Resume from the
|
|
30
|
+
offset on stderr when the full list matters.
|
|
31
|
+
|
|
32
|
+
Before using `--all`, check that `--help --json` lists `all` in `localOptions`
|
|
33
|
+
for that command. If it is absent, the installed CLI cannot page that command.
|
|
34
|
+
Update the CLI.
|
|
35
|
+
|
|
36
|
+
Never derive indexed URL counts from `search analytics`. Its Page rows show
|
|
37
|
+
URLs with Search Console performance in the selected period. Impressions count
|
|
38
|
+
search result appearances. A URL can be indexed with no impressions. A missing
|
|
39
|
+
Page row does not prove that Google has not indexed it.
|
|
40
|
+
|
|
41
|
+
For URLs that appeared in search results during the current period, read every
|
|
42
|
+
Page row:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
nuxtseo search analytics pages --site <site-id> --period 7d --all --json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Keep rows where `row.impressions > 0`. Count those rows, and report `row.url`
|
|
49
|
+
when the user asks which URLs appeared. Do not use `data.total` for this count.
|
|
50
|
+
It also includes comparison-period rows with zero current impressions.
|
|
51
|
+
|
|
52
|
+
Keep these reads separate:
|
|
53
|
+
|
|
54
|
+
| Question | Command | Report |
|
|
55
|
+
| --- | --- | --- |
|
|
56
|
+
| What is the indexed count for retained URLs? | `search indexing summary` | `totalUrls`, `indexed`, `asOf` |
|
|
57
|
+
| Which retained URLs are indexed or not indexed? | `search indexing urls` | `total`, then the complete `urls` stream |
|
|
58
|
+
| Which URLs appeared in the current period? | `search analytics pages` | Rows with `impressions > 0`, then each `url` |
|
|
59
|
+
| What does Google say about one URL now? | `search inspect <url>` | The returned URL Inspection verdict |
|
|
60
|
+
| Which URLs did the Site submit? | `sitemaps list`, then `sitemaps urls` | Sitemap totals and membership |
|
|
@@ -18,7 +18,8 @@ Protocol failure, still on stdout, with recovery details on stderr:
|
|
|
18
18
|
|
|
19
19
|
Read `data`. The CLI does not unwrap, rename, rank, or enrich fields.
|
|
20
20
|
|
|
21
|
-
Local outcomes have no server body. They carry
|
|
21
|
+
Local outcomes have no server body. They carry one tag and their own schema
|
|
22
|
+
version. `CliHelp` uses version 2. The other values use version 1.
|
|
22
23
|
|
|
23
24
|
| `_tag` | Written by |
|
|
24
25
|
| --- | --- |
|
|
@@ -28,6 +29,7 @@ Local outcomes have no server body. They carry `schemaVersion: 1` and one tag:
|
|
|
28
29
|
| `CliConfig` | `config --json` |
|
|
29
30
|
| `CliLogout` | `logout --json` |
|
|
30
31
|
| `CliSiteSelection` | `sites use <site-id> --json` |
|
|
32
|
+
| `CliSkillInstall` | `skill install --json` |
|
|
31
33
|
| `CliError` | Any failure with no server body |
|
|
32
34
|
|
|
33
35
|
Discriminate on `_tag`. Protocol envelopes never carry one.
|
|
@@ -50,7 +52,15 @@ Set `NUXTSEO_NO_UPDATE_CHECK=1` to disable the check, for example in CI.
|
|
|
50
52
|
|
|
51
53
|
## Paging
|
|
52
54
|
|
|
53
|
-
One invocation makes one request. The CLI never
|
|
55
|
+
One invocation makes one request by default. The CLI never merges responses.
|
|
56
|
+
|
|
57
|
+
`--all` repeats the same operation until the server reports no more pages. It
|
|
58
|
+
writes one complete envelope per page, newline delimited, so parse the stream
|
|
59
|
+
one JSON value per line. Nothing is merged, unwrapped, or re-ranked.
|
|
60
|
+
|
|
61
|
+
The `--all` loop stops after 50 requests. If pages remain, the CLI exits `9`
|
|
62
|
+
and stderr names the argument that resumes the read, for example `--offset 50`.
|
|
63
|
+
Treat exit `9` as a stop, never as the end of the data.
|
|
54
64
|
|
|
55
65
|
Pass the reported `offset` or opaque `cursor` for another page. Never edit or
|
|
56
66
|
infer a cursor. Keep server order for actions. Never re-rank merged results.
|
|
@@ -66,14 +76,16 @@ Branch on the exit code, not message text.
|
|
|
66
76
|
| `3` | Missing, invalid, or expired authentication | Ask the user for a token |
|
|
67
77
|
| `4` | Forbidden, scope, or entitlement failure | Report the plan or token blocker |
|
|
68
78
|
| `5` | Conflict, stale evidence, or ambiguous Site | Re-read. Pass `--site` if ambiguous |
|
|
69
|
-
| `6` | Rate limit,
|
|
79
|
+
| `6` | Rate limit, `quota_exhausted`, provider outage, or timeout | Read retry metadata, then wait |
|
|
70
80
|
| `7` | Local state, network, contract, or infrastructure failure | Report it with the request ID. If the message names `contract_violation`, update the CLI first |
|
|
71
81
|
| `8` | Resource or Site not found | Run `sites list` for a valid Site ID |
|
|
82
|
+
| `9` | `--all` reached its request cap | Resume with the argument stderr names |
|
|
72
83
|
| `127` | Shell cannot find `nuxtseo` | Install the CLI |
|
|
73
84
|
| `130` | Interrupted or cancelled | Check whether a mutation ran before retrying |
|
|
74
85
|
|
|
75
|
-
API failure details on stderr include the server code and request ID. They
|
|
76
|
-
include retry delay, policy,
|
|
86
|
+
API failure details on stderr include the server code and the request ID. They
|
|
87
|
+
may also include the retry delay, the rate policy, the requests remaining, the
|
|
88
|
+
rate limit, the window, the reset delay, and structured details. Keep the
|
|
77
89
|
request ID when reporting a problem.
|
|
78
90
|
|
|
79
91
|
Only exit `6` means the same command may work later. The SDK already retried
|