gmcli

Manage Gmail from the terminal with search, read, and send operations.

2.3k|207|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/badlogic/pi-skills --skill gmcli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gmcli
Source: https://github.com/badlogic/pi-skills/tree/main/gmcli
Command: npx skills add https://github.com/badlogic/pi-skills --skill gmcli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Gmail users often need to manage emails without switching to a web browser. gmcli provides a command-line interface to search, read, compose, and organize Gmail messages, making inbox management faster and scriptable.

Core Features & Use Cases

  • Search emails: Quickly locate messages using Gmail search syntax directly from the terminal.
  • Read threads: Open and review entire conversations to capture context.
  • Send messages: Compose and send emails from scripts or interactive sessions.
  • Manage drafts and labels: Create and edit drafts; apply labels and attachments to organize inboxes.
  • Automation scenarios: Generate daily digests, respond to triggers, or batch-process messages in batches.

Quick Start

Install gmcli with: npm install -g @mariozechner/gmcli Setup Google Cloud OAuth as described in the Setup steps:

  • Run: gmcli accounts list
  • If no accounts exist, run: gmcli accounts credentials /path/to/credentials.json
  • Add an account: gmcli accounts add [email protected] Example usage: gmcli [email protected] search "from:boss"

Frequently Asked Questions about gmcli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Gmail from the terminal without opening a browser?

You can manage Gmail from the terminal by using a CLI to search emails, read threads, send messages, and organize labels. This approach makes inbox management scriptable and eliminates the need to switch to a web browser.

What do I need to set up a Gmail CLI for email management?

Setting up a Gmail CLI requires a Google Cloud project with Gmail API access and OAuth credentials. You must load these credentials locally, add your account, and complete the OAuth flow to generate the tokens needed for terminal access.

Can I search and read Gmail threads using standard search syntax in a CLI?

Yes, you can search and read Gmail threads using standard Gmail search syntax directly in the CLI. This allows you to quickly locate specific messages and open entire conversations to capture full context without leaving the terminal.

Is it possible to automate sending emails and managing drafts from the command line?

Yes, you can automate sending emails and managing drafts from the command line. The CLI supports composing messages, handling attachments, and batch-processing emails, making it ideal for generating daily digests or responding to automated triggers.

Does this Gmail CLI support multi-account workflows and label management?

Yes, the Gmail CLI supports multi-account workflows and label management. You can configure multiple accounts, switch between them easily, and apply or organize labels to keep different inboxes sorted directly from your terminal sessions.