Files
VolcanicSecretary/.env.example
EugeneTes 9fc348f0e2 Add Google Calendar as a native Pi custom tool
pi-claude-code-provider fences off Claude Code's MCP servers by design,
so managed MCPs like Google Calendar can't reach the bot through that
provider. Implement calendar access as a first-class Pi tool instead —
it lives alongside `schedule` and calls Google Calendar API v3 directly
with a subscription-free refresh-token grant.

Config: three new optional env vars (GOOGLE_CLIENT_ID,
GOOGLE_CLIENT_SECRET, GOOGLE_REFRESH_TOKEN) — set all three to enable
the tool, leave all three blank to disable. Partial config raises a
ConfigError at startup so mis-set env is caught early.

Tool: list / create / update / delete on any calendar (default
'primary'). Access tokens are cached until expiry and refreshed on
demand from the long-lived refresh token. Invalid_grant surfaces a
clear "re-run device flow" error.
2026-09-06 20:51:00 +00:00

24 lines
874 B
Plaintext

# Required
TELEGRAM_BOT_TOKEN=123456:ABC-your-bot-token
TELEGRAM_OWNER_ID=123456789
# Optional
WORKSPACE_DIR=./workspace
OPENAI_API_KEY=
STT_MODEL=gpt-4o-transcribe
# PI_MODEL: leave empty for the first model Pi has credentials for. With the Claude Code
# subscription package use ids like pi-claude-code-provider/opus. Ids like anthropic/claude-opus-4-7
# need an ANTHROPIC_API_KEY. Run `pi --list-models` to see every id.
PI_MODEL=
SECRETARY_TIMEZONE=
SECRETARY_SHELL=
LOG_LEVEL=info
# PI_CODING_AGENT_DIR= (Pi's own override for ~/.pi/agent, mainly for Docker)
# Google Calendar tool: all three or none. Bootstrap the refresh token with an
# OAuth device flow against a Google Cloud OAuth client (type: TVs and Limited
# Input devices) — see docs/. Scope needed: https://www.googleapis.com/auth/calendar
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REFRESH_TOKEN=