Skip to content
Back to skills

Grr

ASecurity

Use grr, a fast Rust CLI for Google Workspace (Gmail, Calendar, Drive, People, Chat, Forms, Tasks, Docs, Sheets, Slides, Apps Script, Analytics, Search Console), whenever the user wants to read or write Google data from a terminal, script, or agent. Discover methods before calling, predict command names from method ids, and parse JSON from stdout.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 29, 2026
ai-agentsrustgotestingapi

Works with

  • claude code
  • claude desktop
  • cursor
  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned November 29, 2026

npx -y skills add debanjanbasu/grr-cli --skill grr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Grr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Grr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/debanjanbasu-grr/badge)](https://www.skillsdirectory.com/skills/debanjanbasu-grr)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: grr
description: Use grr, a fast Rust CLI for Google Workspace (Gmail, Calendar, Drive, People, Chat, Forms, Tasks, Docs, Sheets, Slides, Apps Script, Analytics, Search Console), whenever the user wants to read or write Google data from a terminal, script, or agent. Discover methods before calling, predict command names from method ids, and parse JSON from stdout.
---

# grr — Google Workspace from the terminal

One binary, one OAuth login, **402 methods across 14 Google APIs**, JSON on stdout. The entire command tree is generated from Google's Discovery Service, so the move is always the same: discover what exists, then call it.

## Progressive loading

This is the CORE skill. When the work concentrates on one service, also load that service's generated skill — `skills/gmail/SKILL.md`, `skills/calendar/SKILL.md`, … (14 total) — for its method surface, verified examples, and scope caveats. Load this core first; pull a service skill only when needed.

## Golden rule: DISCOVER FIRST

Never guess a method id, parameter, or scope. All of these work offline, before any login:

```sh
grr schema                                          # the full command tree as JSON — the machine contract
grr api list [--service X] [--filter SUBSTR] [--grouped]   # browse every method
grr api describe <method-id>                        # params, required flags, scopes, verb, URL for one method
```

Read `describe` before any first call — it is the authority on required parameters, repeats, and enums. `grr <service> --help` gives the same for one branch.

## Predict any command from its method id

Service commands mirror Discovery method ids exactly; dots become spaces:

```sh
gmail.users.messages.list       ->  grr gmail users messages list
calendar.events.list            ->  grr calendar events list
drive.files.list                ->  grr drive files list
sheets.spreadsheets.values.get  ->  grr sheets spreadsheets values get
tasks.tasklists.list            ->  grr tasks tasklists list
```

Top level: `grr auth | api | ask | completions | mcp | schema | skills | transport` plus one subcommand per service (gmail, calendar, drive, people, chat, forms, tasks, docs, sheets, slides, script, analyticsadmin, analyticsdata, searchconsole). Resources nest as subcommands; each method is a leaf that also carries its bare name as a visible alias (`list`, `get` — camelCase methods keep their casing, e.g. `getProfile`).

Flags are generated from the same ids, camelCase → kebab-case:

```sh
grr gmail users messages list --user-id me --q "is:unread" --max-results 5 \
    --label-ids INBOX --label-ids UNREAD --include-spam-trash
```

- Integers parse as numbers, booleans are presence flags, repeated parameters repeat, enum parameters validate, required parameters are enforced.
- A parameter named `format`, `query`, `params`, `body-file`, `dry-run`, or `help` would collide with the shared escape hatches, so it is exposed as `--param-format` / `--param-query` / … (escape-hatch collision rule).
- Request bodies are untyped by design: pass JSON via `--params`, or a file/stdin via `--body-file PATH|-`. Typed flags win over `--params` on conflict.
- Every leaf also accepts `--params`, `--body-file`, repeatable `--query KEY=VALUE` (raw query pairs), `--dry-run`, and `-f json|jsonl|table|pretty` (default json).

## Output contract

- **stdout is data; stderr is logs.** Default output is JSON, so `grr … | jq` always works.
- **Non-zero exit on failure.** Errors land on stderr and are actionable: a 403 names the missing scope, an unknown method id gets ranked suggestions, a missing required parameter names itself.
- **`--dry-run` before anything destructive.** It prints the resolved verb, URL, body, and scopes as JSON and sends nothing — the cheapest correctness check there is.
- Plain-text exceptions (do not JSON-parse): `grr transport`, `grr skills install` (a human install summary), `grr auth login --device` (prints URL + code before the JSON), and `grr --version` (a banner, not data &mdash; its **first line is the semver**, `grr <x.y.z>`; the rest is the mascot).
- `grr --version` may carry ANSI colour when stdout is a 24-bit-colour terminal. Read the version with `head -1`, or `NO_COLOR=1 grr --version | head -1`, never with a whole-output parse.

## Agent skills: install and self-migration

`grr skills install` copies the 16 packaged skill files (this file, the 14 service skills, and the index) into `~/.agents/skills/` — offline, no auth, zero config; `--claude` also mirrors them into `~/.claude/skills/` (the one directory Claude Code reads).

Installs are provenance-tracked and self-migrating:

- `grr skills install` records a manifest beside the files (`~/.agents/skills/.grr-skills.json`): the grr version, the packaged content it installed, and the exact bytes it wrote. A per-file backup under `.grr-backup/` is the 3-way merge base.
- After a version change, the next grr command runs the migration **lazily** — one manifest read; nothing is hashed when the recorded version matches the running binary. Then, per file:
  - never touched since install → replaced with the new packaged content;
  - locally edited where the packaged side changed elsewhere → **3-way merged**, the local edit kept;
  - a genuine conflict → your file is left untouched and the new packaged copy is written beside it as `<name>.grr-incoming`, with one note on stderr.
- `--force` still overwrites regardless. A file grr never installed is never touched (no manifest entry = not ours).
- `grr skills list` reports per target and file: `current`, `outdated` (packaged moved, local untouched), `locally-modified`, `missing`, or `unmanaged`.

stdout stays JSON for `grr skills list`; `grr skills install` prints a human summary (a documented plain-text exception).

## Auth state

- `grr auth status` — check first. One live `gmail.users.getProfile` call; JSON `{authenticated, email, …}`; non-zero exit when there is no valid credential. Do not retry auth failures in a loop.
- `grr auth login` — PKCE browser flow. `grr auth login --device` for headless machines (prints a URL + code; a human still approves it). The device flow needs a client of type "TVs and Limited Input devices" (`GRR_OAUTH__DEVICE_CLIENT_ID`, or `device-client-id` in `~/.grr/config.toml`); when it is missing the command says so and exits — surface that, do not retry. A device login is also *narrower*: Google caps that flow at drive.file, calendar, calendar.readonly, the legacy Calendar/Contacts feeds, userinfo and openid, so a 403 on Gmail/Chat/Docs/Tasks after a device login is the flow's ceiling, not a stale grant — say that instead of recommending another login. A BYO-client project in **Testing** mode authorizes only the accounts on its **Audience → Test users** list: for any other account Google renders the consent page and then refuses to complete it — no error, no redirect, just a page that never finishes — and the 5-minute callback timeout is what the user sees. That is a project setting, not a grr bug: point them at that list instead of retrying the login. The same silent hang also comes from a scope the project has not **declared** (Scope: Data access) or whose API is disabled (API library) — declare the whole set in batches, after enabling the APIs, and retry then.
- Release binaries are zero-config (an OAuth client is compiled in). Source builds need `grr auth setup` first.

## Scope honesty

`grr auth login` requests a **small default set** — Gmail, Drive, Calendar, Tasks, Docs, Sheets, Slides, and the sign-in scopes — because Google's consent screen stops submitting past roughly 27 ticked boxes on an unverified project, with no error at all; asking for the whole index (~112 scopes) makes a first-time login impossible. Widen deliberately: `grr auth login --service docs` adds one service's scopes (from the same index `grr api describe` reads), `--all-scopes` asks for everything. Every login sends `include_granted_scopes`, so a request merges with what the account already holds and widening never drops access. Chat's app-authentication scopes (`chat.bot`, `chat.app.*`, `chat.import`) are never requested: a user consent screen cannot show them, and one of them fails the whole authorization with `invalid_scope`. A 403 therefore means a scope outside the current grant more often than it means a stale one: name the scope from `grr api describe` and point at `grr auth login --service <name>`, or at the Cloud project if the API is not enabled.

## Safety profiles — global flags, honored everywhere

`--readonly`, `--deny-service <name>`, `--deny-verb <VERB>` are global: they parse before or after the subcommand, and the gate covers the generated tree, `grr api call`, and `grr mcp` alike.

```sh
grr --readonly gmail users messages delete --user-id me --id abc   # refused: DELETE
grr gmail users messages delete --user-id me --id abc --readonly   # same refusal
grr --deny-service chat chat spaces list                            # refused: the chat service
```

An agent driving grr for a user should pass `--readonly` unless the user asked for a write — it converts every destructive method into an actionable error instead of a side effect.

## Multi-account

`grr auth login --account work` and `grr auth status --account work`: each named account keeps its own token in the OS keyring (the default account's naming is untouched). Names are validated: trimmed, lowercased, no spaces/colons/slashes. `--account` is accepted by `auth login` and `auth status` **only** — every service command authenticates as the *default* account, so never tell a user to pass `--account` to a service call (clap rejects it). To work as a named account, log it in without `--account` so it becomes the default (that replaces whichever token was there), or reach for `grr api` after switching.

Scripts, agents, and CI: set `GRR_TOKEN_STORE=file` before anything else. It keeps grr away from the OS keyring — where an approval prompt on an unsigned binary parks the command until a human clicks, which is a hang from an agent's point of view — and stores the token in `<cache dir>/grr/token.json` instead (one file per named account). Any other value, or none, keeps keyring-first auto-detection.

## MCP server: `grr mcp`

`grr mcp` serves a Model Context Protocol (JSON-RPC 2.0 over stdio) server exposing every method in the index as a typed MCP tool:

- Tool name = the dotted method id (`gmail.users.messages.list`); `tools/list` returns every tool with an inputSchema built from Discovery (typed properties, required list, enum values) plus `params`/`body_file`/`query`/`dry_run`.
- `tools/call` runs through the same engine as the CLI — results come back as JSON text content; errors are `isError` results, never a dead server.
- Connect any MCP client: register `grr mcp` as a stdio server (Claude Desktop, Gemini CLI, VS Code, Cursor). `--readonly` gives a server that refuses writes.
- Protocol: `2026-07-28` — the stateless revision. Call `tools/*` inline; `server/discover` reports `supportedVersions` plus the server identity (also carried in every result's `_meta`). A minimal legacy `initialize` handshake is also answered so standard clients connect; other legacy RPCs (`ping`, `logging/setLevel`) fail with an error naming the revision to speak.
- The stream is stdout; logs go to stderr. Do not print to the stream.

## Natural language: `grr ask`

`grr ask "<request>"` turns plain English into a typed method + parameters using a System One model (TypeSafe's Jev by default; any provider speaking the same contract works by config — `[systemone] endpoint/model` in `~/.grr/config.toml`, `TYPESAFE_API_KEY` in the env):

- Hierarchical classification: service (14 options) → method (≤79) → one typed question per required parameter. Every candidate is code-supplied from the discovery index — the model can only select, never invent.
- **It prints the PLAN by default** (method, params, url, scopes, confidence as JSON) and sends nothing. `--run` executes through the same engine as `grr api call`.
- Confidence below the threshold (default 0.6) is flagged, not hidden. Planning needs no Google credential — only the API key.

```sh
grr ask "show my unread gmail"                    # -> gmail.users.messages.list, {"userId":"me"}, the plan
grr ask "next week's calendar" --run              # judge + execute
```

## The flat escape hatch: `grr api`

Any method by id, no tree walking — the same engine, byte-identical requests:

```sh
grr api list --service sheets
grr api describe sheets.spreadsheets.values.get
grr api call sheets.spreadsheets.values.get --param spreadsheetId=1AbC… --param range=Sheet1!A1:B10
grr api call gmail.users.messages.list --param userId=me --dry-run   # identical to: grr gmail users messages list --user-id me --dry-run
grr api refresh [--service X]   # pull the Discovery index forward between releases
```

Prefer the generated tree for readability — `grr api call` adds no power. Reach for `grr api` when composing method ids dynamically.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.