Importing OS X contacts to BBDB

by Chris Barrett

I’ve written a small elisp utility to import OS X Address Book contacts into BBDB. Get it from github.


I use OS X’s as my canonical address book. It syncs email addresses from Facebook and hooks into, and I have years of investment in it.

I never add new contacts from BBDB, so I’m happy to import everything from and wipe it from time-to-time when it gets out of sync.

There are a few existing riffs on this idea:

  • A python script on EmacsWiki
  • A ruby script (blog post)
  • An elisp script (github) that didn’t work for me with the current BBDB.

These are all flaky at some level – they either use foreign runtimes and
directly clobber your .bbdb, or they simply don’t work! yech!

The Solution

I’ve written an elisp package that shells out to the contacts utility, then
imports your contacts directly into BBDB. It also runs on a timer to
periodically import new contacts. Simple!

Source on github.


The import process will skip contacts that already exist instead of merging
them. This doesn’t worry me because of the way I use BBDB, but pull requests are welcome if other people want this addressed.