The Dev Note App That Fixes What Obsidian Can’t (SiYuan)

BBetter Stack
Computing/SoftwareSmall Business/StartupsInternet Technology

Transcript

00:00:00This might be the best alternative to Obsidian and Notion that I've found yet.
00:00:05Most of us devs think our notes are organized until we actually need something.
00:00:10Mine are a complete mess, but to me, they're organized.
00:00:14Markdown files, broken links, some random Notion pages that I've just thrown in there.
00:00:18Our code has structure, my notes, they don't.
00:00:21This is CUI.
00:00:23An open source personal knowledge tool that lets you refactor thoughts, like code, with
00:00:28permanent block IDs, databases, built-in SQL, and a full local self-hosted control that
00:00:33we get.
00:00:34Now our notes work more like our code.
00:00:36In the next few minutes, I'll show you why it might make the best dev note-taking tool
00:00:40yet.
00:00:42CUI is a local-first open source knowledge based.
00:00:50Most tools link files, CUI links blocks.
00:00:53So each paragraph, each list, each code block, gets its own permanent ID.
00:00:59Now when we move things around, it's not breaking.
00:01:02And that's a big deal if you're writing docs, tracking bugs, or just organizing architecture.
00:01:06Plus, on top of that, you get built-in databases, SQL queries, offline support, and Docker self-hosting.
00:01:13So instead of choosing between power and ownership, we get both with this.
00:01:18Let me show you what that actually looks like.
00:01:20If you enjoy open source tools and coding tips, be sure to subscribe to the Better Stack
00:01:24channel.
00:01:25We have videos coming out all the time.
00:01:27Now basically I just pulled the repo, added this Docker Compose file, and then launched
00:01:31with Docker Compose.
00:01:33It was all up and running in like a minute, so nothing hectic here.
00:01:37Now with a new notebook, I'm all ready to go.
00:01:40I can create a note, add a tile.
00:01:43This basically functions exactly like Notion.
00:01:46And I can now add a code block.
00:01:48Let me drop in some Python.
00:01:50I'm going to embed this block somewhere else too.
00:01:54And here's the key moment.
00:01:55I move the original block and the reference still works.
00:01:59No broken links ever.
00:02:01That changes how we think and how we work.
00:02:04We can stop worrying about where something lives and just focus on where it's useful.
00:02:09Now let's create a quick task database.
00:02:12I'm going to add some kind of bug.
00:02:14We can give it a status, I can give it a priority.
00:02:16And because SQL is built in, I can now query it directly inside my notes.
00:02:23Then on top of this, I can jump into graph view to see how everything's connected.
00:02:26This graph view is actually crazy and I love this functionality.
00:02:30That's the main idea here though, folks.
00:02:31It's stable blocks, real databases and structure that holds up with this graph that we can actually
00:02:37interact with to see how all these pins are connected with inside our database.
00:02:43So really useful.
00:02:45So now how is this different from what we're already using?
00:02:47Well with Obsidian, everything is file-based.
00:02:50With CUN, everything is block-based.
00:02:53That means we're not linking to a page.
00:02:55You're linking to the exact piece of knowledge inside of it.
00:02:58It could be a decision, a bug, a snippet.
00:03:00That's the difference.
00:03:01Obsidian feels like really strong folder of notes.
00:03:04CUN feels more like structured systems and you get databases and SQL without hunting for
00:03:09any plugins.
00:03:10Now compare this to Notion.
00:03:12Notion gives you the structure, but again, it's up there on the cloud.
00:03:16CUN gives you the same structure locally, offline, open source.
00:03:21I'm not paying for things.
00:03:22So devs are using this for project docs, code snippets, personal wikis, even knowledge bases.
00:03:29It's basically a second brain that is local and open source, but structured like a system
00:03:34design document.
00:03:35So Notion.
00:03:36Obsidian.
00:03:37Now, if we're being honest about it, which we should, it's great.
00:03:40It updates fast, self-hosting takes just like a minute or two with Docker.
00:03:45Block references make big notes feel stable inside of all this fragile ecosystems and databases
00:03:51give you serious structure without relying on the cloud.
00:03:54But on the flip side, well, I guess I should say on the downside, not the good side.
00:03:59The downside, CUN doesn't store everything as plain Markdown.
00:04:03It uses its own weird format, .Sci.
00:04:06So take that with a grain of salt.
00:04:08You can export Markdown, but it's just not native to the system.
00:04:11The plugins market is way smaller, especially in English because this is Chinese based.
00:04:17Some people think the UI feels a bit dated, but honestly, it just looks like Notion.
00:04:21And with the really huge workspaces, you might need to run optimization sometimes.
00:04:25Here's the simplest way to decide if you should use this or not.
00:04:29If your setup is mostly Markdown files and plugins, Obsidian still makes sense.
00:04:34But if your notes are turning into documentation, systems, and long-term knowledge, CUN starts
00:04:40to feel a lot better.
00:04:42Use it if you want structured data, strong linking, and full control.
00:04:46My take on all this?
00:04:47If you're looking for a new way to organize your notes and aren't already heavily invested
00:04:51in Notion, then use it.
00:04:53But let's be real.
00:04:54If you're already using Notion and you haven't for a while, this is going to be a pain in
00:04:58the ass to switch to.
00:05:00It's probably just worth it to keep Notion or Obsidian at that point.
00:05:03If your current system is starting to break down, this is worth trying.
00:05:06This is great.
00:05:08Really useful, especially having that knowledge-based graph chart.
00:05:11If you enjoy open source coding tools and tips like this, be sure to subscribe to the Better
00:05:15Stack channel.
00:05:16We'll see you in another video.

Key Takeaway

SiYuan serves as a local-first, open-source knowledge base that treats notes like code through permanent block-level IDs and built-in SQL databases to prevent the link rot common in file-based systems like Obsidian.

Highlights

  • SiYuan assigns a permanent ID to every block, including paragraphs, lists, and code snippets, preventing broken links when moving content.

  • The application supports native SQL queries and built-in databases for structured data management without requiring external plugins.

  • Deployment is possible via Docker Compose, allowing for a fully self-hosted, local-first environment in approximately one minute.

  • Storage is handled in a proprietary .Sci format rather than native plain Markdown, though Markdown export remains an option.

  • A dynamic graph view provides a visual map of interconnected pins and data points within the local database.

  • SiYuan functions as an open-source, offline alternative to Notion, offering similar structured systems and documentation capabilities.

Timeline

Block-Level Architecture and Functional Overview

  • Knowledge is organized into individual blocks rather than traditional files.
  • Each block receives a unique, permanent identifier to ensure link stability during refactoring.
  • The system includes native support for SQL queries and databases for high-level organization.

Standard note-taking often results in disorganized Markdown files and broken links. By assigning IDs to every paragraph and code block, the tool allows users to move content without losing references. This architecture supports tracking bugs, writing documentation, and managing complex system architectures locally.

Local Deployment and Practical Workflow

  • A Docker Compose file enables rapid self-hosting and setup in under two minutes.
  • Embedded code blocks maintain active references even after the source content moves.
  • The interactive graph view visualizes the connections between database pins and notebook pages.

The setup process involves pulling the repository and launching via Docker for immediate offline use. Users can embed Python snippets or other code blocks in multiple locations, and these references remain valid regardless of the original block's location. A task database example demonstrates how status and priority tags integrate with SQL for direct in-note querying.

Comparison with Obsidian and Notion

  • Obsidian focuses on file-based storage while SiYuan prioritizes structured block systems.
  • Notion provides similar structure but operates primarily as a cloud-based service.
  • SiYuan offers professional-grade features like databases and SQL without the need for third-party plugins.

Obsidian acts as a powerful folder of notes, but it lacks the granular block-linking found here. Notion offers strong organizational structure but compromises data ownership by being cloud-reliant. This tool bridges the gap by providing Notion-like databases in an open-source, local-first environment suitable for project documentation and personal wikis.

System Limitations and Critical Trade-offs

  • The native storage format is .Sci instead of universal plain Markdown.
  • The English-language plugin marketplace is limited due to the software's Chinese origins.
  • Large workspaces occasionally require manual optimization to maintain performance.

While highly stable, the proprietary .Sci format means Markdown is an export option rather than the default storage method. The user interface may appear dated to some users, though it mirrors the functional layout of Notion. Switching costs are high for users deeply invested in other ecosystems, making it most valuable for those whose current file-based systems are failing under the weight of complex documentation.

Community Posts

View all posts