Google Search Console as a CLI — every report through your logged-in Chrome, no Google Cloud project, no OAuth, no API keys.
Built as an OpenCLI plugin: it drives
the Search Console web UI over the Browser Bridge, so it can read data the
official API never exposed (index-coverage reasons, links report, crawl stats).
Output is table or JSON (-f json) — designed so an AI agent can pull errors
and misconfigurations and go fix them.
npm install -g @jackwener/opencli
# install the Browser Bridge Chrome extension (see opencli docs), then:
opencli plugin install github:lukeisontheroad/opencli-plugin-gscRequirements: Node >= 20, Chrome logged in to a Google account with Search Console access.
opencli gsc sites # list your properties
opencli gsc performance --by query --days 28 # clicks/impressions/CTR/position
opencli gsc performance --by page # by page, country, device, appearance, date
opencli gsc indexing # indexed/not-indexed + reasons
opencli gsc indexing-urls "Soft 404" # URLs behind one reason
opencli gsc sitemaps # sitemap status + discovered pages
opencli gsc links --section sites # links report (UI-only data)
opencli gsc cwv # Core Web Vitals summary
opencli gsc crawl-stats # crawl stats (owner permission needed)
opencli gsc inspect https://example.com/page # URL inspection verdict
opencli gsc audit -f json # one-shot health audit for AI agents--property selects the Search Console property (resource id or any
substring, e.g. --property example); it can be omitted when the account has
exactly one property.
Search Console server-renders report data into AF_initDataCallback blocks;
performance data is fetched and decoded straight from those. Reports whose
labels are localized client-side (indexing reasons, links, crawl stats) are
read from the rendered DOM. URL inspection drives the UI search box because
the result URL uses an opaque token.
No official Google API is involved anywhere. That is the point — but it also means Google UI changes can break commands until they are updated here.
Because several reports are read from the rendered DOM, they match the
English Search Console interface. If your Google account language is set to
something else, those commands (indexing, links, cwv, crawl-stats,
audit) will not find their tables.
Install the plugin straight from a working copy — OpenCLI transpiles the TypeScript sources with esbuild at install time, so there is no build step of your own:
opencli plugin install file://$PWD # first time
opencli plugin update gsc # after editsEach command is one self-registering file: it calls cli({...}) from
@jackwener/opencli/registry at module load. To add a command, copy the
closest existing file and adjust it — there is no command index to update.
All page-scraping helpers live in _common.ts; see CLAUDE.md for how the
in-page helper library and the two extraction strategies (ds blocks vs.
rendered DOM) fit together.
Verifying a change means running the real command against a real property — there is no offline test path.
MIT — see LICENSE.