Install
$ agentstack add skill-maxandersen-skills-jgmcli ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Gmail CLI (Java)
Command-line interface for Gmail operations. Java port of gmcli.
Source: https://github.com/maxandersen/jgmcli
Installation
Option 1: Run directly with JBang (no install)
jbang jgmcli@maxandersen/skills --help
Option 2: Install as command
jbang app install jgmcli@maxandersen/skills
jgmcli --help
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 jgmcli
First check if already configured:
jgmcli 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:
jgmcli accounts credentials ~/path/to/credentials.json - Run:
jgmcli accounts add(use--manualfor browserless OAuth)
Shared Credentials
Credentials in ~/.jgcli/ are shared across jgccli, jgmcli, and jgdcli. Set up once, use with all three.
For separate credentials, use named credentials:
jgmcli accounts credentials ~/work-creds.json --name work
jgmcli accounts add work@company.com --credentials work
Usage
Run jgmcli --help for full command reference.
Common operations:
jgmcli search ""- Search emails using Gmail query syntaxjgmcli thread- Read a thread with all messagesjgmcli send --to --subject --body- Send emailjgmcli labels list- List all labelsjgmcli drafts list- List drafts
Gmail Query Syntax
in:inbox, in:sent, in:drafts, in:trash
is:unread, is:starred, is:important
from:sender@example.com, to:recipient@example.com
subject:keyword, has:attachment, filename:pdf
after:2024/01/01, before:2024/12/31
label:Work, label:UNREAD
Combine: "in:inbox is:unread from:boss@company.com"
Data Storage
~/.jgcli/credentials.json- OAuth client credentials (shared with jgccli, jgdcli)~/.jgcli/accounts-gmail.json- Account tokens~/.jgcli/attachments/- Downloaded attachments
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: maxandersen
- Source: maxandersen/skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.