Tooluck logoTooluck
SKILL.md

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)

gmcli/SKILL.md

MITFull file
1# Gmail CLI
2
3Command-line interface for Gmail operations.
4
5## Installation
6
7```bash
8npm install -g @mariozechner/gmcli
9```
10
11## Setup
12
13### Google Cloud Console (one-time)
14
151. [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 branding
184. [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 file
23
24### Configure gmcli
25
26First check if already configured:
27```bash
28gmcli accounts list
29```
30
31If no accounts, guide the user through setup:
321. Ask if they have a Google Cloud project with Gmail API enabled
332. If not, walk them through the Google Cloud Console steps above
343. Have them download the OAuth credentials JSON
354. Run: `gmcli accounts credentials ~/path/to/credentials.json`
365. Run: `gmcli accounts add <email>` (use `--manual` for browserless OAuth)
37
38## Usage
39
40Run `gmcli --help` for full command reference.
41
42Common operations:
43- `gmcli <email> search "<query>"` - Search emails using Gmail query syntax
44- `gmcli <email> thread <threadId>` - Read a thread with all messages
45- `gmcli <email> send --to <emails> --subject <s> --body <b>` - Send email
46…

Excerpt shown under the repository's MIT license.

More skills in pi-skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates