DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to script Gmail, Drive and Sheets from the terminal with Google Workspace CLI

Install gws, sign in once, and call any Workspace API with JSON in and JSON out.

Short answer: Install: npm install -g @googleworkspace/cli or brew install googleworkspace-cli; then run gws auth setup once, then gws auth login; List files: gws drive files list --params '{"pageSize": 10}'. All steps.

Credentials. OAuth tokens grant access to your mail and files; keep them on your machine and revoke them when done.

Who it is forA developer or admin who wants quick scripts against Workspace without an SDK.

The problemGoogle API clients need boilerplate for auth, paging and request bodies.

The outcomeCommands that list files, create sheets and post messages, with JSON you can pipe into jq.

What you need first

  • A Google account and a Google Cloud project for OAuth (gws auth setup walks you through it)
  • npm, Homebrew, Cargo or Nix

Steps

  1. Install: npm install -g @googleworkspace/cli or brew install googleworkspace-cli
  2. Run gws auth setup once, then gws auth login
  3. List files: gws drive files list --params '{"pageSize": 10}'
  4. Create a sheet: gws sheets spreadsheets create --json '{"properties": {"title": "Q1 Budget"}}'
  5. Check any method's schema with gws schema drive.files.list

Prompt for your agent

Install googleworkspace/cli, authenticate it, and write a script that lists my 20 most recent Drive files into a new Google Sheet called <title>. Use --dry-run first and show me the output.

Caveat. Not an officially supported Google product, and breaking changes are expected before v1.0.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for googleworkspace/cli and "Script Gmail, Drive and Sheets from the terminal"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer