TechEarl

How to View Your Calendar From the macOS Command Line (cal and icalBuddy)

View a calendar from the macOS Terminal with the built-in cal command (this month, three months, a whole year), then read your actual Calendar.app events with icalBuddy. The TCC permission step is the part that trips people up.

Ishan Karunaratne⏱️ 8 min readUpdated
Share thisCopied
View a calendar in the macOS Terminal with cal and ncal, then read your real Calendar.app events with icalBuddy after granting the Calendar permission.

There are two different questions hiding inside "show my calendar in the Terminal," and macOS answers them with two different tools. If you want a quick month grid to count days or check what weekday a date falls on, the built-in cal does it with no install. If you want your actual events, the meetings and birthdays sitting in Calendar.app, cal cannot help you at all, and you reach for icalBuddy instead. This page covers both, in that order.

cal ships with macOS. Run it with no arguments and you get the current month, today highlighted:

bash
cal

A single month is rarely what you want, though. The flag I use most is -3, which prints the previous, current, and next month side by side, which is exactly the context you need when you are scheduling something near a month boundary:

bash
cal -3

To print an entire year, pass the year as a single argument:

bash
cal 2026

There is also a -y flag that prints the current year, so cal -y and cal 2026 reach the same twelve-month grid by different routes (the flag uses today's year, the bare argument lets you name any year).

And to jump to one specific month in a specific year, pass the month number first, then the year. There is no comma and no flag, just two numbers:

bash
cal 7 2026

That prints July 2026. The order matters: cal 7 2026 is "month 7 of 2026," whereas cal 2026 (a single value) is read as a whole year, not the year 2026's first month. If you ever get a full-year grid when you wanted one month, you left off the month number.

Vertical layout and week numbers with ncal

macOS also ships ncal, a sibling of cal that prints the same data in a vertical layout (days of the week run down the left edge instead of across the top). Some people simply find it easier to scan:

bash
ncal

The reason to reach for ncal specifically is week numbers. The -w flag prints the week-of-year number under each column:

bash
ncal -w

One accuracy caveat on those numbers: the BSD ncal shipped with macOS counts weeks from the start of the year, and despite what the man page implies it does not strictly follow the ISO 8601 first-Thursday rule, so near January the figure can differ from a true ISO week number. For day-to-day "which week is this," it is fine; do not wire it into anything that needs ISO-compliant week dates without checking.

A second note worth knowing, because it wastes people's time: -w is documented in cal's own help text, but it only actually works under ncal. Run cal -w and the week numbers do not appear. This is a quirk of the fact that cal and ncal are the same binary behaving differently based on the name you invoke it by. If you want week numbers, use ncal.

ncal also takes the same year and month arguments, so ncal 2026 and ncal 7 2026 work the way you would expect.

What cal cannot do: your real events

Here is the wall everyone hits. cal and ncal are pure date arithmetic. They draw a grid of numbers and highlight today. They have no connection whatsoever to Calendar.app, to your Google or iCloud calendars, or to a single event you have ever created. They literally do not know what a meeting is.

So if you searched for "view my calendar from the Mac command line" hoping to see your 10am standup printed in the Terminal, cal is the wrong tool and no flag fixes that. You need something that reads the actual Calendar database. That tool is icalBuddy.

Read your actual Calendar.app events with icalBuddy

Unlike cal and ncal, icalBuddy is not built into macOS. It is a third-party command-line tool written by Ali Rantakari, and you install it yourself through Homebrew. Note the formula name is hyphenated (ical-buddy) while the command it installs is camel-cased (icalBuddy):

bash
brew install ical-buddy

Once it is installed, the two commands that cover most of what people want are today's events and the week ahead:

bash
icalBuddy eventsToday
bash
icalBuddy eventsToday+7

eventsToday+7 prints everything from now through seven days out, and the +N is general: eventsToday+1 is today and tomorrow, eventsToday+30 is the month ahead. icalBuddy reads whatever Calendar.app has synced, so any account you have added there (iCloud, Google, Exchange) shows up without extra configuration.

The Calendar permission prompt (the part that blocks you)

The first time you run an icalBuddy command, macOS will pop a permission dialog asking whether the Terminal may access your Calendars. This is TCC (Transparency, Consent, and Control), the same privacy gate that guards your camera and microphone, and it has applied to calendar access since macOS Mojave. You have to click OK, or icalBuddy returns nothing and looks broken.

If you dismissed that prompt, or you are running icalBuddy from a script that never showed a dialog, grant it manually. Open System Settings, go to Privacy and Security, then Calendars, and switch on the terminal app you are running from (Terminal, iTerm, or whatever you use). On recent macOS releases the calendar store can additionally sit behind Full Disk Access, so if Calendars alone does not unblock it, add your terminal app under Full Disk Access too and restart the terminal.

This permission is per terminal app, not per command, so you grant it once and every later icalBuddy run just works.

The no-install alternative: osascript and AppleScript

If you would rather not install anything, macOS ships osascript, which runs AppleScript from the shell, and Calendar.app is scriptable. This is the built-in way to pull real events without Homebrew. To dump today's event titles:

bash
osascript -e 'tell application "Calendar" to get summary of (every event of every calendar whose start date ≥ (current date) and start date < (current date) + 1 * days)'

Two honest caveats keep this from being my first choice. First, it trips a different privacy gate than icalBuddy: scripting another app goes through TCC's Automation category, not Calendars, so the first run pops an "allow Terminal to control Calendar" dialog, and a denial makes the script fail with AppleScript error -1743 rather than returning empty. You grant it under System Settings, Privacy and Security, Automation. Second, osascript talks to Calendar.app over Apple events, which is noticeably slower than icalBuddy reading the store directly, and the AppleScript date filtering is fiddly to extend past a one-liner. For anything beyond a quick "what is on today," icalBuddy is the cleaner tool; for a zero-install peek, this works.

FAQ

See also

Sources

Authoritative references this article was fact-checked against.

TagscalncalicalBuddymacOSTerminalCLIcalendar

Found this useful? Pass it on.

Copied

Ishan Karunaratne

Tech Architect · Software Engineer · AI/DevOps

Tech architect and software engineer with 20+ years building software, Linux systems, and DevOps infrastructure, and lately working AI into the stack. Currently Chief Technology Officer at a healthcare tech startup, which is where most of these field notes come from.

Keep reading

Related posts