gcli

A command-line tool for working with Gmail, Google Calendar, and Google Drive from a terminal.

In plain words
What is it for?
Listing and searching email, reading threads, managing calendar events, and working with Drive files.
Why use it?
It lets an agent handle common Google Workspace tasks in structured text, while requiring confirmation before sending, changing, or deleting anything.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/5uck1ess/devkit/gcli
Any agent
npx skills add 5uck1ess/devkit --skill gcli
Clone the repo
git clone --depth 1 https://github.com/5uck1ess/devkit

Made for: Claude Code, Codex.

Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 829 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00029 $0.00829
Opus 5 $0.00015 $0.00415
Sonnet 5 $0.00006 $0.00166
Haiku 4.5 $0.00003 $0.00083

Measured yesterday against content hash 74cc0d1b2761, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gcli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/gcli/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gcli — Google Workspace CLI

Single binary for Gmail, Calendar, and Drive. Always use --for-ai for structured, token-efficient output.

Confirmation Required

NEVER send, reply, forward, or delete email/calendar events without explicit user confirmation of the recipient(s), subject, and body. Always show the user what will be sent and wait for approval before executing. The same applies to cal create, cal edit, cal delete, and drive upload.

Prerequisites

Before using any gcli command, verify it is installed:

command -v gcli >/dev/null 2>&1 && echo "gcli: installed" || echo "gcli: not installed — install from https://github.com/AryaLabsHQ/gcli and run 'gcli login'"

If gcli is not installed, tell the user and stop. Do not attempt gcli commands without this check.

Gmail

# List inbox (default 20)
gcli mail list --for-ai
gcli mail list 10 --unread --for-ai

# Read a thread
gcli mail get <thread-id> --for-ai

# Search
gcli mail search "from:boss subject:review" --for-ai

# Send
gcli mail send -t "[email protected]" -s "Subject" --body-file msg.txt

# Reply (use thread-id from list/search)
gcli mail reply <thread-id> --body-file reply.txt
gcli mail reply <thread-id> --all --body-file reply.txt

# Forward / mark
gcli mail forward <thread-id> -t "[email protected]"
gcli mail mark <message-id> --read
gcli mail mark <message-id> --trash

Calendar

# Today's events
gcli cal list --for-ai

# Next 7 days
gcli cal list 7 --for-ai

# All calendars
gcli cal list 7 --all-calendars --for-ai

# Event details
gcli cal get <event-id> --for-ai

# Create
gcli cal create "Meeting" -s "tomorrow 2pm" -d "1h" --attendee "[email protected]"

# Edit / delete
gcli cal edit <event-id> -s "tomorrow 3pm"
gcli cal delete <event-id>

Drive

# List root
gcli drive list --for-ai

# List folder
gcli drive list "path/to/folder" --for-ai

# Search
gcli drive search "quarterly report" --for-ai

# Shared files
gcli drive list -s --for-ai

# Download / upload
gcli drive download "path/to/file" -o ./local-file
gcli drive upload ./local-file "path/to/folder"

# Info / permissions
gcli drive info "path/to/file" --for-ai
gcli drive permissions "path/to/file" --for-ai

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 111 lines · 29 tokens per session scan A 74cc0d1b2761

Subscribe to this mod's changes

gcli is a skill published in the GitHub repository 5uck1ess/devkit (5 stars, last pushed 13d ago), licensed MIT. It adds 29 tokens to every session and 829 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories