npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eventkit-node

v1.0.5

Published

A Node.js native addon that provides access to macOS [EventKit](https://developer.apple.com/documentation/eventkit) functionality, allowing you to work with calendars and reminders.

Readme

EventKit Node.js Addon

A Node.js native addon that provides access to macOS EventKit functionality, allowing you to work with calendars and reminders.

This library is a bridge between Node.js and Apple's EventKit framework, providing a JavaScript-friendly API for managing calendars, events, and reminders on macOS.

Prerequisites

  • macOS 10.15 or later
  • Node.js 14 or later
  • Xcode 12 or later with Command Line Tools installed

Installation

npm install eventkit-node

Quick Example

const { requestFullAccessToEvents, getCalendars } = require('eventkit-node');

async function main() {
  // Request access to calendars
  const granted = await requestFullAccessToEvents();
  
  if (granted) {
    // Get all event calendars
    const calendars = getCalendars('event');
    console.log('Available calendars:', calendars.map(c => c.title));
  } else {
    console.log('Calendar access was denied');
  }
}

main();

For more detailed examples, please see the Examples documentation.

Important: Privacy Descriptions Required

When using this library in your application, you must include the following privacy descriptions in your application's Info.plist:

<key>NSCalendarsUsageDescription</key>
<string>Your reason for accessing calendars</string>

<key>NSRemindersUsageDescription</key>
<string>Your reason for accessing reminders</string>

Without these descriptions, permission requests will silently fail.

API Overview

The addon provides a clean, JavaScript-friendly API for working with calendars and reminders.

Calendar Management

  • requestFullAccessToEvents() - Request full access to the user's calendars
  • requestFullAccessToReminders() - Request full access to the user's reminders
  • requestWriteOnlyAccessToEvents() - Request write-only access to the user's calendars
  • getCalendars(entityType) - Get calendars for a specific entity type (event or reminder)
  • getCalendar(identifier) - Get a calendar by its identifier
  • saveCalendar(calendarData, commit) - Create or update a calendar, with optional commit parameter
  • removeCalendar(identifier, commit) - Remove a calendar by its identifier
  • getDefaultCalendarForNewEvents() - Get the default calendar for new events
  • getDefaultCalendarForNewReminders() - Get the default calendar for new reminders

Event and Reminder Management

  • saveEvent(eventData, span, commit) - Create or update an event, with optional span and commit parameters
  • saveReminder(reminderData, commit) - Create or update a reminder, with optional commit parameter
  • removeEvent(identifier, span, commit) - Remove an event by its identifier, with optional span and commit parameters
  • removeReminder(identifier, commit) - Remove a reminder by its identifier, with optional commit parameter

Event Store Operations

  • commit() - Commit all pending changes to the event store
  • reset() - Reset the event store by discarding all unsaved changes
  • refreshSourcesIfNecessary() - Refresh the sources in the event store if necessary

Source Management

  • getSources() - Get all available calendar sources
  • getDelegateSources() - Get all delegate sources (macOS 12.0+)
  • getSource(sourceId) - Get a specific source by ID

Event and Reminder Queries

  • createEventPredicate(startDate, endDate, calendarIds?) - Create a predicate for querying events
  • createReminderPredicate(calendarIds?) - Create a predicate for querying all reminders
  • createIncompleteReminderPredicate(startDate?, endDate?, calendarIds?) - Create a predicate for querying incomplete reminders
  • createCompletedReminderPredicate(startDate?, endDate?, calendarIds?) - Create a predicate for querying completed reminders
  • getEventsWithPredicate(predicate) - Get events matching a predicate
  • getRemindersWithPredicate(predicate) - Get reminders matching a predicate (returns a Promise)
  • getEvent(identifier) - Get an event by its unique identifier
  • getCalendarItem(identifier) - Get a calendar item (event or reminder) by its identifier
  • getCalendarItemsWithExternalIdentifier(externalIdentifier) - Get calendar items with a specific external identifier

Documentation

For more detailed information, please refer to the following documentation:

Apple EventKit Documentation

This library is based on Apple's EventKit framework. For more information about the underlying APIs and concepts, please refer to:

Building from Source

# Install dependencies
npm install

# Build the addon
npm run build

# Build TypeScript definitions (if using TypeScript)
npm run build:ts

License

Mozilla Public License Version 2.0 (MPL-2.0)