-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Description
Summary
I want AFFiNE to support syncing a folder of .md files (local or on a server path) into an AFFiNE workspace, so the folder becomes a “source of truth” that stays synchronized with AFFiNE documents.
What I’m requesting
A feature that lets users select a folder (local or server-mounted) and enable continuous sync between:
-
filesystem Markdown files (
.md) -
AFFiNE pages/docs
Core requirements
-
Folder → AFFiNE sync
-
Detect create/update/delete/rename of
.mdfiles -
Mirror folder structure as a tree in AFFiNE (folders → collections/spaces/trees)
-
-
AFFiNE → Folder sync
-
Saving a page updates the corresponding
.mdfile -
Renaming a page renames the file
-
Moving a page updates the folder path
-
-
Stable mapping
-
Keep a stable relationship between file and doc (even if renamed/moved)
-
Suggested: store an internal ID in frontmatter (
affine_id) or sidecar file
-
-
Conflict handling
- If both changed, show diff + choose resolution (or keep both)
-
Frontmatter support
- Preserve YAML frontmatter (tags, title, created/updated, custom metadata)
-
Selective sync rules
-
Include/exclude patterns (
**/tmp/**,.git,*.bak, etc.) -
Option to sync only a subfolder
-
Nice-to-haves
-
Git-friendly output (stable formatting, no random reorder)
-
Support multiple folders (multiple “mounts” into workspace)
-
Option to export AFFiNE-only block features into Markdown in a predictable way
-
CLI mode for servers (headless sync daemon)
Why this matters
This would let AFFiNE fit into real-world workflows where the filesystem + git is the canonical storage, while AFFiNE becomes the best UI layer on top of it.
Questions
-
Is there an existing roadmap item for “folder sync” or “filesystem workspace”?
-
Would you prefer implementing it as a plugin, or core feature?
-
If plugins are possible: what hooks/APIs exist for file watchers + doc CRUD?
Use case
I keep my knowledge base as Markdown files in a filesystem folder (git-backed). I want:
-
To keep editing in my editor (VS Code, Neovim, etc.)
-
While also using AFFiNE for visual organization, blocks, linking, and collaborative workflows
-
Without manual import/export or losing folder structure
Today, most tools either:
-
import once (no ongoing sync), or
-
export in a way that breaks stable file paths, IDs, or structure.
Anything else?
No response
Are you willing to submit a PR?
- Yes I'd like to help by submitting a PR!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status