altra's profile picture
altra

calendar

Public

Local calendar awareness: see today's and upcoming events, search them, and find free time slots from macOS Calendar or ICS files.

118 Downloads

1 star

README

Calendar Plugin for LM Studio — Local Calendar Awareness for Your AI

Keywords: lm studio plugin, calendar ai, local schedule assistant, macos calendar integration, ics file reader, free slot detection, offline calendar ai

Local calendar awareness for LM Studio. Query today's schedule, find upcoming events, search by keyword, and detect free slots — using macOS Calendar.app or any .ics file. Today's events are optionally injected into every new chat session so the model always knows your schedule.


What It Does

  • Today's events — ask "what's on my calendar today?" and get a structured list
  • Upcoming events — look ahead N days (default 7)
  • Keyword search — find events by title or location
  • Free slot detection — find gaps ≥ N minutes in a day for scheduling
  • Auto-injection — today's events prepended to every new chat session (configurable)
  • Dual source — macOS Calendar.app (via AppleScript) or any .ics file

Who This Is For

  • macOS users who want their AI to know their schedule without manual copy-paste
  • People who manage calendars via .ics files and want natural language access to them
  • Anyone wanting schedule-aware LLM responses (free slot detection, conflict surfacing) without cloud sync
  • Users who rely on LM Studio as a daily assistant and want context carried into every session

Installation

cd calendar-plugin
npm install
npm run build

Load the built plugin folder in LM Studio.


Requirements

  • macOS — Calendar.app source requires macOS with Calendar.app and Accessibility permissions granted
  • Any platform — ICS file source works cross-platform

To grant Accessibility permission: System Settings → Privacy & Security → Accessibility → allow LM Studio (or Terminal if running lms dev).


Configuration

FieldDefaultDescription
Calendar Sourcemacosmacos = Calendar.app via AppleScript; ics = parse an .ics file
ICS File Path(blank)Absolute path to .ics file. Used when source is ics
Default Days Ahead7How many days upcoming looks forward
Inject Today into PrompttruePrepend today's events to every new chat session

Tool: calendar

Single tool with four actions.

today

All events for today (or a specific date).

calendar(action="today")
calendar(action="today", date="2025-06-15")

upcoming

Events in the next N days.

calendar(action="upcoming")
calendar(action="upcoming", days_ahead=14)

Find events matching a keyword in title or location.

calendar(action="search", keyword="standup")
calendar(action="search", keyword="dentist", date="2025-06-01")

free_slots

Find free blocks of at least N minutes on a given day.

calendar(action="free_slots")
calendar(action="free_slots", date="2025-06-16", min_gap_minutes=60)

All actions share these parameters:

  • date — ISO date string YYYY-MM-DD (default: today)
  • days_ahead — days to look ahead (upcoming only)
  • keyword — search term (search only)
  • min_gap_minutes — minimum free block size in minutes (free_slots only, default 30)

How Prompt Injection Works

When Inject Today into Prompt is enabled, the first message of every session gets prepended with today's events:

[Today's calendar — Tuesday, 2025-06-10:
• 09:00–10:00  Team standup (Conference Room A)
• 14:00–15:30  Design review
• 17:00–18:00  1:1 with manager]

<your message here>

The LLM uses this to answer scheduling questions, suggest meeting times, or surface conflicts without you having to ask explicitly.


Example Workflows

Morning briefing:

"What does my day look like?" → calendar(action="today")

Find time for a meeting:

"When am I free for an hour tomorrow?" → calendar(action="free_slots", date="2025-06-11", min_gap_minutes=60)

Upcoming travel:

"Do I have anything scheduled next week?" → calendar(action="upcoming", days_ahead=7)

Find a specific event:

"When is my dentist appointment?" → calendar(action="search", keyword="dentist")

💚 Support Development

This plugin is free and open source. If you find it useful, consider supporting development:

Ko-fi
TierAmountPerks
☕ Coffee$3Name in credits
🍔 Lunch$10+ Priority support
🍕 Pizza$25+ Name in README
🏆 Founding$50+ Lifetime support, consultation

Every coffee helps keep this project alive! ☕