Create a new Xcode project
Xcode -> Create New Project...
macOs -> Command Line Tool
Product Name: CalendarCLI
Select project in the navigator -> Targets: CalendarCLI -> Sining & Capabilities -> Signing
Bundle Identifier: [com.yoursite.CalendarCLI]
Make Info.plist
File -> New -> File from Template... [⌘ N]
Search: "Property List"
Save As: Info.plist
Select Info
from navigator -> Open As > Source Code
Paste below to the Info.plist
Code (main.swift)
Paste below to main.swift
Build
Product -> Build [⌘ B]
The executable goes to something like:
~/Library/Developer/Xcode/DerivedData/CalendarCLI-epaeyjhibywlyqbuuhetpwnjddow/Build/Products/Debug/CalendarCLI
Run
Run the app
$(find ~/Library/Developer/Xcode/DerivedData -name "CalendarCLI" -type f -path "/Build/Products/Debug/" -print -quit)
Run with alias
Make an alias in ~/.zshrc
(for Z shell)
Output
Repo
https://github.com/minho42/CalendarCLI