analytics
Google Search Console CLI for CI
Use the Google Search Console CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
9 functions 5 read 4 write OAuth browser flow auth
Google Search Console CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. The Google Search Console CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Google Search Console CLI for CI
kosmokrator integrations:configure google_search_console --set access_token="$GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call google_search_console.google_search_console_add_site '{"site_url":"example_site_url"}' --json Discovery Before Execution
Agents and scripts can inspect Google Search Console docs and schemas before choosing a function.
kosmo integrations:docs google_search_console --json
kosmo integrations:docs google_search_console.google_search_console_add_site --json
kosmo integrations:schema google_search_console.google_search_console_add_site --json
kosmo integrations:search "Google Search Console" --json
kosmo integrations:list --json Useful Google Search Console CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
google_search_console.google_search_console_add_site | Write | site_url | Add a new site property to Google Search Console. |
google_search_console.google_search_console_delete_site | Write | site_url | Remove a site property from Google Search Console. |
google_search_console.google_search_console_delete_sitemap | Write | site_url, sitemap_url | Remove a sitemap from Google Search Console. |
google_search_console.google_search_console_get_sitemap | Read | site_url, sitemap_url | Get details of a specific sitemap in Google Search Console. Returns the sitemap's path, last submitted/downloaded dates, whether it's a sitemap index, and content type breakdown with submitted vs indexed URL counts. |
google_search_console.google_search_console_inspect_url | Read | site_url, url | Check a URL's indexing status in Google Search Console. Returns: index verdict, coverage state, last crawl time, robots.txt state, indexing state, rich results, mobile usability, and AMP status. |
google_search_console.google_search_console_list_sitemaps | Read | site_url | List all submitted sitemaps for a Google Search Console property. Returns each sitemap's path, last submitted/downloaded dates, whether it's a sitemap index, and content type counts (submitted vs indexed URLs). |
google_search_console.google_search_console_list_sites | Read | none | List all verified Google Search Console sites/properties with their permission levels. Use this first to discover available properties before querying performance data or inspecting URLs. Returns each site's URL (e.g., "sc-domain:example.com" or "https://www.example.com/") and your permission level. |
google_search_console.google_search_console_performance | Read | site_url, start_date, end_date, dimensions, filters, limit, offset, type, data_state, aggregation_type | Query Google Search Console search performance data (clicks, impressions, CTR, position). Common queries: "top pages by clicks" → dimensions=["page"]. "Top search queries" → dimensions=["query"]. "Traffic trend" → dimensions=["date"]. "Mobile vs desktop" → dimensions=["device"]. "Blog section" → dimensions=["page"], filters=[{dimension:"page", operator:"contains", value:"/blog/"}]. Combine dimensions: dimensions=["query","device"] for queries by device. |
google_search_console.google_search_console_submit_sitemap | Write | site_url, sitemap_url | Submit a new sitemap to Google Search Console. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.