Skip to content

aloware/CalendarSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CalendarSync

Automatically sync two Google Calendars with each other. Runs every 15 minutes on your Mac, completely hands-off after setup.

Example: You have you@aloware.com and you@other.com — this tool copies events between them so both calendars always show all your meetings.

Platform support

Platform Status Notes
macOS (Apple Silicon) Fully supported Auto-downloads binary, uses launchd for scheduling
macOS (Intel) Fully supported Same as above
Linux Not yet supported CalendarSync binary exists for Linux, but setup.sh would need a cron job instead of launchd. PRs welcome.
Windows Not supported Would need WSL or a rewrite using Task Scheduler

Setup (5 minutes)

Step 1: Get the files

git clone <this-repo-url>
cd CalendarSync

Step 2: Get the .env file

Ask your team admin for the .env file and drop it into this folder. It contains the Google credentials needed to connect.

Don't have it? See Admin Setup at the bottom.

Step 3: Run the setup script

./setup.sh

It will ask you four things:

  Email (e.g. you@aloware.com): you@aloware.com
  Label (e.g. Aloware): Aloware

  Email (e.g. you@other.com): you@other.com
  Label (e.g. Other): Other

The label is what gets added to synced event titles so you know where they came from (e.g. [Aloware] Team standup).

Step 4: Sign in with Google (4 times)

Your browser will open 4 times to sign in with Google:

Prompt Sign in as
1st your first calendar (e.g. you@aloware.com)
2nd your second calendar (e.g. you@other.com)
3rd your second calendar again
4th your first calendar again

Tip: If you see a "This app isn't verified" warning, click Advanced then Go to ... (unsafe). This is expected for internal OAuth apps.

Step 5: You're done

That's it. Your calendars will now sync every 15 minutes, automatically, even after restarting your Mac.


Day-to-day usage

You don't need to do anything. It runs in the background.

Synced events show up with a prefix like [Aloware] or [Other] so you can tell them apart from your real events.

Run a sync manually

cd ~/path/to/CalendarSync
./run-sync.sh

Check the logs

cat sync.log

Stop the automatic sync

./uninstall.sh

Stop and remove all synced events from both calendars

./uninstall.sh --clean

FAQ

How far back does it sync? From the start of last month to the end of next month (~3 months rolling window).

Does it sync all-day events? Yes.

Does it sync event changes? Yes. If you update an event on one side, the change syncs to the other.

Does it sync deletions? Yes. If you delete an event from the source, the synced copy gets removed.

Will it create duplicates? No. Each direction filters out events already synced from the other side using the title prefix.

What if I decline a meeting? Declined events are not synced.


Troubleshooting

Problem Fix
storage encryption key needs to be set Run ./setup.sh again — it auto-generates this key.
Browser keeps opening for auth Run ./uninstall.sh then ./setup.sh again to re-authenticate.
Not Found error Double-check the calendar email you entered during setup.
app not approved during sign-in Ask your Google Workspace admin to allow the OAuth app.

Admin setup

Only the team admin needs to do this once. Everyone else just uses the .env file you give them.

  1. Go to Google Cloud Console
  2. Create a project (or use an existing one)
  3. Enable the Google Calendar API (APIs & Services > Enable APIs)
  4. Go to Credentials > Create Credentials > OAuth 2.0 Client ID
  5. Application type: Desktop app
  6. Copy the Client ID and Client Secret
  7. Create a .env file in this repo with just two lines:
GOOGLE_OAUTH_CLIENT_ID=your-client-id-here.apps.googleusercontent.com
GOOGLE_OAUTH_CLIENT_SECRET=your-client-secret-here
  1. Share the .env file with your team (it's included in the repo)

That's it. The setup script auto-generates an encryption key for each user when they run ./setup.sh.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors