gmcli
Agent skill frombadlogic/pi-skills
Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.
How to install gmcli
install gmcli
# install the pi-skills pack with the skills CLI
npx skills add badlogic/pi-skills# or add only this skill to Claude Code: copy the folder
gmcli/
# into
~/.claude/skills/gmcli/ (all projects)
.claude/skills/gmcli/ (one project)
1# Gmail CLI23Command-line interface for Gmail operations.45## Installation67```bash8npm install -g @mariozechner/gmcli9```1011## Setup1213### Google Cloud Console (one-time)14151. [Create a new project](https://console.cloud.google.com/projectcreate) (or select existing)162. [Enable the Gmail API](https://console.cloud.google.com/apis/api/gmail.googleapis.com)173. [Set app name](https://console.cloud.google.com/auth/branding) in OAuth branding184. [Add test users](https://console.cloud.google.com/auth/audience) (all Gmail addresses you want to use)195. [Create OAuth client](https://console.cloud.google.com/auth/clients):20 - Click "Create Client"21 - Application type: "Desktop app"22 - Download the JSON file2324### Configure gmcli2526First check if already configured:27```bash28gmcli accounts list29```3031If no accounts, guide the user through setup:321. Ask if they have a Google Cloud project with Gmail API enabled332. If not, walk them through the Google Cloud Console steps above343. Have them download the OAuth credentials JSON354. Run: `gmcli accounts credentials ~/path/to/credentials.json`365. Run: `gmcli accounts add <email>` (use `--manual` for browserless OAuth)3738## Usage3940Run `gmcli --help` for full command reference.4142Common operations:43- `gmcli <email> search "<query>"` - Search emails using Gmail query syntax44- `gmcli <email> thread <threadId>` - Read a thread with all messages45- `gmcli <email> send --to <emails> --subject <s> --body <b>` - Send email46…
Excerpt shown under the repository's MIT license.
