Vibeleaderboard
Index / tool
Visit github.com
Category
Productivity
Rank
No. 1470Tools index
Pricing
Open Source
Type
TOOL
Builder
badlogic
GitHub
222 stars
Date

About

Minimal Gmail CLI — read, search, send, and triage your inbox from the terminal without the Gmail web UI.

What it does

gmcli wraps Gmail’s API in account-scoped terminal commands. After desktop OAuth setup, it searches complete threads, displays message content, changes labels, manages drafts, sends replies or new mail, downloads attachments, and emits either readable tables or JSON.

Why it's ranked here

The command set covers a surprisingly complete terminal mail workflow without hiding Gmail’s native query language. JSON output, pagination, multiple accounts, draft handling, replies, and attachment support make it useful for scripts. The substantial Google Cloud and OAuth setup keeps it from being a casual install.

What's good

Search results expose thread metadata and a continuation token. Labels accept case-insensitive names or IDs, including several threads per operation. Replies preserve conversation headers and thread association. Browserless authorization helps remote environments, while JSON output gives automation full search results, raw thread payloads, and attachment records.

Tradeoffs

Users must create a Google Cloud project, enable Gmail access, configure consent details, create desktop credentials, and authorize every account. The requested OAuth scope grants full mailbox access. Client secrets and account tokens live in local JSON files. Human-readable thread output extracts plain text, so richer content may require JSON processing.

How to use it well

It suits engineers who already work in shells and want repeatable inbox searches, batch label changes, attachment retrieval, or mail steps inside scripts. Prefer JSON for downstream processing and drafts when human confirmation matters. It does not replace a rich mail composer or remove the need for Google Cloud configuration.

Technical notes+

package.json defines an ES module package for Node.js 20 or newer, with a CLI entry, a typed library entry, and only google-auth-library plus googleapis as runtime dependencies. src/cli.ts parses commands with Node’s argument parser and switches between tabular and JSON output. src/gmail-service.ts calls Gmail v1, expands search hits into full threads, builds MIME messages, resolves label names, and caches downloaded attachments. src/account-storage.ts persists credentials and account records as unencrypted JSON under the user’s home directory. src/gmail-oauth-flow.ts requests the full mail scope and supports either a temporary localhost callback or a pasted redirect URL. tsconfig.json enables strict TypeScript and declaration output, while .github/workflows/ci.yml builds and checks on Ubuntu with Node.js 22.

Observed

License
MIT
Primary language
TypeScript
Install surface
Global npm package @mariozechner/gmcli
Interfaces
Command-line interface plus typed ES module library entry
Runtime
Node.js 20 or newer
Authentication
Google OAuth2 desktop flow with browser and manual modes

Read from README.md, package.json, src/cli.ts, src/types.ts, src/gmail-service.ts, src/account-storage.ts, src/gmail-oauth-flow.ts, biome.json, CHANGELOG.md, tsconfig.json, .husky/pre-commit, .github/workflows/ci.yml.

What it can do

  • Read Gmail emails

    Gmail account credentialsEmail content displayed in terminal

  • Search Gmail inbox

    Search query and Gmail account accessFiltered list of matching emails

  • Send email messages

    Recipient address, subject, and message contentSent email confirmation

  • Triage inbox emails

    Gmail emails and user triage actionsOrganized inbox with processed emails

  • Access Gmail without web browser

    Terminal commands and Gmail credentialsGmail functionality in command-line interface

Tags

cligmailemailtypescript

Tech Stack

Node.jsTypeScript

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.