Skip to content

spookyuser/datastudio-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datastudio-cli

CLI for querying Looker / Data Studio dashboards via public batchedDataV2 endpoint.

Includes Claude Code plugin (plugin/) — datastudio-qa to verify dashboard numbers against source Excel file.

What you need

  1. Python 3.11+ and uv.
  2. Dashboard URL — Looker Studio reporting URL shared with anonymous viewers.
  3. (Optional, for QA) Source .xlsx dashboard built from.

Installing the skills

Skills live in plugin/skills/ and work with any agent that supports the Claude SKILL.md format (Claude Code, Cursor, Codex, OpenCode, Cline, Gemini CLI, Copilot, Windsurf, and others).

With npx skills (any supported agent) — see vercel-labs/skills:

# install both skills globally for Claude Code
npx skills add spookyuser/datastudio-cli -g -a claude-code -y

# or target a different agent (cursor, codex, gemini-cli, ...)
npx skills add spookyuser/datastudio-cli -g -a cursor -y

# pick a single skill
npx skills add spookyuser/datastudio-cli --skill datastudio-qa -g -a claude-code -y

Claude Code plugin (marketplace):

/plugin marketplace add spookyuser/datastudio-cli
/plugin install datastudio-cli@datastudio-cli

Local dev: launch Claude Code with claude --plugin-dir ./plugin from repo root.

Skip the approval prompts (Claude Code)

Claude Code asks before each datastudio call unless you pre-approve. Add this to ~/.claude/settings.json (or the project's .claude/settings.json):

{
  "permissions": {
    "allow": ["Bash(datastudio:*)"]
  }
}

Once loaded, prompts like these auto-trigger datastudio-qa skill:

  • "QA the dashboard against the Excel"
  • "Verify the Overall Engagement page"
  • "Check what happens when I filter Contract Hire to Local"
  • "Audit the dashboard against the source Excel"

Claude runs CLI — connect, navigate pages, extract component data, apply filters, compare to Excel, report discrepancies. See plugin/skills/datastudio-qa/SKILL.md for workflow.

Running the CLI yourself

uv run datastudio connect "https://lookerstudio.google.com/u/0/reporting/<id>/page/<page-id>"
uv run datastudio pages
uv run datastudio go "<page name>"
uv run datastudio data --format json
uv run datastudio filter <Dimension> <Value>
uv run datastudio filter reset

Session state persists in .datastudio/

Each component has own columns — not single flat table, but concatenation. For single-table dump, pick one component with --component <token>. For spreadsheet mixing heterogeneous components, use --format json and flatten to preferred shape.

Tests

uv run pytest

About

cli for datastudio

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages