Importing from other apps

~4 min read

Importing from other apps

lettuce import migrates notes from another app into a Lettuce vault. It’s non-destructive — the source is only read; nothing in the source app or export is modified. Each note’s Markdown is normalized from the source app’s dialect into Lettuce’s, attachments are copied into the vault, and a migration report prints what changed and what needs a human eye.

lettuce import --from <app> <source> [--vault dir] [--include-non-md] [--dry-run]
Tip

The same importer is available in the app: File ▸ Import… opens a wizard with the same sources. The CLI is the scriptable path and the one to reach for with large libraries.

Supported sources

--from App Source you point at Notes
obsidian Obsidian vault folder Converts callouts, ![[embeds]], %%comments%%, ^block-refs; flags Dataview/Templater.
bear Bear Markdown/Textbundle export, or the live database.sqlite #multi word# tags → #multi-word; image attachments copied.
ulysses Ulysses export folder or .textbundle/.textpack Close to standard Markdown. Raw-library <uuid>-ulgroup folders are flattened; a normal Markdown export’s real folders are kept.
iaWriter iA Writer folder or .textbundle/.textpack Standard Markdown; pass-through.
notion Notion the .zip export or its unzipped folder Strips page-id suffixes, page links → [[wikilinks]], CSV databases → Markdown tables.
evernote Evernote a .enex file or a folder of them ENML → Markdown (needs pandoc); embedded resources extracted to attachments; tags preserved.
roam Roam Research Markdown export folder Outliner normalization (see below); {{[[TODO]]}} → checkboxes, {{embed [[page]]}}[[page]], unresolvable ((refs)) stripped.
logseq Logseq graph folder Outliner normalization (see below); - TODO/- LATER/- DONE markers → checkboxes; drops id::/collapsed:: noise.
appleNotes Apple Notes (nothing — reads the app) Exports via AppleScript; HTML → Markdown (needs pandoc). First run prompts for Automation permission.
generic any a folder of .md/text No app-specific dialect; pass-through.
Note

evernote and appleNotes convert HTML to Markdown via pandoc — install it (brew install pandoc) before importing from those. The others need no external tools.

Note

Outliner normalization is shared by roam and logseq (they use the same rules): all four task forms above → checkboxes, {{embed [[page]]}}[[page]], unresolvable ((block-refs)) stripped, and id::/collapsed:: property lines dropped. The per-row columns above just list the markers each app actually emits.

  1. Dry-run to see the report without touching the vault:

    lettuce import --from obsidian ~/ObsidianVault --vault ~/Notes --dry-run
    
  2. Read the report — it lists notes imported, attachments copied, and any migration notices (e.g. a Dataview block left intact for you to convert by hand).

  3. Run it for real (drop --dry-run). Importing into a non-empty vault never overwrites: a name collision lands as Note 2.md, and existing attachments are kept.

  4. Check link health afterwards:

    lettuce lint ~/Notes        # unresolved links, orphans, hygiene
    

Apple Notes

Apple Notes has no on-disk export you can hand to the importer, so this source drives the app over AppleScript and needs no source path:

lettuce import --from appleNotes --vault ~/Notes

The first run prompts macOS for permission to control Notes. Large libraries are slow (each note is an Apple Events round-trip), and attachments aren’t exported (AppleScript has no stable accessor for them) — the note bodies come over as Markdown.

Exit codes