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.