Importing from other apps
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]
--from <app>— which app the notes come from (see the table). Case-insensitive; hyphens are ignored, so--from apple-notes,--from appleNotes, and--from applenotesare equivalent. Defaults togeneric(a plain Markdown folder).<source>— the export to read: a folder, a.textbundle/.textpack, a Notion.zip, or an Evernote.enexfile. Omit it for--from appleNotes— that source reads the running Notes app directly (no file to point at).--vault dir— the destination vault. Defaults to the current directory.--include-non-md— also bring over non-Markdown text files found alongside the notes (off by default; attachments referenced by notes are always copied regardless). Converting.docx/.htmland similar requirespandoc(PDFs use the built-in reader).--dry-run— parse and report without writing anything. Always do this first.
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. |
evernote and appleNotes convert HTML to Markdown via pandoc — install it (brew install pandoc) before importing from those. The others need no external tools.
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.
Recommended flow
Dry-run to see the report without touching the vault:
lettuce import --from obsidian ~/ObsidianVault --vault ~/Notes --dry-runRead 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).
Run it for real (drop
--dry-run). Importing into a non-empty vault never overwrites: a name collision lands asNote 2.md, and existing attachments are kept.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
0— imported at least one note.1— nothing was imported (empty/unrecognised source) or a read error occurred.2— usage error (unknown--from, or a missing source path for a file-based source).
Related
Getting started/06 Migrating from another app — the friendly walkthrough
CLI cookbook/00 Overview — global conventions
CLI cookbook/10 lettuce search — confirm your notes came over
Troubleshooting/01 Agent edits not appearing — for after you’ve connected an agent