gsc-cli 2.2.0 → 2.2.3
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.
- checksums.yaml +4 -4
- data/AUTH.md +48 -18
- data/README.md +186 -141
- data/bin/gsc +129 -19
- data/dist/gsc +129 -19
- data/lib/gsc/cli/audit.rb +49 -1
- data/lib/gsc/cli/keywords.rb +7 -7
- data/lib/gsc/cli_advanced.rb +49 -1
- data/lib/gsc/page_speed.rb +22 -8
- data/lib/gsc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6cfd0972501711b114e27b2a286612efcfe85bd51aaf91947bc44b8fdfd9aff
|
|
4
|
+
data.tar.gz: 5bd6e630844f13a3115bbb4c54deda04f7f3e1585c79ac4d9037dd7c216d02a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab41e83aa4f41ca0d296218f288cb2291275c893cf60347d6cbc7083371430e06feebf00aa084d5c5978fd0bd0bd5a35f29a1beaf5839f322f2efc629bf38429
|
|
7
|
+
data.tar.gz: 50ea5330dee9bae3b09570be862e69c3b4ec5e1aafc7126525bdd2dbe1a894c2392204749b5c7f187d32c0273530cc55f6ba66599502068b8870f1a7bdcd3f6b
|
data/AUTH.md
CHANGED
|
@@ -96,23 +96,50 @@ export GA4_PROPERTY_ID=123456789
|
|
|
96
96
|
|
|
97
97
|
Audit official mobile and desktop Lighthouse scores and 75th percentile Chrome User Experience Report (CrUX) metrics (LCP, INP, CLS, FCP, TTFB).
|
|
98
98
|
|
|
99
|
-
###
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
gsc speed
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
1
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
99
|
+
### Understanding Lab vs. Field (CrUX) Data:
|
|
100
|
+
* **🔬 Lighthouse Lab Data (Synthetic Simulation):** Evaluated instantaneously in a headless Chrome environment under fixed 4G mobile or desktop throttling. Ideal for immediate debugging and identifying optimization opportunities (LCP, FCP, CLS, TBT, Speed Index).
|
|
101
|
+
* **🌐 CrUX Field Data (28-Day Real User Monitoring):** Aggregated 75th percentile measurements collected from real Google Chrome users over a rolling 28-day window. This is the **actual telemetry Google Search uses for Core Web Vitals ranking signals** (LCP, INP, CLS, FCP, TTFB).
|
|
102
|
+
* **Traffic Thresholds:** For new or low-traffic pages, Google does not have enough real-user Chrome sessions to publish CrUX data. In those cases, `gsc speed` automatically displays the instantaneous Lighthouse Lab audit and flags that CrUX field data is pending sufficient 28-day visitor volume.
|
|
103
|
+
|
|
104
|
+
> 💡 **Why an API Key is Recommended:**
|
|
105
|
+
> While Google technically permits unauthenticated queries, Google's public unauthenticated IP pool frequently hits `429 Quota Exceeded (RESOURCE_EXHAUSTED)`. Generating a personal API key in Google Cloud gives you **25,000 queries per day at $0 cost**.
|
|
106
|
+
|
|
107
|
+
### 1-Minute API Key Setup
|
|
108
|
+
|
|
109
|
+
1. **Enable the API:**
|
|
110
|
+
* Open [Google Cloud Console: PageSpeed Insights API](https://console.cloud.google.com/apis/library/pagespeedonline.googleapis.com).
|
|
111
|
+
* Ensure your active project is selected in the top bar.
|
|
112
|
+
* Click **Enable** (if not already enabled, Google will return a `403 SERVICE_DISABLED` error).
|
|
113
|
+
|
|
114
|
+
2. **Create the API Key:**
|
|
115
|
+
* In the left sidebar, navigate to **APIs & Services > Credentials**.
|
|
116
|
+
* Click **+ Create Credentials** at the top → select **API Key**.
|
|
117
|
+
* In the side panel:
|
|
118
|
+
* **Name:** `gsc-pagespeed-key` (or default `API key 1`).
|
|
119
|
+
* **Application restrictions:** Keep **None** (since `gsc` is a local command-line tool).
|
|
120
|
+
* **API restrictions:** (Optional) Select **Restrict key** → check **PageSpeed Insights API**.
|
|
121
|
+
* Click the blue **Create** button.
|
|
122
|
+
* Copy the generated key (`AIzaSy...`).
|
|
123
|
+
|
|
124
|
+
3. **Save Your Key:**
|
|
125
|
+
```bash
|
|
126
|
+
gsc config set pagespeed_api_key AIzaSyYourKeyHere
|
|
127
|
+
|
|
128
|
+
# Or pass as environment variable
|
|
129
|
+
export PAGESPEED_API_KEY=AIzaSyYourKeyHere
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
4. **Run Speed Audits:**
|
|
133
|
+
```bash
|
|
134
|
+
# Mobile Core Web Vitals (Default)
|
|
135
|
+
gsc speed https://example.com
|
|
136
|
+
|
|
137
|
+
# Desktop Core Web Vitals
|
|
138
|
+
gsc speed https://example.com --strategy desktop
|
|
139
|
+
|
|
140
|
+
# Correlate CWV with Google Search Console traffic
|
|
141
|
+
gsc speed-correlate https://example.com
|
|
142
|
+
```
|
|
116
143
|
|
|
117
144
|
---
|
|
118
145
|
|
|
@@ -152,9 +179,12 @@ gsc import clip
|
|
|
152
179
|
|
|
153
180
|
### Option B: Direct API Integration
|
|
154
181
|
If you prefer automated terminal lookups without using the browser extension:
|
|
155
|
-
1. Get an API key from [Keywords Everywhere](https://keywordseverywhere.com
|
|
182
|
+
1. Get an API key from [Keywords Everywhere](https://keywordseverywhere.com/?fpr=us25sg) *(referral link that supports gsc-cli development)* ($1.25 one-time for 100,000 credits).
|
|
156
183
|
2. Save your key:
|
|
157
184
|
```bash
|
|
185
|
+
gsc connect ke <YOUR_API_KEY>
|
|
186
|
+
|
|
187
|
+
# Or manually:
|
|
158
188
|
gsc config set keywords_everywhere_api_key your_ke_api_key_here
|
|
159
189
|
|
|
160
190
|
# Or pass as environment variable
|