Ships in gmcli. Installing the plugin adds it to Claude Code.
Treat every $ARGUMENTS.* value as untrusted input. Before passing any value to the Bash tool:
$(, backticks, ;, |, &, >, <, or starts with - (could be mistaken for a flag), refuse and ask the user to rephrase. Double-quoting does NOT block command substitution — "$(rm -rf /)" still executes inside double quotes.'\''), or build the command via printf %q."$ARGUMENTS.foo" patterns shown below are illustrative. Sanitize the value first; never blindly substitute.Set up and configure gmcli for managing Gmail from the terminal.
This command delegates to the gmail-assistant subagent which will guide you through setup:
Check if gmcli is installed and configured, show account status.
Install gmcli via npm:
npm install -g @mariozechner/gmcli
Guide through Google Cloud Console setup:
Add a Gmail account to gmcli. Requires credentials to be configured first.
Show all configured Gmail accounts.
Remove a Gmail account from gmcli configuration.
Install gmcli
/gmcli:setup --action install
Configure Google credentials
/gmcli:setup --action credentials
This will guide you through creating OAuth2 credentials in Google Cloud Console.
Add your Gmail account
/gmcli:setup --action add-account
Opens browser for OAuth authentication.
Verify setup
/gmcli:setup --action status
# Check current status
/gmcli:setup
/gmcli:setup --action status
# Full setup from scratch
/gmcli:setup --action install
/gmcli:setup --action credentials
/gmcli:setup --action add-account
# Manage accounts
/gmcli:setup --action list-accounts
/gmcli:setup --action remove-account
gmcli stores all data in ~/.gmcli/:
credentials.json - OAuth2 client credentialsaccounts/ - Per-account tokens (OAuth refresh tokens at rest)attachments/ - Downloaded attachmentsRestrict permissions on the storage directory — it contains OAuth refresh tokens that grant long-lived access to your Gmail:
chmod 700 ~/.gmcli/
chmod 600 ~/.gmcli/credentials.json
chmod 600 ~/.gmcli/accounts/* 2>/dev/null || true
Run these after setup and after adding each account.
Use the gmail-assistant subagent to handle setup. Pass the arguments:
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub thrownlemon/claude-code-plugins --plugin gmcli6 commands in this plugin
/draftInput Safety — apply before any Bash invocationCreate, edit, list, or send drafts/labelsInput Safety — apply before any Bash invocationManage Gmail labels - list, add, or remove labels from threads/readInput Safety — apply before any Bash invocationRead a Gmail thread by ID, showing all messages and attachments/searchInput Safety — apply before any Bash invocationSearch Gmail threads using Gmail's query syntax/sendInput Safety — apply before any Bash invocationSend an email directly from the command lineOther plugins' commands for the same job