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.1.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.1-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gcallm-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 023c6d1266bdfa8358baf9468b6089dabae69225a0a6cfc4bb993ac19e5d4137
MD5 ebd3651af002c12f252d2eae833f023a
BLAKE2b-256 b7884785622e598b1ff85521844f3ce21e996102b2c071067f4e1f4f9c9e82c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcallm-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11b4413dab9d2f06dcf31d1ed21f03cd75d5a323d94478f1455c0f11e73de250
MD5 ba04a613ec86c432c18ee787d0da2108
BLAKE2b-256 89987a933c5e16834d6b53178d1e81a1464406561cd36ce74e77e091371ac56d

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