Skip to content

feat(calendar): add create-calendar command#455

Merged
steipete merged 3 commits intoopenclaw:mainfrom
alexknowshtml:feature/calendar-create
Apr 20, 2026
Merged

feat(calendar): add create-calendar command#455
steipete merged 3 commits intoopenclaw:mainfrom
alexknowshtml:feature/calendar-create

Conversation

@alexknowshtml
Copy link
Copy Markdown
Contributor

@alexknowshtml alexknowshtml commented Mar 16, 2026

Summary

  • Adds gog calendar create-calendar <name> command to create secondary Google Calendars
  • Supports --description, --timezone, --location flags
  • Outputs calendar ID and summary in both text and JSON modes
  • Includes dry-run support

Details

Currently, creating a secondary Google Calendar requires raw API calls outside the CLI. This command wraps Calendars.Insert() and follows the same Kong patterns as other calendar subcommands.

create-calendar takes a positional name argument and optional flags. Returns the calendar ID and summary in both text and JSON modes. Supports --dry-run to preview without creating.

Useful for programmatic calendar setup — e.g., creating dedicated calendars for availability blocking or project-specific scheduling.

Test plan

  • go build ./... compiles without errors
  • gog calendar create-calendar "Test Calendar" --timezone America/New_York creates the calendar
  • Calendar appears in gog calendar calendars list
  • JSON mode works with --json flag
  • Dry-run mode works with --dry-run
  • Delete test calendar via Google Calendar UI after testing

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@alexknowshtml alexknowshtml force-pushed the feature/calendar-create branch from 7527b26 to 48310bf Compare March 17, 2026 00:09
alexknowshtml and others added 3 commits April 20, 2026 16:53
Create new secondary Google Calendars via the API.

Usage:
  gog calendar create-calendar "My Calendar" --timezone America/New_York

Supports --description, --timezone, --location flags.
Outputs calendar ID and summary in both text and JSON modes.
Includes dry-run support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Alex Hillman <alex@indyhall.org>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@steipete steipete force-pushed the feature/calendar-create branch from c9f2e83 to 1537a9b Compare April 20, 2026 16:14
@steipete steipete merged commit db3a324 into openclaw:main Apr 20, 2026
5 checks passed
@steipete
Copy link
Copy Markdown
Collaborator

Landed in db3a324 after a cleanup/polish pass.

Changes added while landing:

  • removed unrelated .byline cache files from the PR branch
  • validated IANA timezone names before API calls
  • made dry-run avoid opening the Calendar service
  • included location in text output
  • added request/body, text, dry-run, and validation tests
  • added README/spec/CHANGELOG entries

Verified locally with go test ./internal/cmd -run TestCalendarCreateCalendarCmd, make lint, make test, make build, and make ci. Also live-tested with clawdbot@gmail.com by creating a secondary calendar, verifying summary/timezone/location, and deleting it through the same auth path.

Thanks again @alexknowshtml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants