clawdex/docs/vcard-export.md
Peter Steinberger be315dd311
docs: add clawdex.sh feature pages and Rolodex-themed site
Adds 14 per-feature docs pages under docs/ covering install, quickstart,
people, notes, timeline, search, avatars, imports, vCard export, git
sync, markdown storage, doctor, and config. Replaces the placeholder
landing page with a single-page Rolodex/index-card site that fetches and
renders the docs client-side via marked + highlight.js, with code syntax
highlighting and dark-mode support. .nojekyll keeps GitHub Pages serving
the markdown files raw to the SPA.
2026-05-08 16:50:41 +01:00

2.5 KiB

vCard Export

clawdex export vcard writes one or more people as RFC 6350 vCards. The result imports cleanly into Apple Contacts, Google Contacts, iOS Contacts, Outlook, and most other address books.

This is the outbound half of clawdex. Imports bring the world in; vCard export sends a curated slice back out.

Export everything

clawdex export vcard --all -o contacts.vcf
clawdex export vcard --all --include-avatars -o contacts.vcf

Without --include-avatars, the file is text-only and small. With it, each person's avatar is embedded as a base64 PHOTO;ENCODING=b payload. A few hundred avatars adds up — expect a few megabytes.

Export one person

clawdex export vcard --person sally -o sally.vcf
clawdex export vcard --person sally@example.com -o sally.vcf

The --person argument accepts the same query string that clawdex person show accepts: an ID, a name substring, an email, or a phone number.

Stream to stdout

-o - writes to stdout, so you can pipe directly:

clawdex export vcard --person sally -o - | pbcopy            # macOS
clawdex export vcard --all       -o - | wl-copy             # wayland
clawdex export vcard --person sally -o - | mail -a contacts.vcf you@example.com

What's in the vCard

Each vCard includes:

  • FN — display name from person.md
  • N — best-effort surname/given split
  • EMAIL per email entry, with the original kind as a TYPE parameter when present
  • TEL per phone entry, with the original kind as a TYPE parameter
  • NOTE — short summary from the person body, when present
  • PHOTO;ENCODING=b — only when --include-avatars is set
  • UID — the person's stable ID slug, so re-imports update existing cards instead of duplicating

Round-tripping

Apple Contacts and Google Contacts both treat repeated UID as an update trigger. That means you can:

  1. Import from Apple → markdown.
  2. Edit names / emails / tags in markdown.
  3. clawdex export vcard --all -o contacts.vcf.
  4. Drag the .vcf into Apple Contacts → it updates existing cards in place.

This is the closest thing clawdex has to two-way sync today, and it works because vCard files are dumb, well-understood text. Programmatic Sync is still preview-only.