Personal Project Python CLI

Google Workspace,
from the terminal.

A Python command-line tool for Gmail and Google Calendar — search, draft, and schedule without opening a browser. The CLI core works; the scheduled-automation layer around it never did, and is currently paused.

python gmail-api calendar-api cli
Documentation
GitHub →
CLI COMMAND FLOW — GWS CLI gws <cmd> User runs CLI Arg Parser Click / argparse OAuth2 Token refresh token.json cached · refresh if expired API Call Gmail / Calendar Gmail API search, draft, send Calendar API list, create, update
SYSTEM ARCHITECTURE — GWS CLI CLI LAYER COMMAND MODULES AUTH GOOGLE APIS CLI Entrypoint Click / argparse gmail.py + calendar.py Command modules google-auth OAuth2 client Gmail REST API search · draft · send Calendar REST API list · create · update token.json Cached token credentials.json OAuth2 config OAuth2 token cached locally; currently expired, needs a manual re-auth run

This page is the build record for GWS CLI — a Python command-line tool that wraps the Gmail and Google Calendar APIs so common tasks never require opening a browser tab.

Save as PDF →

Google Workspace,
from the terminal.

What It Is

GWS CLI (Google Workspace CLI) is a Python tool that wraps the Gmail and Google Calendar APIs with a command-line interface. The goal: handle the most common Gmail and Calendar tasks without switching to a browser, without navigating a UI, and without context-switching out of the terminal.

$ gws mail search "invoice from:accounts@vendor.com"

The interface is intentionally thin — thin wrappers over the Google APIs with clean output. No heavy abstraction, no config files required beyond OAuth credentials.

Two APIs,
one interface.

Capabilities
M

Gmail

Search threads, read messages, create drafts, and manage labels from the command line.

$ gws mail draft --to jane@co.com --subject "Re: Q3"

C

Google Calendar

List upcoming events, create events, and check availability — without opening a browser tab.

$ gws cal list --tomorrow

Core built.
Automation layer paused.

Status & Roadmap
Built Core Gmail + Calendar CLI, manual use
Paused Scheduled automation layer
Not started Telegram trigger + rclone integration

Why the automation layer is paused

The CLI commands work when run by hand. The scheduled-automation layer built around them — unattended newsletter digests, idea mining into Obsidian — never completed a single successful run and was dismantled. Reviving it means fixing the scheduling setup and re-authenticating before any of it runs unattended again.

Possible next steps

If revived, the automation would more likely move to the always-on Telegram bot this project already integrates with, rather than a machine that isn't always running. rclone integration for Google Drive sync remains a possible extension of the CLI itself, independent of the automation question.

No async needed.
Just clean wrappers.

Tech Stack

Language

Python · synchronous (no async required for Google API calls)

APIs

Gmail API · Google Calendar API · OAuth 2.0 for authentication

Planned Integrations

Telegram Bot API (trigger) · rclone (Google Drive sync)