Install Gmcli
Pick your agent. Every command is ready to paste.
npx skills add badlogic/pi-skills --skill gmcliThe 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.
Gmail CLI
Command-line interface for Gmail operations.
Installation
npm install -g @mariozechner/gmcli
Setup
Google Cloud Console (one-time)
- Create a new project (or select existing)
- Enable the Gmail API
- Set app name in OAuth branding
- Add test users (all Gmail addresses you want to use)
- 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:
- Ask if they have a Google Cloud project with Gmail API enabled
- If not, walk them through the Google Cloud Console steps above
- Have them download the OAuth credentials JSON
- Run:
gmcli accounts credentials ~/path/to/credentials.json - Run:
gmcli accounts add <email>(use--manualfor browserless OAuth)
Usage
Run gmcli --help for full command reference.
Common operations:
gmcli <email> search "<query>"- Search emails using Gmail query syntaxgmcli <email> thread <threadId>- Read a thread with all messagesgmcli <email> send --to <emails> --subject <s> --body <b>- Send emailgmcli <email> labels list- List all labelsgmcli <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.




