Inkling
All docs

Integrating

Obsidian vault sync (experimental)

Two-way sync with an Obsidian vault through inklingctl.

Rendered from docs/VAULT-SYNC.md in the repository. Markdown source

Two-way sync between a folder of markdown notes (an Obsidian vault, or a sub-folder of one) and an Inkling workspace. 한국어: VAULT-SYNC.ko.md.

Still experimental in 0.17. The server routes stay off unless EXPERIMENTAL_FEATURES lists vault-sync. 0.17 closed the data-loss paths found while checking it (see Status), but two required conditions are not met yet.

Server: add vault-sync to EXPERIMENTAL_FEATURES (e.g. EXPERIMENTAL_FEATURES=vault-sync).

inklingctl login --server https://notes.example.com
inklingctl sync ~/Vault/Inkling --workspace "Team notes"     # run it whenever you like
inklingctl sync ~/Vault/Inkling --workspace "Team notes" --dry-run

Instead of a password login you can use an API token (Settings → Connections → API tokens): inklingctl login --token, or INKLING_TOKEN=ink_pat_… inklingctl sync … for one run. A token limited to one page's subtree syncs only that subtree, and new top-level notes are refused. See apps/cli/README.md.

Use a dedicated folder per workspace; the first run links the folder to that workspace and later runs refuse a different one.

What happens on each run

SituationResult
note changed only in the vaultuploaded; the file is then rewritten in Inkling's normal form
page changed only in Inklingfile updated
both changed, different linesmerged line by line, both sides updated
both changed, same linesconflict: your note is left as is, Name (conflict 2026-11-07).md holds both versions with <<<<<<< markers. Fix the note, delete the conflict copy, run sync again
note deleted in the vault, page unchangedpage moved to the Inkling trash
page deleted in Inkling, note unchangednote moved to .inkling/trash/<date>/
deleted on one side, edited on the otherthe edit wins (the note is restored / re-created)
file renamed or movedpage renamed / moved (and vice versa)
new note / new pagecreated on the other side; new folders become folder pages
page with sub-pages / folder renamed or moved in the vaultthe same page or folder page is renamed or moved (comments, locks and grants stay)
folder deleted in the vaultits notes and the folder page go to the trash (only folders that held notes at the last completed run; an empty folder missing from a copy is made again)
run cut off (network, crash)run again: pages are created once, and a write whose answer was lost is recognised
server refuses one note (edit lock, read-only token) or one attachment (size, type)that one is skipped and listed; the rest syncs and the run exits 0

Pages being edited in the browser are safe: a vault upload that would overwrite unsaved browser typing is rejected by the server and merged instead.

Mapping

Known losses

The first sync rewrites notes into Inkling's markdown style (* bullets, *italic*, padded tables, \ line breaks inside paragraphs). After that, files only change when content changes. Kept as plain text (not interpreted): callouts > [!note] (shown as quotes), ![[Page]] page embeds, ==highlight==, %%comments%%, math, inline fields key:: value. Canvases (.canvas files and canvas pages) and collection (database) pages are not synced; each run lists the canvases. Collection rows sync as plain notes without their field values. Attachments: vault edits of files under assets/ are not uploaded.

Blocks you leave alone keep their ids, so comments and section links on them stay. A mention chip or a file/audio block in a paragraph you edit becomes @Label / a link. If the minimal edit cannot be applied, the page is rewritten and its blocks get new ids (KNOWN-ISSUES SYNC-3). Images inside table cells are dropped on upload (VSYNC-3).

Upgrading from 0.16. The first upload of a note last synced by 0.16 merges once with the new form (block tokens, revision marker md2); an edit on the line next to an embed then gives one conflict copy, and nothing is lost.

State lives in <folder>/.inkling/ (sync-state.json, base/ copies used for merging, trash/). If it is deleted, notes are re-linked through their inkling-id frontmatter; notes that differ from the server then show up as conflicts (there is no common base to merge against).

Status and what is left

0.17 checked vault sync against a list of conditions fixed before testing (tests under apps/server/src/routes/ unless noted). The flag stays on because R13 is open and one path that can drop block identity is untested.

IDConditionKindEvidenceResultNotes
R1Create, both directionsrequiredvaultSyncReadiness "R1 R2"passlinked notes, sub-folders
R2Modify, both directionsrequiredvaultSyncReadiness "R1 R2", "R7 (and R2)", "R8 (and R2)"pass (fixed)before: a vault edit deleted embeds, plugin blocks and charts
R3Delete, both directions, no resurrectionrequiredvaultSyncReadiness R3 (3 tests + empty folder)pass (fixed)before: a page deleted with its sub-pages folder came back; a deleted folder was made again
R4Rename, both directionsrequiredvaultSyncReadiness "R4 R5" (3 tests)pass (fixed)before: a folder rename made a new folder page; Topic.md + Topic/ rename lost the children
R5Move, both directionsrequiredsamepass (fixed)
R6Concurrent edits: merge or conflict copy, nothing lostrequiredvaultSyncReadiness R6passincl. edit-vs-delete both ways; KNOWN-ISSUES A-M6 (meta TOCTOU) remains
R7Block ids survive a round trip (comments, section anchors)requiredvaultSyncReadiness "R7 block ids", "R7 (and R2) blocks Markdown cannot carry"pass with caveatsuntouched blocks, other-section edits and the 412 merge keep ids; the full-rewrite fallback is untested and gives new ids (SYNC-3); ink is per page, not per block; a mention chip in an edited paragraph becomes @Label
R8Frontmatter and tags round triprequiredvaultSyncReadiness R8 (2 tests)pass (fixed)before: nested maps and block scalars vanished from the note
R9Interrupted and resumed: no duplicates, no lossesrequiredvaultSyncResume (fault before / after / kill at every request; first sync killed)pass (fixed)14-request mixed run × 3 fault modes; first sync 8 requests × kill; attachment uploads not in the sweep. Before: a cut create duplicated pages, a lost PUT answer made a false conflict copy
R10Upgrade from pre-0.15.0 revision tokensrequiredvaultSyncReadiness R10 (2), vaultSyncRevision (5)passincl. 0.16 → 0.17
R11Attachments: no loss, skips announcedrequiredvaultSyncReadiness R11pass (fixed)/files links of image/pdf/mp3 kept; local files untouched; svg and a 26 MB mp4 skipped and listed. Before: one oversize attachment failed every run; inline images vanished. Images in table cells still dropped (VSYNC-3)
R12Canvas: no damage or lossrequiredvaultSyncReadiness R12pass (fixed)not synced; now listed each run (before: skipped silently)
R13Security parity on sync routesrequiredvaultSyncSecurity (13) + agentTaint, accessLeaks, guests, editLock, tokenRange, snapshotChain (146)opensuggest-only, read-only and subtree tokens, guests, locks, others' private pages and outsiders are refused on writes; sync reads do not record flagged content for the suggest-only rule (TAINT-1)
R141,000-file vaultrequiredvaultSyncScale (VSYNC_SCALE_N=1000; CI default 100)passdocs/PERFORMANCE.md
O1Attachment files synced both waysoptional—not builtserver → vault downloads; vault edits under assets/ are not uploaded
O2Canvas content syncedoptional—not builtlisted only

R14, measured on an Apple M4 shared with other agents (CLI through tsx against a test app, local Postgres 16 in Docker): a first upload of 1,000 notes takes 23.5 s with the rate limiter off and 120.1 s with it on (5 waits on 429); a run with no changes 0.4 s / 1.3 s; a first download of 1,000 pages 4.4 s / 15.5 s.

Left before the flag can go:

  1. Decide TAINT-1 for sync reads (record flagged content on POST /sync/read and the 412 and replay bodies, keep it as it is, or a CLI-only exception) and, with it, whether read-only tokens may pull (POST /sync/read refuses them today; opening it also opens it to suggest-only tokens). Recording it would make a token suggest-only right after its first sync in any workspace with one suspicious line.
  2. Test the minimal-edit fallback (whole-document rewrite) and keep block ids there, or make it refuse and write a conflict copy instead (SYNC-3).
  3. Run the two mixed-version combinations (0.17 CLI with a 0.16 server, 0.16 CLI with a 0.17 server) for real; so far they were checked by reading the code.
  4. Sync creates do not queue the "new page" webhook and leave created_via empty (the change feed has them, VSYNC-4).
  5. Confirm at review the six behaviour changes of 0.17 (CHANGELOG, 0.17.0 Upgrade notes): block tokens and the md2 marker; folder deletes trash the folder page (reverses ADR 0202's "folders are not deleted by sync", ADR 2167); a stale-revision PUT that changes nothing answers 200; creates take a clientKey and replay; a 403 on one note is skipped and the run exits 0; X/ next to X.md is X's sub-page folder.

Design: docs/adr/0200–0202, 1920, 2166–2169.

Markdown sourceView on GitHubAll docs