Gogcli is a lightweight and efficient terminal tool that supports various Google services such as Gmail, calendar, cloud disk, documents, forms, Chat, classroom, contacts, and tasks. You can install Homebrew (brew install steipete/tap/gogcli), add OAuth credentials and authorize the account to use it (gog auth add [email protected]). Support JSON format output for easy script call, securely manage multiple accounts, and adopt a minimum authorization mechanism. You don’t need to open a browser or application to search/send emails, create schedules, upload files, track email reading status, and automate tasks directly on the command line, greatly saving operating time.
To be honest, Google Workspace is now more and more like a “bloated monster.” Every time you want to reply to a Gmail message or check your calendar, you have to wait for that colored circle to spin around in your browser, and then jump across a bunch of tabs. For a developer who is accustomed to the command line and pursues extreme response speed, this “context switching” is simply the number one killer of concentration. I’ve been thinking, can I just do it with Google in the black box, just like operating Git or viewing the process?
At this time, I ran into gogcli(Let’s simply call it gog)。
Who is it? And why it?
Before talking about the technical details, you have to look at the origin of this thing. The author of gogcli is Peter Steinberger. If you are in the iOS development circle, you will definitely know that he is the founder of PSPDFKit. The tools produced by this guy have always been famous for being “steady, fast and ruthless”. There is actually no shortage of Google-related CLIs on the market, such as the old ones gdrive or someone who specializes in receiving email mutt, but gog is even more ambitious: it wants to be aOmnipotent, modern, JSON-enabled Google Service Bus。
It not only transfers the functions of the web version, but reconstructs the workflow with a “terminal-native” thinking. It supports Gmail, calendars, cloud drives, documents, forms, and even Chat, Classroom and Google Tasks. This “family bucket” integration allows you to basically say goodbye to the bloated Chrome tab once you configure it.
The feeling of “taking off instantly” configuration
Many people are afraid to configure OAuth when they see command-line tools, and feel that clicking on Google Cloud Console is like walking through a maze. Indeed,gog Configuration requires a little patience. You need to create a Google Cloud project, enable the corresponding API, and then download the heavy credentials.json。
But once you run it gog auth add [email protected] After successfully feeding the JSON to it, the magic happened. it usesprinciple of least privilege, this is very important. Many unreliable third-party tools ask for all your account permissions at once, but gog Allows you to authorize gradually as needed. And its support for multiple accounts is simply “godlike”. You can seamlessly switch between corporate and private accounts without having to switch identities by clicking on the avatar in the upper right corner as frequently as in the browser.
Core module: Not just a “substitute”
take Gmail Generally speaking, although the web version of search email is powerful, it is gog In front of it, it seems a bit “sluggish”. In the terminal, you can use powerful filtering syntax to locate the attachment hiding in the corner in seconds. What’s even more amazing is itsEmail tracking function。This used to usually require the installation of expensive browser plug-ins, but now you can track whether emails have been read directly from the command line, a sense of control that the web cannot give.
let me talk about Google Drive。The official Drive client always wants to sync all your files and fill your hard drive. but with gog Drive is like a “remote mount disk” with unlimited capacity. What documents do you need? One line gog drive download It came down; the finished code document, one line gog drive upload I went up. This operating logic is very consistent with developers ‘”access on demand” habits.
Geeks ‘favorite “Lego model”
If it is just a simple command substitution, then it can only be a good tool, not a “artifact”.gog What really makes it stand out is its appreciation JSON output Perfect support.
Imagine this scenario: You need to count all the emails that contain the word “invoice” for the day every afternoon, save the attachments to a folder on your Drive, and check them on your Google Calendar. If it is manual operation, how many times does it take to click the mouse? but with gog, you can cooperate jq This artifact writes a Shell script with a few lines and throws it to the system crontab To run automatically.
Even, you can use it as your local AI Agent (such as Claude Code or Cursor) “Eyes and Hands”. You can directly say in the AI dialog box: “Help me check the calendar gap between 3:00 and 5:00 p.m. yesterday, and then send an email to Lao Wang to make an appointment.” AI will automatically invoke gog To read calendars and send emails, you don’t even have to leave your hand off the keyboard.
Talk about efficiency
After all, why go to so much trouble to mess with a command-line tool? Is it to install X? (Although he is really handsome).
core reason isconcentration。The browser is a tempting place. You just want to check your schedule, but you may be pushed around by a certain news feed and it will be gone in half an hour. In the terminal, you are faced with pure data and logic.gog It gives you a “God’s perspective” so that you can no longer be led by the nose by UI designers, but instead schedule your digital assets according to your own rules.
If you are also the kind of heavy efficiency controller who “can solve the problem with a keyboard and never use a mouse”,gogcli It’s definitely worth spending an afternoon training. Although the initial configuration curve was a little steep, when you smoothly flipped through Gmail and managed cloud disks in the dark terminal for the first time, you will find that the feeling of regaining control is so fragrant.
Some tips:
- installation recommendations: Mac users directly
brew install steipete/tap/gogcli, very stable. - safety first: Don’t accidentally transfer the generated Token file and credentials to GitHub. It’s the key to your Google account.
- Explore command: Multipurpose
gog --help, its documentation is very detailed, and every sub-module has surprises.
Github:https://github.com/steipete/gogcli
Oil tubing: