Skip to content
alyn
badlogic

Gmcli skill

Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

$npx skills add badlogic/pi-skills --skill gmcli
View this skill on GitHubbadlogic/pi-skills/gmcli/SKILL.md
Pack stars
2,655
Pack installs
4.2k
Alyn Score
47/99
Updated
5 months ago
License
MIT
– views – installs via Alyn

badlogic

Gmcli

Install Gmcli

Pick your agent. Every command is ready to paste.

$npx skills add badlogic/pi-skills --skill gmcli

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads gmcli when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the gmcli skill”. In Codex, type $gmcli.

The skill itself

SKILL.md

FolderGitHub

Gmail CLI

Command-line interface for Gmail operations.

Installation

npm install -g @mariozechner/gmcli

Setup

Google Cloud Console (one-time)

  1. Create a new project (or select existing)
  2. Enable the Gmail API
  3. Set app name in OAuth branding
  4. Add test users (all Gmail addresses you want to use)
  5. Create OAuth client:
    • Click "Create Client"
    • Application type: "Desktop app"
    • Download the JSON file

Configure gmcli

First check if already configured:

gmcli accounts list

If no accounts, guide the user through setup:

  1. Ask if they have a Google Cloud project with Gmail API enabled
  2. If not, walk them through the Google Cloud Console steps above
  3. Have them download the OAuth credentials JSON
  4. Run: gmcli accounts credentials ~/path/to/credentials.json
  5. Run: gmcli accounts add <email> (use --manual for browserless OAuth)

Usage

Run gmcli --help for full command reference.

Common operations:

  • gmcli <email> search "<query>" - Search emails using Gmail query syntax
  • gmcli <email> thread <threadId> - Read a thread with all messages
  • gmcli <email> send --to <emails> --subject <s> --body <b> - Send email
  • gmcli <email> labels list - List all labels
  • gmcli <email> drafts list - List drafts

Data Storage

  • ~/.gmcli/credentials.json - OAuth client credentials
  • ~/.gmcli/accounts.json - Account tokens
  • ~/.gmcli/attachments/ - Downloaded attachments

Tips for Gmcli

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It is part of a pack with 8 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Gmcli

What does the Gmcli skill do?

Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

How do I install Gmcli?

Run "npx skills add badlogic/pi-skills --skill gmcli" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Gmcli work in Cursor and Codex?

Yes. Gmcli uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Gmcli free?

Gmcli is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Gmcli?

Gmcli is published by badlogic in the badlogic/pi-skills repository, together with 7 other skills.

Similar skills. From other creators.