How to make a Google Cloud project for Workspace CLI tools
Peter Hartree
To use tools like gog and gdoc, you need to create a Google Cloud project. This takes ~10 minutes.
To do this—of course—just ask your agent to walk you through the steps. Or, if you're feeling lazy, to do it with Chrome!
The full steps are below.
N.B. A critical step, which my agent missed initially: publish the app. If you leave the app in "testing" mode, you'll be logged out every 7 days.
Create a project
- Go to console.cloud.google.com
- Click the project dropdown (top left) → New Project
- Name it something like "Agent CLI Tools" → Create
- Select the new project from the dropdown
Enable APIs
Go to APIs & Services → Library and enable each API you need. For gog and gdoc, you'll probably want:
- Gmail API
- Google Calendar API
- Google Drive API
- Google Docs API
- Google Sheets API
Search for each by name, click into it, click Enable.
Configure the OAuth consent screen
Go to APIs & Services → OAuth consent screen.
- Select External user type → Create
- Fill in the required fields:
- App name: anything (e.g. "CLI Tools")
- User support email: your email
- Developer contact email: your email
- Click Save and Continue through the remaining steps (Scopes, Test Users, Summary)—defaults are fine for now
Create OAuth credentials
Go to APIs & Services → Credentials.
- Click Create Credentials → OAuth client ID
- Application type: Desktop app
- Name: anything (e.g. "CLI")
- Click Create
- Download the JSON file—you'll need it in a moment.
Publish the app
Go to APIs & Services → OAuth consent screen and click Publish App.
Your app will be limited to 100 users, unless you verify it (hard, and takes 4-6 weeks).
Authorise your accounts
Run your CLI clients and follow their instructions to auth. You'll need that JSON file you downloaded earlier. When done, delete it.
