Skip to content

Add Google Search Console CLI commands and auth scopes#404

Open
aesadde wants to merge 1 commit intosteipete:mainfrom
aesadde:codex/searchconsole-cli
Open

Add Google Search Console CLI commands and auth scopes#404
aesadde wants to merge 1 commit intosteipete:mainfrom
aesadde:codex/searchconsole-cli

Conversation

@aesadde
Copy link

@aesadde aesadde commented Mar 3, 2026

Summary

  • add a new searchconsole top-level command group (aliases: gsc, webmasters)
  • implement Search Console operations:
    • sites list|get
    • searchanalytics query (plus searchconsole query shortcut)
    • sitemaps list|get|submit|delete
  • add a dedicated webmasters API client wrapper in internal/googleapi
  • extend auth service model with searchconsole and readonly/full scope resolution
  • update README with Search Console setup and quick-test examples

Why

This adds an agent-friendly, scriptable way to pull Google Search Console data from CLI while preserving gogcli's existing auth and least-privilege scope model.

Validation

  • go test ./... passes
  • gog searchconsole --help shows new command group
  • gog auth services --json includes searchconsole service/scopes

@salmonumbrella
Copy link
Contributor

Fantastic! Thank you @aesadde!

cc: @visionik

@steipete
Copy link
Owner

steipete commented Mar 8, 2026

Deep overlap with #402. The Search Console implementation lands in the same files (internal/cmd/searchconsole.go, internal/googleapi/searchconsole.go, internal/googleauth/service.go, internal/cmd/root.go, README), but with different CLI/auth/API decisions. My take: #404 is the fuller Search Console track; #402 bundles Search Console + GA4. I would not merge both Search Console implementations. Best dedupe path: choose one Search Console design, then merge GA4 separately from #402.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants