calsync docs

Install without Docker

One Python package gives you the web page and the command line.

Install

You need Python 3.10 or newer and pipx.

pipx install git+https://github.com/jakescalesAI/calsync
calsync web

Open http://localhost:8484. From the same machine the page asks only for a password. From another machine, or through a proxy, it also asks for a setup code, which calsync web prints when it starts. The page syncs in the background while calsync web runs.

To update later, run pipx upgrade calsync.

The command line

calsync web
The web page and background sync.
calsync setup
Store your Google or Microsoft sign-in app.
calsync auth
Sign in an account: google, outlook or ics.
calsync calendars
List the calendars on your accounts.
calsync add
Add a calendar to the sync.
calsync remove
Take a calendar out of the sync.
calsync run
One sync pass. Add --dry-run to preview.
calsync purge
Delete the copies calsync made.
calsync status
Show the calendars and the last run.
calsync new
Add an event from plain text.

Using only the command line

calsync setup google                 # store the sign-in app. Hidden prompts.
calsync auth google personal         # sign in. The label is yours to choose.
calsync setup microsoft
calsync auth outlook work            # sign in with a device code
calsync auth ics school              # a published .ics link, read only

calsync calendars                    # list calendars on every account
calsync add main personal primary
calsync add work work CALENDAR_ID --busy-only --skip main
calsync add school school ics --read-only
calsync status

The arguments are NAME ACCOUNT CALENDAR_ID, then any flags. --busy-only, --read-only and --skip OTHER_NAME match the three options on the web page. A .ics link is a single calendar with the ID ics. calsync remove NAME takes a calendar out.

Preview, then sync

calsync run --dry-run    # show what would change. Changes nothing.
calsync run              # one sync pass

Put it on a timer

If you do not run calsync web, run calsync run every few minutes. The repository has a sample systemd service and timer in its deploy folder. With cron, every 5 minutes:

*/5 * * * * calsync run >> $HOME/.calsync/run.log 2>&1

Cron has a small environment. If you set CALSYNC_HOME, set it on the cron line too, and use the full path to calsync.

Quick add

Add an event from plain text. It goes on your main calendar, then calsync syncs so it appears everywhere.

calsync new Dentist tomorrow 3pm 1h
calsync new Dentist tomorrow 3pm 1h --check   # show how it was read, add nothing

The way out

calsync purge --dry-run   # list the copies calsync made
calsync purge             # delete them. Your own events stay.