rscalendar
rscalendar is a small Rust CLI for viewing and changing Google Calendar events.
The first version is intentionally CLI-first. It talks directly to the Google Calendar REST API and uses a bearer token supplied through an environment variable instead of implementing OAuth login inside the app.
Requirements
- Rust toolchain
- A Google OAuth access token with permission to manage calendar events
Export the token before running the app:
Build, test, and lint
Build the application:
Run the full test suite:
Run a single test:
Format the code:
Check formatting without rewriting files:
Run Clippy:
Usage
Show the built-in CLI help:
List upcoming events from the primary calendar:
Create a timed event:
Create an all-day event:
For all-day events, the CLI treats the --end date as inclusive and converts it to Google Calendar's exclusive end-date format.
Update an event:
Delete an event:
Use a non-primary calendar by adding --calendar-id.
Architecture
The app currently lives in a single binary crate:
src/main.rscontains the CLI definitions, the Google Calendar HTTP client, request payload helpers, and unit tests for date parsing and sparse patch generation.claphandles command parsing.reqwestperforms authenticated REST calls.serdeandserde_jsonmap Google Calendar request and response payloads.chronoparses RFC3339 timestamps and date-only all-day events.
This version supports four operations:
listfor upcoming eventscreatefor inserting eventsupdatefor patching selected event fieldsdeletefor removing events