← 返回
未分类 中文

Gcalcli Calendar 3.0.0

Google Calendar via gcalcli: today-only agenda by default, bounded meaning-first lookup via agenda scans, and fast create/delete with verification--optimized...
通过 gcalcli 操作 Google 日历,默认仅显示今日议程,限定意义优先查找采用议程扫描,快速创建/删除并验证——已优化
mbright4497 mbright4497 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 517
下载
💾 0
安装
1
版本
#latest

概述

gcalcli-calendar

Use gcalcli to read/search/manage Google Calendar with minimal tool calls and minimal output.

Rules

CLI flag placement (critical)

  • Global flags (--nocolor, --calendar) go BEFORE the subcommand.
  • Subcommand-specific flags go AFTER the subcommand name.
  • Example: gcalcli --nocolor delete --iamaexpert "query" start end — NOT gcalcli --nocolor --iamaexpert delete ....
  • This applies to ALL subcommand flags: --iamaexpert (delete), --noprompt/--allday (add), --use-legacy-import (import), etc.

Output & language

  • Don't print CLI commands/flags/tool details unless the user explicitly asks (e.g. "show commands used", "/debug", "/commands").
  • If asked for commands: print ALL executed commands in order (including retries) and nothing else.
  • Don't mix languages within one reply.
  • Be concise. No scope unless nothing found.

Dates & formatting

  • Human-friendly dates by default. ISO only if explicitly requested.
  • Don't quote event titles unless needed to disambiguate.

Calendar scope

  • Trust gcalcli config (default/ignore calendars). Don't broaden scope unless user asks "across all calendars" or results are clearly wrong.

Agenda (today-only by default)

  • If user asks "agenda" without a period, return today only.
  • Expand only if explicitly asked (tomorrow / next N days / date range).

Weekday requests (no mental math)

If user says "on Monday/Tuesday/..." without a date:

1) fetch next 14 days agenda once,

2) pick matching day/event from tool output,

3) proceed (or disambiguate if multiple).

Finding events: prefer deterministic agenda scan (meaning-first)

When locating events to cancel/delete/edit:

  • Prefer agenda over search.
  • Use a bounded window and match events by meaning (semantic match) rather than exact text.
  • Default locate windows:
  • If user gives an exact date: scan that day only.
  • If user gives a weekday: scan next 14 days.
  • If user gives only meaning words ("train", "lecture", etc.) with no date: scan next 30 days first.
  • If still not found: expand to 180 days and say so only if still empty.

Use gcalcli search only as a fallback when:

  • the time window would be too large to scan via agenda (token-heavy), or
  • the user explicitly asked to "search".

Search (bounded)

  • Default search window: next ~180 days (unless user specified otherwise).
  • If no matches: say "No matches in next ~6 months (->)" and offer to expand.
  • Show scope only when nothing is found.

Tool efficiency

  • Default: use --nocolor to reduce formatting noise and tokens.
  • Use --tsv only if you must parse/dedupe/sort.

Actions policy (optimized for conversational speed)

This skill is designed for personal assistant use where the user expects fast, low-friction calendar management. The confirmation policy below is an intentional UX choice — see README.md for rationale and safety guards.

Unambiguous actions: execute immediately

For cancel/delete/edit actions, skip confirmation when ALL of these hold:

  • The user explicitly requested the action (e.g. "delete my dentist appointment").
  • Exactly one event matches in a tight time window.
  • The match is unambiguous (single clear result on an exact date, or user specified date+time).

Ambiguous actions: always ask first

If multiple candidates match, or the match is uncertain:

  • Ask a short disambiguation question listing the candidates (1-3 lines) and wait for the user's choice.

Create events: overlap check MUST be cross-calendar (non-ignored scope)

When creating an event:

  • Always run a best-effort overlap check across ALL non-ignored calendars by scanning agenda WITHOUT --calendar.
  • This ensures overlaps are detected even if the new event is created into a specific calendar.
  • If overlap exists with busy events:
  • Ask for confirmation before creating.
  • If no overlap:
  • Create immediately.

Choose the right create method

  • add — default for one-off events. Supports --allday, --reminder, --noprompt. Does NOT support recurrence or free/busy (transparency).
  • import via stdin — use ONLY when you need recurrence (RRULE) or free/busy (TRANSP:TRANSPARENT). Pipe ICS content via stdin; NEVER write temp .ics files (working directory is unreliable in exec sandbox).
  • quick — avoid unless user explicitly asks for natural-language add. Less deterministic.

Deletes must be verified

  • Use non-interactive delete with --iamaexpert (a delete subcommand flag — goes AFTER delete). This is gcalcli's built-in flag for non-interactive/scripted deletion.
  • Always verify via agenda in the same tight window after deletion.
  • If verification still shows the event, do one retry with --refresh.
  • Never claim success unless verification confirms the event is gone.

Canonical commands

Agenda (deterministic listing)

  • Today: gcalcli --nocolor agenda today tomorrow
  • Next 14d (weekday resolution): gcalcli --nocolor agenda today +14d
  • Next 30d (meaning-first locate): gcalcli --nocolor agenda today +30d
  • Custom: gcalcli --nocolor agenda

Search (fallback / explicit request)

  • Default (~6 months): gcalcli --nocolor search "" today +180d
  • Custom: gcalcli --nocolor search ""

Create — add (one-off events)

  • Overlap preflight (tight, cross-calendar):
  • gcalcli --nocolor agenda
  • IMPORTANT: do NOT add --calendar here; overlaps must be checked across all non-ignored calendars.
  • Timed event:
  • gcalcli --nocolor --calendar "" add --noprompt --title "" --when "<Start>" --duration <minutes></code></li><li>All-day event:</li><li><code>gcalcli --nocolor --calendar "<Cal>" add --noprompt --allday --title "<Title>" --when "<Date>"</code></li><li>With reminders (repeatable flag):</li><li><code>--reminder "20160 popup"</code> → 14 days before (20160 = 14×24×60)</li><li><code>--reminder "10080 popup"</code> → 7 days before</li><li><code>--reminder "0 popup"</code> → at event start</li><li>Time unit suffixes: <code>w</code> (weeks), <code>d</code> (days), <code>h</code> (hours), <code>m</code> (minutes). No suffix = minutes.</li><li>Method: <code>popup</code> (default), <code>email</code>, <code>sms</code>.</li></ul><h3>Create — <code>import</code> via stdin (recurrence / free/busy)</h3><p>Use ONLY when <code>add</code> can't cover the need (recurring events, TRANSP, etc.).</p><p>Pipe ICS directly via stdin — never write temp files.</p><pre><code>echo 'BEGIN:VCALENDAR VERSION:2.0 BEGIN:VEVENT DTSTART;VALUE=DATE:20260308 SUMMARY:Event Title RRULE:FREQ=YEARLY TRANSP:TRANSPARENT END:VEVENT END:VCALENDAR' | gcalcli import --calendar "<Cal>" </code></pre><ul><li><code>DTSTART;VALUE=DATE:YYYYMMDD</code> for all-day; <code>DTSTART:YYYYMMDDTHHmmSS</code> for timed.</li><li><code>RRULE:FREQ=YEARLY</code> — yearly recurrence. Also: <code>DAILY</code>, <code>WEEKLY</code>, <code>MONTHLY</code>.</li><li><code>TRANSP:TRANSPARENT</code> — free; <code>TRANSP:OPAQUE</code> — busy (default).</li><li>One import call = one event (one VEVENT block). For multiple events, run separate piped imports.</li><li>Add <code>--reminder "TIME"</code> flag(s) to set reminders (overrides any VALARM in ICS).</li><li>All import-specific flags (<code>--use-legacy-import</code>, <code>--verbose</code>, etc.) go AFTER <code>import</code>.</li></ul><h3>Delete (with post-delete verification)</h3><ul><li>Locate via agenda (preferred):</li><li><code>gcalcli --nocolor agenda <dayStart> <dayEnd></code> (exact date)</li><li><code>gcalcli --nocolor agenda today +14d</code> (weekday)</li><li><code>gcalcli --nocolor agenda today +30d</code> (meaning only)</li><li>Delete (non-interactive, bounded):</li><li><code>gcalcli --nocolor delete --iamaexpert "<query>" <start> <end></code></li><li>Verify (same window):</li><li><code>gcalcli --nocolor agenda <dayStart> <dayEnd></code></li><li>Optional one retry if still present:</li><li><code>gcalcli --nocolor --refresh agenda <dayStart> <dayEnd></code></li></ul><h3>Edit / Modify existing events</h3><ul><li><code>gcalcli edit</code> is interactive — cannot be used in non-interactive exec.</li><li>To change properties not editable in-place: <strong>delete + recreate</strong> the event.</li><li>Locate → delete (with <code>--iamaexpert</code>) → create with updated properties → verify.</li><li>For bulk property changes (e.g. setting all events to free): iterate delete+recreate per event.</li></ul></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 1 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v1.0.0</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-05-03 08:14 安全 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <div class="sec-grid"> <div class="sec-card"> <h4>腾讯云安全 (Keen)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://tix.qq.com/search/skill?keyword=a971478e082064cff62701954db2b508" target="_blank">查看报告</a> </div> <div class="sec-card"> <h4>腾讯云安全 (Sanbu)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://static.cloudsec.tencent.com/html-report-v2/2026/05/26/430745_c9c8047687c326848cfb5672f766f354.html?q-sign-algorithm=sha1&q-ak=AKID8JMG1bzBC1dz96qNhssfFftujT1NCoFi&q-sign-time=1782763038%3B1814299038&q-key-time=1782763038%3B1814299038&q-header-list=host&q-url-param-list=&q-signature=c9340c612d39859829e841f962209ce47484eaf4" target="_blank">查看报告</a> </div> </div> </div> </div> <!-- Recommended Skills --> <div style="margin-top:24px;"> <h2 style="font-size:18px;font-weight:600;margin-bottom:16px;">🔗 相关推荐</h2> <div class="rec-grid"> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">office-efficiency</span> <h3><a href="/s/word-docx">Word / DOCX</a></h3> <div class="rec-owner">ivangdavila</div> <div class="rec-desc">创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 465</span> <span style="color:#5b6abf;">📥 155,646</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">dev-programming</span> <h3><a href="/s/git-essentials-1-0-0">Git Essentials 1.0.0</a></h3> <div class="rec-owner">mbright4497</div> <div class="rec-desc">Git 关键命令和工作流,涵盖版本控制、分支和协作。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 0</span> <span style="color:#5b6abf;">📥 571</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">office-efficiency</span> <h3><a href="/s/gog">Gog</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 932</span> <span style="color:#5b6abf;">📥 187,421</span> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>