Skip to main content

Simple CLI to add events to Google Calendar using Claude and natural language

Project description

gcallm: Google Calendar w/ Claude

gcallm is a simple CLI that uses Claude to add events to Google Calendar in natural language. It supports text input, screenshots, clipboard. It also supports interactive workflows where you use a text editor to input the gcal information, as well as asking the user for confirmation if it finds significant conflict. I found it useful. I hope you do too!

Quickstart

$ gcallm "Coffee with Sarah tomorrow at 2pm" Created event:
Coffee with Sarah
- Date & Time: Tomorrow at 2:00 PM - 3:00 PM
- Calendar: primary
  • Direct input - gcallm "Meeting tomorrow"
  • Screenshots - gcallm -s
  • Clipboard - gcallm -c
  • Stdin - pbpaste | gcallm
  • Editor - gcallm (opens $EDITOR)
  • URL - gcallm "https://example.com/event"

Installation

Option 1: Install from PyPI (Recommended)

Using pip:

pip install gcallm

Using uv (faster):

uv tool install gcallm

Option 2: Install from Source

git clone https://github.com/WarrenZhu050413/gcallm.git
cd gcallm
make install

For development:

make dev    # Install in editable mode

Quick Start

1. Get Google OAuth Credentials

  1. Go to Google Cloud Console
  2. Enable Google Calendar API
  3. Create OAuth credentials (Desktop app)
  4. Download the JSON file and save it (e.g., ~/gcp-oauth.keys.json)

Detailed instructions: See docs/oauth.md

2. Configure OAuth Credentials

gcallm setup ~/gcp-oauth.keys.json

3. Authenticate

export GOOGLE_OAUTH_CREDENTIALS="$HOME/gcp-oauth.keys.json"
npx @cocal/google-calendar-mcp auth

This opens your browser to grant calendar permissions.

4. Verify Setup

gcallm verify

Expected output:

✓ Google Calendar MCP: Working
✓ Claude Agent SDK: Working
✅ All checks passed!

5. Add Your First Event

gcallm "Test event tomorrow at 3pm"

Usage

# Natural language
gcallm "Coffee with Sarah tomorrow at 2pm"

# From screenshot
gcallm -s                    # Latest screenshot
gcallm --screenshots 3       # Latest 3 screenshots

# From clipboard
gcallm -c

# From stdin
pbpaste | gcallm
cat events.txt | gcallm

# Interactive mode (check conflicts)
gcallm -i "Meeting tomorrow at 2pm"

# Ask questions
gcallm ask "What's on my calendar today?"

# No args = open editor
gcallm

Full documentation: See docs/cli.md

Documentation

Key Features Explained

Screenshot Support

Take a screenshot of an event flyer, email, or calendar, then run:

gcallm -s

Claude analyzes the screenshot and creates the event automatically. No manual typing needed!

Interactive Mode

Check for scheduling conflicts before creating events:

gcallm -i "Workshop tomorrow 2-5pm"

Claude checks your calendar and warns you about conflicts, letting you decide whether to proceed.

Prerequisites

  • Python 3.10+
  • Node.js 16+ (for Google Calendar MCP server)
  • Google OAuth credentials (see Quick Start)

Troubleshooting

"Calendar tools not available"

The MCP server isn't authenticated. Run:

export GOOGLE_OAUTH_CREDENTIALS="/path/to/gcp-oauth.keys.json"
npx @cocal/google-calendar-mcp auth

Tokens expired (after 7 days)

If your Google Cloud app is in test mode, tokens expire weekly:

npx @cocal/google-calendar-mcp auth

Full troubleshooting: See docs/oauth.md

Development

make dev       # Install in development mode
make test      # Run tests (145 tests)
make format    # Format code
make lint      # Lint code
make build     # Build for PyPI

Developer documentation: See CLAUDE.md

How It Works

┌─────────────┐
│   gcallm    │  Natural language input
└──────┬──────┘
       │
       ▼
┌─────────────┐
│   Claude    │  Parses intent, dates, details
└──────┬──────┘
       │
       ▼
┌─────────────┐
│ Google Cal  │  Creates events via MCP
│  MCP Server │
└─────────────┘
  • Claude Agent SDK - Natural language understanding
  • Google Calendar MCP - Direct API access
  • Explicit MCP config - No external config files needed

Contributing

Contributions welcome! This project follows TDD (Test-Driven Development).

  1. Fork the repository
  2. Create a feature branch
  3. Write tests first (Red-Green-Refactor)
  4. Ensure all tests pass (make test)
  5. Submit a Pull Request

See CLAUDE.md for architecture details.

Acknowledgments

License

MIT License - see LICENSE file for details

Author

Created by Warren Zhu (@WarrenZhu050413)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcallm-0.1.0.tar.gz (106.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcallm-0.1.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file gcallm-0.1.0.tar.gz.

File metadata

  • Download URL: gcallm-0.1.0.tar.gz
  • Upload date:
  • Size: 106.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for gcallm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6041a03dbc36835049070bb8567104527f81cc3215e7e6fc9a4b83883433e0ff
MD5 7982e772a3cf7ac6ace8eae0b8202a28
BLAKE2b-256 eceff9d5bf93302a2b869e380dc2fae9875bda9b7369158abb1c41d8febedfbc

See more details on using hashes here.

File details

Details for the file gcallm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gcallm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for gcallm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab90ea3cc94f7a84e51484e4f68f04f19dcdc3cd36262bb08b8f1768b7df87ad
MD5 f23d763fcc0ffa6cb2075698d005b2a8
BLAKE2b-256 8342b589d030f0228156eea8e667e8ad29a2e05fa8652c90ba06bb108903dcf6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page