从源码构建需 Node.js 24+ 与 npm 10+,以及通过 rustup 安装的稳定版 Rust;开发时客户端与服务端需分别构建,改客户端后要重新执行 npm run build;Docker 运行需把数据目录挂载到容器内 /data,否则笔记不会持久化
silverbullet
silverbulletmdMIT活跃维护用 Markdown 和 Lua 搭建的可定制知识库,适合个人和团队做笔记与知识管理,能按需扩展功能。
The malleable knowledge base for you and your team. Powered by Markdown and Lua.
docker build -t silverbullet .
docker run -p 3000:3000 -v <PATH-TO-YOUR-DATA-FOLDER>:/data silverbulletREADME 未说明具体硬件要求;服务端为 Rust 二进制,可本地运行或用 Docker 运行,未提及 GPU 或显存需求
基于 Markdown 和 Lua 的可编程自托管知识库,把笔记变成可查询、可脚本化的系统
用 Markdown 和 Lua 搭建的可定制知识库,适合个人和团队做笔记与知识管理,能按需扩展功能。
核心能力
- 用 Markdown 页面组成 Space,支持双向链接的 wiki 式导航
- 内置数据库与 SLIQ 查询语言,把笔记当对象检索
- 集成 Space Lua 脚本,动态生成内容、命令、模板与组件
- 提供实时预览编辑器与大纲、任务等写作工具
- 前端 TypeScript 加 Rust 服务端,可 Docker 自托管
容易踩的坑
- 2.12.1最新正式版2026-10-12 · 2026-10-12 06:28 UTC
- Security: the filesystem API refuses access to dot-prefixed files and directories, consistent with space listings.
- Fix: HTTP file validators respect
If-None-Matchprecedence, and file reads and conditional writes tolerate proxies that weaken or transform ETags. - Fix: YAML data blocks split only on standalone
---lines; X-Ray includes attributes added during indexing. - Fix:
system.reboot()preserves external edits and clears cached widgets. Reopening a page restores a remembered scroll position of zero. - Fix: the [[Runtime API]] returns JSON for query rows, null values, dates and other Lua values without serialization crashes, and remains usable after the client reloads its UI.
- SLIQ errors offer more specific explanations for common mistakes.
- Public spaces expose
robots.txtand a sitemap of content pages, with canonical URLs and descriptions in the initial HTML. Metadata pages are excluded from the sitemap and markednoindex; encoded page names render correctly, frontmatter is hidden, and missing pages return HTTP 404. Read-only spaces show a “Page not found” view with a link home. - Client builds remove stale bundle chunks and omit source maps from release binaries.
- 2.12.02026-10-06 · 2026-10-06 07:42 UTC
查看更新说明
- 2.11.12026-09-22 · 2026-09-22 15:20 UTC
查看更新说明
- Fix (Windows): Git operations for revision history no longer open a terminal window and steal focus.
- Fix: HTML, CSS, and JavaScript files in a space open directly again, restoring print preview libraries that serve generated HTML from
/.fs/. - Fix: X-Ray and lint tooltips remain readable when dark mode follows the system setting, including when that setting changes while SilverBullet is open.
- Git connection checks now allow more time for large repositories and detect an existing remote's default branch when a new space connects.
identity.mentions(recipient, options)exposes the Mention Inbox data to Space Lua and the CLI.- More non-Markdown documents can now be edited (with syntax highlighting in case of source code) in the editor. Media can also be played now: audio, video, and PDF documents open in native in-editor viewers. Do not ask for fancy editing features, SB shall not devolve in to a general purpose code editor! (famous last words)
- Files and folders can be dragged onto the file tree to upload them.
There is no stable SB+ release associated with this one, since we're going through an Electron transition there. You can try the edge builds if you want to try SB+ with these changes https://silverbullet.plus/download (scroll to the bottom)
- 2.11.02026-09-17 · 2026-09-17 13:12 UTC
查看更新说明
- 2.10.02026-07-28 · 2026-07-28 12:44 UTC
查看更新说明
Release notes: https://no.silverbullet.plus/2-10
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
SilverBullet
SilverBullet is a Programmable, Private, Browser-based, Open Source, Self Hosted, Personal Knowledge Database — a fancy term for a "notes app on steroids".
Yowza! That surely is a lot of adjectives to describe a browser-based Markdown editor programmable with Lua.
Let’s get more specific.
SilverBullet combines a clean live-preview editor with wiki-style linking, a built-in database and query language, and a fully integrated Space Lua scripting environment, turning your notes into a programmable system that grows with you.
In SilverBullet you keep your content as a collection of Markdown Pages (called a Space). You navigate your space using the Page Picker like a traditional notes app, or through Links like a wiki (except they are bi-directional).
If you are the writer type, you’ll appreciate SilverBullet as a clean Markdown editor with Live Preview. If you have more of an outliner personality, SilverBullet has Outlining tools for you. Productivity freak? Have a look at Tasks. More of a database person? You will appreciate Objects and Queries (SLIQ).
And if you are comfortable programming a little bit — now we’re really talking. You will love dynamically generating content with Space Lua (SilverBullet’s Lua dialect), or to use it to create custom Commands, Page Templates or Widgets.
You were told there’s no such thing as a silver bullet. You were told wrong.
Much more detail can be found on silverbullet.md
Installing SilverBullet
Check out the instructions.
Developing SilverBullet
SilverBullet's frontend ("client") is written in TypeScript and built on top of the excellent CodeMirror 6 editor component. Additional UI is built using Preact. ESBuild is used to build the frontend.
The server backend is written in Rust (a Cargo workspace). It serves the pre-built client bundle, the file/space HTTP API, authentication, and a headless-Chrome runtime for server-side Lua.
Code structure
bin/silverbullet/: The standalonesilverbulletserver binary (Rust) (this is the one you generally run)bin/sb/: ThesbCLI client (Rust)bin/plug-compile.ts: the plug compilerclient/: The SilverBullet client (browser, TypeScript)server/: The SilverBullet server library (Rust): HTTP router, handlers, auth, runtime seamserver-common/: Shared Rust crate (space primitives, shared types)server-runtime-chrome/: Headless-Chrome runtime backend (Rust)plugs: Set of built-in plugs (TypeScript) that are distributed with SilverBulletlibraries: A set of libraries (space scripts, page templates, slash templates) distributed with SilverBullet (Space Lua)plug-api/: Useful APIs for use in plugs and published to NPMlib/: Useful libraries to be used in plugssyscalls/: TypeScript wrappers around syscallstypes/: Various (client) types that can be references from plugs
scripts/: Useful scriptsdocs/: documentation (published as docs.silverbullet.md and bundled as Desktop's Help)
Requirements
- Node.js 24+ and npm 10+: Used to build the frontend (client) and plugs
- Rust (stable, via
rustup): Used to build the server
The project includes .nvmrc and .node-version files. If you use nvm or another Node version manager, it will automatically use the correct Node.js version:
nvm use # If using nvm
First, install dependencies:
make setup
To create a (release) build:
make
This will produce silverbullet and cli binaries in ./target/release/, run ./target/release/silverbullet to run the server.
Development workflow
SilverBullet has two halves you rebuild independently:
- The client (TypeScript:
client/) is built by ESBuild intoclient_bundle/, which the server then serves. - The server (Rust:
server/,server-common/,server-runtime-chrome/,bin/silverbullet/) is a compiled binary.
Run the server in development with cargo run. A debug build serves the client bundle live from client_bundle/ on disk (a release build embeds it instead):
npm run build
cargo run <PATH-TO-YOUR-DATA-FOLDER>
When you change only the client (TypeScript in client/): you do not need to restart the server. Rebuild just the client bundle and reload the page in your browser — the debug server serves the freshly-built bundle straight from disk:
npm run build
To build a self-contained release binary (with the client bundle embedded), and run it:
make
./target/release/silverbullet <PATH-TO-YOUR-DATA-FOLDER>
Useful development tasks
# Clean all generated files
make clean
# Typecheck and lint all code
make check
# Format all code
make fmt
# Run all tests
make test
# Run benchmarks
make bench
Build a docker container
Note, you do not need Node.js nor Rust locally installed for this to work:
docker build -t silverbullet .
To run:
docker run -p 3000:3000 -v <PATH-TO-YOUR-DATA-FOLDER>:/data silverbullet