Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a CLI front-end to the (formerly Address database?


mycontacts --email '*' # to get Googlers
share|improve this question

Contacts still has AppleScript support. You can see documentation for the supported properties and commands by opening its dictionary in AppleScript Editor.

osascript -e 'tell app "Contacts" to properties of people where vcard contains ""'

I didn't find a way to check the actual email fields using a single specifier.

set l to {}
tell application "Contacts"
    repeat with p in people
        repeat with e in (get value of emails of p)
            if contents of e ends with "" then set end of l to name of p
        end repeat
    end repeat
end tell
share|improve this answer
Thanks, upvoting because it's a solution to the actual query I requested but it isn't a generic solution so I won't accept just yet. – Robottinosino Nov 25 '12 at 15:22

The closest thing to a generic solution is Shane Celis's contacts command available at This is also available as a package in homebrew, which can be installed with: $ brew install contacts

There are other options that may also work for you. Contacts just stores info in a sqlite database so you can access it with the sqlite command. You could create a custom script to accomplish a particular task if you want.

Scott Stevenson had a tool called abtool up that was popular for a while, but it appears to be a dead link now. You might also try searching through some of the stuff on GitHub. In particular, since Shane Celis's app appears unmaintained (while still functioning well), there are some who are building replacements.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.