Back

Smart Sync (Markdown & Obsidian)

Smart Sync keeps a Card and a Markdown file on your computer in step, in both directions. Edit the note in Obsidian, Logseq, VS Code or any text editor and the change comes back to the Card; edit the Card in Lino and the change goes back to the file. Use it when your notes should keep living in a folder — a vault you still open elsewhere, or files under version control — while you also think with them on a Canvas.

A binding is a pair: one Card, one file. Smart Sync works on this computer only, because the file is on this computer.

Turn it on

Smart Sync is switched on when you import.

  1. Open Settings → Import and choose Obsidian, Bear, Logseq or Markdown. See Import for each step.
  2. In the import dialog, select the files and tick Smart Sync — "Keep these cards and their Markdown files in step, both ways."
  3. Click Import. The message ends with with Smart Sync.

Each imported Card is now bound to its file. Lino adds a lino-id line to the file's frontmatter, so the file remembers which Card it belongs to even if you move the folder and import it again.

You need to be signed in. If the checkbox is greyed out, this computer has not finished setting up yet (Sync binding needs this device to finish setup.).

Reconnect files you imported or exported before

If you import a file that already has a lino-id for a Card you still have — say, a file you synced before, or one you made with Export as Markdown — keep Smart Sync ticked. The Reconnect review box lists those files, each set to Reconnect to its existing Card. The Card is bound to the file instead of being copied. See Import → Re-importing.

How to tell a Card is synced

  • Corner mark. A bound Card shows a small blue folder mark at its top-right corner on the Canvas. Hover it to see Markdown binding, the file name and when it last synced.
  • Properties. Open the Card's Properties: Binding shows the file name, and Synced shows the time of the last sync.
  • Settings. Settings → Import → Smart Sync lists every binding on this computer (see below).

How syncing works

Lino notices a change

About every 30 seconds Lino checks your bound pairs. When a Card or its file has changed since the last sync, a notification appears:

Card-file sync needed · 3 pairs

It has two buttons and a close button:

  • Sync — sync those pairs now.
  • Review — open the changed file in the Right Panel so you can look at it first. (If the file can't be found, it opens Settings → Import instead.)
  • × — ignore these pairs for now. Lino won't ask about them again until you restart the app.

You can also sync a single pair any time with Sync now in Settings → Import → Smart Sync.

The two sides are merged

Say you added a sentence to the "Photosynthesis" Card in Lino, and on the same day fixed a typo in Photosynthesis.md in Obsidian. When you click Sync:

  • Frontmatter (Concept, Aliases, Variable and other properties) is merged field by field against the last synced version. A field changed on only one side takes that side's value. A field changed on both sides takes the newer one, and Lino tells you which side won, for example status changed on both sides; the file's version is newer and won.
  • The note's text is merged by Lino AI. It is given the last synced version and both current versions, and returns one merged text, which is written to both the Card and the file. It gets no tools and reads nothing else. In the example, both your new sentence and the typo fix are kept.

Nothing untouched can go missing

Before anything is written, Lino checks the merge. If a line that was in all three versions — the last synced text, the Card and the file — is missing from the result, the merge has lost something nobody deleted. Lino then stops and writes nothing to either side: Sync stopped: the merge dropped a line from … Nothing was written. Your Card and your file stay exactly as they were.

Cards hidden from AI

A Card marked Hide from AI is never sent to the AI model, so its text is not merged by AI:

  • If only one side changed, that side is copied to the other, as is.
  • If both sides changed, sync stops and tells you to open both and keep the one you want.

See Privacy & What Is Sent.

Manage bindings

Settings → Import → Smart Sync shows how many files are bound on this device and lists each binding. Click the refresh button to reload the list.

Each row shows the Card (or Canvas) name, the file name and full path, and a badge:

BadgeMeaning
Card fileA Card bound to a Markdown file. Shows Last sync.
Canvas folderA Canvas bound to a folder for Lino AI to work in. See Canvas Binding.
missingThe file or folder is no longer at that path.
orphanThe binding lost its file and is waiting to be fixed or removed.

The buttons on each row:

  • Sync now — queue a sync for this pair (Card files only).
  • Re-bind — pick a different file (or, for a Canvas folder, a different folder). Use this after you move or rename a file.
  • Unbind — remove the binding. You're asked Unbind "Photosynthesis.md"? — the file stays where it is, and the Card stays in Lino. They simply stop syncing.

Tips

  • Moved or renamed the file? The row shows missing. Click Re-bind and pick the file at its new place.
  • Bindings belong to this computer. On another computer the Card is still there (it syncs with your account), but it has no file binding until you import the folder there with Smart Sync.
  • Canvas folders are different. Binding a whole Canvas to a folder doesn't sync Cards with files. It gives Lino AI a folder to read, write and run commands in while you work on that Canvas. See Canvas Binding.