A TypeScript/Node.js application that integrates with macOS Contacts using Python for native contact access.
- Access and display contacts from macOS Contacts
- Export contacts as JSON
- TypeScript/Node.js interface with Python backend
- Real-time contact change detection and syncing
- macOS
- Node.js
- Python 3
pyobjc-framework-Contacts
- Mew account and user root URL
- Clone this repository
- Install Node.js dependencies:
npm install
- Install Python dependencies:
pip install -r requirements.txt
- Build TypeScript:
npx tsc
- Build the TypeScript code:
npx tsc
- Run the application with your Mew user root URL:
Replace
node dist/mewContacts.js <your_mew_user_root_url>
<your_mew_user_root_url>
with your Mew user root URL.
The application will:
- Start listening for contact changes
- Perform an initial sync of all contacts
- Automatically sync any changes to contacts in real-time
- Restart the sync process if it crashes
- Open System Settings → Privacy & Security → Contacts
- If Python/Terminal isn't listed:
- Run the script once
- If still not appearing, restart Terminal and try again
- Enable permission for Python/Terminal
If you encounter permission issues:
- Ensure Terminal has Full Disk Access in Privacy & Security
- Try removing and re-adding Terminal's permission
- Restart your computer if issues persist
- Check Console.app for error messages