DEV Community

Qasim Muhammad
Qasim Muhammad

Posted on • Originally published at cli.nylas.com

Manage Google Calendar from the Command Line — No API Setup

Google Calendar API requires creating a GCP project, enabling the Calendar API, setting up OAuth consent screens, managing token refresh, and parsing deeply nested JSON responses. That's before you create a single event.

Nylas CLI handles all of that with one authentication step. Create, list, update, and delete Google Calendar events from your terminal. Check availability, find mutual meeting times, and schedule across time zones — all in one command.

Install and authenticate

brew install nylas/nylas-cli/nylas
nylas auth login
# => Browser opens for Google OAuth consent
nylas auth whoami
# => Authenticated as you@gmail.com (Google)
Enter fullscreen mode Exit fullscreen mode

Full setup: Getting Started with Nylas CLI

List upcoming events

# Next 10 events
nylas calendar list --limit 10

# Today's events only
nylas calendar list --from "today" --to "tomorrow"

# This week
nylas calendar list --from "monday" --to "friday"

# JSON output for scripting
nylas calendar list --limit 5 --json | jq '.[].title'
Enter fullscreen mode Exit fullscreen mode

Create events

# Quick event
nylas calendar create --title "Team standup" --when "tomorrow 10am" --duration 30m

# With location and description
nylas calendar create \
  --title "Product review" \
  --when "2026-04-10 14:00" \
  --duration 1h \
  --location "Conference Room B" \
  --description "Q2 roadmap review with stakeholders"

# Add participants
nylas calendar create \
  --title "1:1 with Alice" \
  --when "friday 3pm" \
  --duration 30m \
  --participants "alice@company.com,bob@company.com"

# Auto-add Google Meet link
nylas calendar create \
  --title "Remote standup" \
  --when "tomorrow 9am" \
  --duration 15m \
  --conferencing google-meet
Enter fullscreen mode Exit fullscreen mode

Check availability

Find open slots before scheduling:

# Check your free/busy status
nylas calendar availability --from "tomorrow 9am" --to "tomorrow 5pm"

# Find mutual availability with colleagues
nylas calendar availability \
  --emails "alice@company.com,bob@company.com" \
  --from "next monday" --to "next friday" \
  --duration 30m
Enter fullscreen mode Exit fullscreen mode

This is the same free/busy lookup that Google Calendar uses internally, but accessible from your terminal or scripts.

Update and delete events

# Reschedule
nylas calendar update evt_abc123 --when "thursday 2pm"

# Change title
nylas calendar update evt_abc123 --title "Updated: Product review (moved)"

# Cancel
nylas calendar delete evt_abc123 --yes
Enter fullscreen mode Exit fullscreen mode

DST-aware scheduling

The CLI handles Daylight Saving Time transitions automatically. When you schedule across a DST boundary, the event lands at the correct local time:

# Schedule a recurring meeting that crosses DST
nylas calendar create \
  --title "Weekly sync" \
  --when "next monday 10am" \
  --duration 1h \
  --timezone "America/New_York"
Enter fullscreen mode Exit fullscreen mode

Full timezone guide: Manage Calendar from the Terminal

Scripting with JSON

Pipe calendar data into jq for custom reports:

# Get titles of today's meetings
nylas calendar list --from "today" --to "tomorrow" --json | \
  jq -r '.[].title'

# Count meetings this week
nylas calendar list --from "monday" --to "friday" --json | jq length

# Find meetings with a specific person
nylas calendar list --json | \
  jq -r '.[] | select(.participants[]?.email == "alice@company.com") | .title'

# Export to CSV
nylas calendar list --from "today" --to "next friday" --json | \
  jq -r '.[] | [.title, .when.start_time, .when.end_time] | @csv' > meetings.csv
Enter fullscreen mode Exit fullscreen mode

Auto-record meetings

Combine with the notetaker to auto-record any meeting that has a video link:

nylas calendar list --from "today" --to "tomorrow" --json | \
  jq -r '.[] | select(.conferencing != null) | .conferencing.details.url' | \
  while read url; do
    nylas notetaker send --meeting-link "$url"
  done
Enter fullscreen mode Exit fullscreen mode

Full guide: Record Zoom, Meet, and Teams from the CLI

Send meeting invites via email

Create an event and notify participants:

# Create event with notification
nylas calendar create \
  --title "Sprint planning" \
  --when "next tuesday 10am" \
  --duration 1h \
  --participants "team@company.com" \
  --notify

# Or send a custom email with the invite details
nylas email send \
  --to "team@company.com" \
  --subject "Sprint Planning - Tuesday 10am" \
  --body "Calendar invite sent. See you there." --yes
Enter fullscreen mode Exit fullscreen mode

Full email guide: Send Email from the Command Line

Works with other providers too

The same commands work with Outlook, Exchange, Yahoo, and iCloud calendars — just change your authenticated account:

Give AI agents calendar access

AI agents can manage your calendar through MCP:

nylas mcp install --assistant claude-code
Enter fullscreen mode Exit fullscreen mode

Now Claude Code can check your availability, schedule meetings, and manage events. Setup: Give Your AI Agent an Email Address

For voice agents that schedule meetings: Connect Voice Agents to Email and Calendar

Compared to Google Calendar API

Task Google Calendar API Nylas CLI
Setup GCP project + OAuth + scopes brew install + nylas auth login
Create event 30+ lines of code One command
Check availability FreeBusy API (complex) nylas calendar availability
Multi-provider Google only 6 providers
JSON output Built-in --json flag
Email + Calendar Separate APIs Same tool

Full guide with recurring events, room booking, and automation: Manage Google Calendar from the CLI

Related guides:

All guides: cli.nylas.com/guides

Top comments (0)