← 返回
开发者工具 Key 中文

py-googlecalendar-cli

Tiny and short Python CLI tool to manage Google Calendar events from the command line -- list, add, update, delete events via the Calendar API.
一个轻量短小的 Python CLI 工具,用于在命令行管理 Google 日历事件——通过 Calendar API 列出、添加、更新、删除事件。
xwings
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 440
下载
💾 5
安装
1
版本
#latest

概述

Google Calendar CLI

A single-file CLI for Google Calendar using only Python 3 standard library.

Setup

  1. Create a Google Cloud project and enable the Google Calendar API.
  2. Create OAuth 2.0 credentials (Desktop app). Note the client ID and secret.
  3. Obtain a refresh token via the OAuth consent flow.
  4. Export credentials:

```bash

export GOOGLE_CLIENT_ID=...

export GOOGLE_CLIENT_SECRET=...

export GOOGLE_REFRESH_TOKEN=...

export GOOGLE_CALENDAR_ID=primary # optional, defaults to "primary"

```

Usage

google-calendar-cli.py <command> [options]
CommandDescription
------------------------------------
listList upcoming events
todayShow today's events
addCreate a new event
updateUpdate an existing event
deleteDelete an event

Credentials can also be passed as flags (--client-id, --client-secret, --refresh-token, --calendar-id).

Use --json for raw JSON output. Run with -h for full help.

Examples

# List next 10 events
python3 {baseDir}/scripts/google-calendar-cli.py list

# Today's events
python3 {baseDir}/scripts/google-calendar-cli.py today

# Events in a date range
python3 {baseDir}/scripts/google-calendar-cli.py list --from 2025-06-01T00:00:00Z --to 2025-06-30T23:59:59Z

# Add an event
python3 {baseDir}/scripts/google-calendar-cli.py add --title "Meeting" \
    --start 2025-06-01T09:00:00-07:00 --end 2025-06-01T10:00:00-07:00

# Update an event
python3 {baseDir}/scripts/google-calendar-cli.py update --event-id EVENT_ID --title "New Title"

# Delete an event
python3 {baseDir}/scripts/google-calendar-cli.py delete --event-id EVENT_ID

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 09:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,767
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 66 📥 179,995
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,970