Scripts2026年7月20日·1 分钟阅读

Gogcli — Google Workspace in Your Terminal

Access Gmail, Google Drive, Google Calendar, and Google Contacts from the command line. Manage your Google Workspace without leaving the terminal.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 29/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
CLI Tool
安装
Single
信任
信任等级:Established
入口
Gogcli
安全暂存命令
npx -y tokrepo@latest install 38eeef7e-847f-11f1-9bc6-00163e2b0d79 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

Introduction

Gogcli brings Google Workspace services to the command line. It provides fast, scriptable access to Gmail, Google Drive, Calendar, and Contacts without opening a browser, enabling developers and power users to manage their Google ecosystem entirely from the terminal.

What Gogcli Does

  • Lists, reads, and manages Gmail messages and threads from the terminal
  • Uploads, downloads, and organizes Google Drive files via CLI commands
  • Views and creates Google Calendar events from the command line
  • Searches and manages Google Contacts
  • Supports piping and scripting for automation workflows

Architecture Overview

Gogcli is a Go binary that authenticates via OAuth 2.0 and communicates directly with Google Workspace APIs. It caches authentication tokens locally and uses efficient pagination to handle large datasets. The CLI is structured with subcommands for each Google service, following standard Unix conventions for flags and output formatting.

Self-Hosting & Configuration

  • Install via go install or download pre-built binaries
  • Authenticate with a one-time OAuth flow through your browser
  • Configure default account and output format preferences
  • Tokens are stored locally in your home directory
  • Supports multiple Google accounts with profile switching

Key Features

  • Unified CLI for Gmail, Drive, Calendar, and Contacts
  • OAuth 2.0 authentication with local token caching
  • Scriptable output for automation and piping to other tools
  • Fast Go binary with minimal dependencies
  • Multi-account support with profile management

Comparison with Similar Tools

  • Google Cloud CLI (gcloud) — focused on GCP infrastructure; Gogcli targets Workspace productivity apps
  • isstrategly/gdrive — Google Drive CLI only; Gogcli covers Gmail, Calendar, and Contacts as well
  • mutt/neomutt — terminal email clients; Gogcli provides a unified interface across all Google Workspace services
  • gcalcli — Google Calendar CLI; Gogcli adds Gmail, Drive, and Contacts in one tool

FAQ

Q: Is it free to use? A: Yes, Gogcli is open source. You use it with your own Google account.

Q: Does it support Google Workspace (business) accounts? A: Yes, it works with both personal Gmail and Google Workspace business accounts.

Q: Can I use it in scripts and cron jobs? A: Yes, once authenticated, the tool can run non-interactively using cached tokens.

Q: Is my data sent anywhere besides Google? A: No, Gogcli communicates directly with Google APIs. No third-party services are involved.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产