1---2name: google-drive3description: Operate Google services from the terminal using gog. Use when requests involve Gmail, Calendar, Chat, Classroom, Drive, Docs, Slides, Contacts, Tasks, People, Sheets, Forms, Apps Script, Groups, or Keep workflows, including auth checks, data listing/search, file transfer, and command automation.4---56# Google Services (gog)78## Supported Services910- Top-level service commands in `gog -h`:11 `gmail`, `calendar`, `chat`, `classroom`, `drive`, `docs`, `slides`, `contacts`, `tasks`, `people`, `sheets`, `forms`, `appscript`, `groups`, `keep` (Workspace only).12- OAuth values in `gog login --services`:13 `gmail`, `calendar`, `chat`, `classroom`, `drive`, `docs`, `slides`, `contacts`, `tasks`, `sheets`, `people`, `forms`, `appscript`, plus `user` and `all`.1415## Quick Start16171. Confirm CLI and service commands:1819```bash20gog -h21gog drive -h22gog <service> -h23```24252. Confirm auth:2627```bash28gog status29# if needed30gog login <email> --services all31```32333. Prefer stable output for automation:34- Use `-j --results-only` for JSON pipelines.35- Use `-p` for parseable plain text.3637## Common Commands3839```bash40# list files41gog drive ls --max 5042gog drive ls --parent <folderId> --max 1004344# search45gog drive search "<query>" --max 504647# metadata48gog drive get <fileId>4950# transfer51gog drive upload <localPath> --parent <folderId>52gog drive upload <localPath> --replace <fileId>53gog drive download <fileId> --out <path>5455# organize56gog drive rename <fileId> "<newName>"57gog drive move <fileId> --help5859# delete (trash by default)60gog drive delete <fileId>61```6263## Guardrails6465- Run mutating commands with `--dry-run` first when supported.66- Use `--account <email>` when multiple Google accounts are configured.67- Use `--no-input` for CI/non-interactive runs.68- Use `--permanent` only if the user explicitly requests irreversible delete.6970## Troubleshooting7172- If auth fails, run `gog status` then `gog login <email> --services drive`.73- If flags are unclear, run `gog drive <subcommand> -h`.