Back to Blog
Claude Code

This Free CLI Just Ended Browser Tabs (Google Workspace CLI for Claude Code)

10 min read
This Free CLI Just Ended Browser Tabs (Google Workspace CLI for Claude Code)

If you’re using Claude Code and haven’t connected it to Google Workspace yet, you’re missing about half of what it can do for your business.

I just set up the whole thing for my agency. Claude Code now has full access to my company’s Google Drive, Gmail, Calendar, and Docs. I can tell it to do anything I’d normally do in a browser. And it just does it.

Why This Matters for Business Owners

I’m Charles Dove. I run CC Strategic Consulting with my partner Chris Kahler. I build in public over at Charlie Automates on YouTube and share everything that actually works.

Here’s what I noticed. If you run a business on Google Workspace, you probably have about 15 browser tabs open at any given moment. Gmail, Drive, Calendar, and a couple of Google Docs. Every time you go check your calendar to schedule an event, you’re leaving the work you were doing.

What if Claude Code could handle all of that for you?

Imagine you’re in the terminal and you say, “Check my calendar.” And it does it. “Send an email to Chris.” It sends it. This isn’t theoretical. I set it up and it works.

The tool is called Google Workspace CLI. It’s open source. It’s free. And it gives Claude Code access to your entire Google ecosystem.

What Is the Google Workspace CLI?

The Google Workspace CLI (called gws in the terminal) is an open-source command-line tool that connects Claude Code to your Google Workspace account. Once installed, Claude can interact with over 46 Google API connections.

That means Gmail, Calendar, Drive, Docs, Sheets, Slides, Tasks, Meet, Chat, and more. All from the terminal. No browser needed.

Think of it this way. Every Google Workspace action you do manually in Chrome is now something Claude Code can chain together for you. Calendar, email, Drive, Docs. It’s an AI assistant that actually runs inside your business.

The One-Time Setup (20 Minutes)

Here’s the thing about this setup. It’s a one-time deal. 20 minutes and you’ll never have to touch it again. I’m not going to show you the polished version. I’m going to show you the setup from scratch, including the part where I had to troubleshoot an encryption issue that almost stopped the whole process.

Don’t be intimidated. It’s simpler than it looks. Anybody can set this up from beginner to expert.

Step 1: Install the CLI

The first thing I do is grab the link of the repo and feed it to Claude. I ask it to install the CLI and tell me exactly what I need to do.

Take the command Claude gives you, open a new terminal, paste it in, and go. If you run into any issues, just take what you find and feed it back to the main terminal. Claude will troubleshoot with you.

While it’s downloading, Claude will also install the Google Cloud SDK if you don’t have it already. Let it do its thing.

Step 2: Authenticate with Google

Once the CLI is installed, you’ll need to authenticate. The CLI will open your browser. Log in with your Google Workspace email. Click allow.

Here’s a tip. If you’re not sure which option to pick during the OAuth setup, just ask Claude. I didn’t remember which OAuth client type to use, so I asked. The answer: Desktop App.

Step 3: Create a Google Cloud Project

Go to console.cloud.google.com. Log in. Create a new project. I called mine “Claude Google Space.” The name doesn’t really matter.

Once the project exists, it’s already inside your workspace. Click escape. Run gws setup again. Paste back in. Your email will already be set up.

This part trips some people up, but it’s straightforward. Follow these steps:

  1. Go to the OAuth consent screen in your Google Cloud project
  2. Choose “External” for user type
  3. Enter your email as the user support contact
  4. Click Next, then Finish and Agree
  5. Click Create

Then create an OAuth client. Choose “Desktop App.” Click Create. Copy the client ID and the client secret.

Step 5: Configure Your .env File

If you don’t already have an .env file set up, this is where your API keys, passwords, and codes all live. Claude Code references these values when connecting to services. Paste your OAuth client ID and client secret in there.

Step 6: Add Yourself as a Test User

Go back to Google OAuth platform. Click Audience. Then Test Users. Add your email address. Make sure you type the full email with .com at the end. I missed that the first time.

Step 7: Run the Auth Login

Come back to your terminal. Type gws auth login. Click yes for all the prompts. Open the browser link it gives you. Log into your account. Select all permissions. Click continue.

You should see “Success.” That’s it. You’re connected.

Step 8: Enable the APIs

The final step is enabling all the Google APIs. Claude will tell you exactly which ones to enable. Follow its process and you’re done.

To confirm everything works, just paste the output back into Claude and ask, “Are we good?” Claude will verify the connection.

The Five Features I Demoed Live

Once the setup was done, I tested all five core features right from the terminal. Here’s what happened.

1. Google Calendar

I asked Claude what kind of events I had going on for the week. It pulled every event on my calendar. I could see my whole week without ever opening Google Calendar.

Then I took it a step further. I asked Claude to set up a calendar event called “Chilling and Clauding” at 5:00 PM EST tomorrow and invite my other email. Instantly created. Event available. Awaiting guest acceptance.

The use case here is obvious. You can check your schedule, create events, and invite people. All without touching Chrome.

2. Gmail

I told Claude to send Chris an email. I gave it a bit of context and how to format it. Claude drafted the email, signed it as “Claude, Charles’s assistant,” and sent it.

The email went through. Chris got it. It was formatted nicely. And there’s room for more customization. You could set up templates, tone rules, or signature preferences.

3. Google Drive

I asked Claude to take a look at my Google Drive. This was an old drive, so I didn’t know what would come up. Claude was smart about it. It knew there was a lot of clutter, so it only showed me the 25 most recent files.

What was really interesting is that Claude noticed most of my drive consisted of shared files from my CC Strategic drive. It identified the structure without me explaining anything.

You can ask Claude to look into shared files, specific folders, or search for particular documents. The use cases here are wide open.

4. Google Docs (Reading)

This is where it gets powerful. I asked Claude to read a Google Doc called “Clarity Effects SMS Campaign.” It was a compliance document.

Claude pulled open the document, grabbed all the content, and told me exactly what kind of compliance sheet it was. What it explains. Key resources. Everything. Without me ever having to open the doc.

The only reason I had Docs open in the browser during the demo was to show you it was really working behind the scenes. In practice, you’d never need to open Chrome.

5. Google Drive (Uploading)

The reverse of reading docs is uploading directly from the terminal. I had a handoff document locally, so I fed it to Claude and asked it to upload to my Drive.

Claude turned the document into an entire Google Doc and uploaded it. I can ask it to format it, fix it, whatever I want. I could push PDFs, CSVs, images, anything. I tell it to upload to the drive or into a specific folder. And that’s it.

All my reports get uploaded automatically. No more dragging files into browser tabs.

The Real Power: Chaining Actions Together

Those five features are nice on their own. But here’s the part that changes everything for business owners.

This isn’t just about saving a few tab switches. This is about giving Claude Code the ability to operate inside your business infrastructure.

Imagine telling Claude Code this in one conversation:

  1. Check if I have any meetings open tomorrow
  2. Draft an email to the prospect I’m meeting with
  3. Upload the proposal document to Drive
  4. Add contacts from the proposal into the email
  5. Add meeting notes to our shared doc after the call

That’s one conversation with Claude. No tabs. No manual steps. Every Google Workspace action is something Claude Code can chain together for you. Calendar, email, Drive, Docs. It’s an AI assistant that actually runs inside your business.

What Else Does the Google Workspace CLI Support?

I demoed five features, but the CLI actually has over 46 API connections. Here’s what else you can access:

  • Google Sheets for spreadsheet data, reports, and tracking
  • Google Slides for presentations
  • Google Tasks for to-do management
  • Google Meet for meeting management
  • Google Chat for team messaging
  • Google Forms for form creation and responses
  • Google Keep for notes
  • Google People for contact management

If you’re running an agency or a business on Google Workspace, this is the single highest value Claude Code setup you can do this week.

Troubleshooting Tips

I hit a few snags during setup. Here’s how to handle the most common ones.

Encryption issue during install: I ran into an encryption error that almost stopped the whole process. The fix was feeding the error back to Claude in the main terminal. Claude diagnosed it and told me exactly how to resolve it.

Forgot to type .com: When adding myself as a test user, I forgot to include “.com” at the end of my email. Small thing, but it blocked the entire auth flow. Double-check your email format.

Project not selected: I got stuck because I hadn’t selected the right project in Google Cloud Console. Make sure you click into your project before running the setup commands.

Browser not loading: Sometimes the OAuth browser window doesn’t open automatically. Take a screenshot of where you’re stuck, paste it into Claude, and tell it what’s happening. Claude will walk you through it.

The golden rule: If something breaks, copy the error, paste it into Claude, and let it troubleshoot for you. That’s literally the point of using Claude Code for this.

FAQ

Is the Google Workspace CLI free?

Yes. It’s completely free and open source. You can find it on GitHub. There are no licensing fees or subscriptions. The only cost is your Claude Code subscription, which you already have.

Do I need to be technical to set this up?

No. I walked through the entire setup in the video from scratch. If you can copy and paste commands into a terminal, you can do this. And if you get stuck, Claude itself will help you troubleshoot. That’s the whole point.

Is it safe to give Claude access to my Google account?

The CLI uses OAuth 2.0, which is the same authentication standard used by every major app that connects to Google. You control which permissions to grant. You can revoke access at any time from your Google account settings. Your credentials are stored locally on your machine.

How long does setup take?

About 20 minutes. It’s a one-time setup. Once you’ve authenticated and enabled the APIs, you never have to do it again.

Can Claude read my private Google Docs?

Claude can access any document that the authenticated Google account has access to. That includes personal documents, shared documents, and team drives. Be mindful of what you ask Claude to read or share.

Does this work with Google Workspace for business or just personal Gmail?

It works with both. I set it up with my business Google Workspace account at CC Strategic. If you have a personal Gmail with Google Drive, that works too.

Can Claude send emails on my behalf?

Yes. Claude can compose and send emails through Gmail. In my demo, Claude sent an email to my business partner Chris and signed it as “Claude, Charles’s assistant.” You can customize the format, tone, and signature to match your preferences.

What if I have multiple Google accounts?

You can authenticate with whichever account you want during setup. If you need to switch accounts, you’d run through the auth process again. Keep your OAuth credentials organized.

Can Claude upload files to specific folders in Drive?

Yes. You can tell Claude to upload files to your root Drive or into specific folders. I demonstrated uploading a local handoff document that Claude converted into a Google Doc automatically.

How many API connections does the CLI have?

Over 46 API connections across Gmail, Calendar, Drive, Docs, Sheets, Slides, Tasks, Meet, Chat, Forms, Keep, and People. The five I demoed are just the start.

Try It This Week

The tool is open source. It’s free. And it has over 46 API connections. If you’re running a business on Google Workspace, this is one of the most practical Claude Code setups you can do right now.

20 minutes of setup. Never touch it again. And your terminal becomes the hub for your entire Google ecosystem.

Want to go deeper with Claude Code and AI automation? Join CC Strategic AI on Skool. I share the exact setups, workflows, and troubleshooting I don’t put on YouTube. It’s free to join.

If you want to work with me directly on setting up systems like this for your business, book a call with CC Strategic.

And if you want 1-on-1 coaching to build your Claude Code skills from the ground up, work with me 1-on-1.

Charlie Automates. I’ll see you on the next one.