MIT LicenseBuilt for apps and AI agents that use Google Calendar

Google Calendar API on localhost

Calendarpit serves a Google Calendar API v3 subset and local OAuth in one process. Test with no Google account or network access.

Develop and test Calendar API integrations locally127.0.0.1:4173

Your app

Google SDKs and tests

Google Calendar

Not needed

  • OAuth sign-in
  • Events
  • Recurrence
  • Free/busy
  • Sync
  • Webhooks

Calendarpit

Local server on 127.0.0.1

Your app uses standard Google SDKs and API v3 shapes, pointed at Calendarpit on 127.0.0.1.

Why Calendarpit

Building apps and AI agents that use Google Calendar means setting up OAuth and preparing test data. With a live calendar, repeating a test from the same state can be hard. Calendarpit lets you test locally with fixtures and no Google credentials.

Testing with real Google

  • Needs a Google account, Cloud project, and OAuth setup.
  • Depends on internet access and shared API quotas.
  • Shared calendar data changes between test runs.

Testing with Calendarpit

  • Sign in as a local test user with no real credentials.
  • Runs on 127.0.0.1 in one process with no network access.
  • Seed data from fixtures and reset state between tests.

How it works

Start Calendarpit

One process serves the API, local OAuth, and the admin UI on http://127.0.0.1:4173.

brew install iktakahiro/tap/calendarpit
calendarpit serve
docker run --rm -p 127.0.0.1:4173:4173 ghcr.io/iktakahiro/calendarpit:latest

Point your app to Calendarpit

Keep your Google SDK and override its OAuth and API endpoints. For example, with @googleapis/calendar and google-auth-library:

const origin = 'http://127.0.0.1:4173';
const auth = new OAuth2Client({
  clientId: 'sample-app',
  clientSecret: 'local-sample-secret',
  redirectUri: 'http://127.0.0.1:4175/callback',
  endpoints: {
    oauth2AuthBaseUrl: `${origin}/oauth/authorize`,
    oauth2TokenUrl: `${origin}/oauth/token`,
  },
});
const api = calendar({ version: 'v3', auth, rootUrl: origin });

Connect your app covers every endpoint, and SDK examples cover Python, Go, Java, and .NET.

Test with fixtures

Reset to the startup fixture before each test, and inspect requests in the admin UI.

curl -X POST http://127.0.0.1:4173/__calendarpit/reset \
  -H "Content-Type: application/json" \
  -d '{}'

What Calendarpit includes

Start building calendar apps with Calendarpit

Calendarpit is built for local development and automated tests only. It implements a defined subset of the Google Calendar API v3 on loopback.