# SiYuan

> Open-source, local-first, privacy-first personal knowledge management system with block-level references, Markdown WYSIWYG editing and encrypted sync.

SiYuan is an open-source, privacy-first personal knowledge management system developed under the siyuan-note organization and the B3log open-source community. It combines a block-based Markdown WYSIWYG editor with block-level references, bidirectional links, databases, flashcards and multi-device sync. The latest release listed on GitHub is v3.8.6, and the project is licensed under AGPL-3.0.

## What It Is

SiYuan is a note-taking and knowledge workspace in which the content block is the basic unit of organization. Paragraphs, headings, lists and other content can be edited, referenced, embedded and organized independently, so users can manage knowledge at block granularity and still work with long documents. Data is stored in a local workspace folder, and the app works offline.

## Editing, Linking and Review

The editor offers block-style Markdown WYSIWYG editing, list outlines, block zoom-in, and mathematical formulas, charts, flowcharts and Gantt charts. Block references and backlinks, a relationship graph view, SQL query embeds and custom block attributes connect notes. Database table views with relations, rollups and templates, and flashcard spaced repetition using the FSRS algorithm, support organization and learning. Export formats include standard Markdown with assets, PDF, Word and HTML.

## AI, Extensibility and CLI

AI features connect to the OpenAI API for writing assistance and Q/A chat. The tool also offers Tesseract OCR, template and JavaScript/CSS snippets, plugins, themes, widgets, a community marketplace and a kernel API. A built-in command-line interface works directly on workspace data without a running server, with commands for notebooks, documents, blocks, search, SQL queries, export and import, and sync. Search supports JSON output and asset-content search.

## Deployment and Sync

SiYuan runs as desktop apps and as Android, iOS and HarmonyOS apps. It can also be self-hosted through Docker, with a lock-screen access code or OIDC authentication, and community guides cover Kubernetes, Unraid and TrueNAS. Sync uses end-to-end encryption with incremental transfer. The Docker deployment is browser-only and does not support desktop or mobile app connections, PDF/HTML/Word export, or Markdown import. Third-party sync disks are not supported, as they may corrupt data.

## Features
- Block-level references and two-way links
- Markdown WYSIWYG block editor
- List outline and block zoom-in
- Million-word large document editing
- Database table view with relations and rollups
- FSRS flashcard spaced repetition
- AI writing and Q/A chat via OpenAI API
- Tesseract OCR
- End-to-end encrypted sync
- Export to Markdown, PDF, Word and HTML
- Web clipping and PDF annotation
- Plugins, themes, widgets and community marketplace
- Kernel API and command-line interface
- Docker self-hosting
- Relationship graph view

## Integrations
OpenAI, Docker, Kubernetes, Unraid, TrueNAS, OIDC, Chrome/Edge extension, WeChat MP, Zhihu, Yuque

## Platforms
WINDOWS, MACOS, LINUX, ANDROID, IOS, WEB, API, CLI, BROWSER_EXTENSION

## Pricing
Open Source

## Version
v3.8.6

## Links
- Website: https://b3log.org/siyuan
- Documentation: https://siyuan-en.b3log.org/
- Repository: https://github.com/siyuan-note/siyuan
- EveryDev.ai: https://www.everydev.ai/tools/siyuan
