MCPcopy
hub / github.com/silverbulletmd/silverbullet

github.com/silverbulletmd/silverbullet @2.9.0 sqlite

repository ↗ · DeepWiki ↗ · release 2.9.0 ↗
2,661 symbols 8,611 edges 505 files 310 documented · 12%
README

GitHub Repo stars Docker Pulls GitHub Downloads (all assets, all releases) GitHub contributors Ask DeepWiki

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 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 Go.

Code structure

  • client/: The SilverBullet client, implemented with TypeScript
  • server/: The SilverBullet server, written in Go
  • plugs: Set of built-in plugs that are distributed with SilverBullet
  • libraries: A set of libraries (space scripts, page templates, slash templates) distributed with SilverBullet
  • plug-api/: Useful APIs for use in plugs
  • lib/: Useful libraries to be used in plugs
  • syscalls/: TypeScript wrappers around syscalls
  • types/: Various (client) types that can be references from plugs
  • bin
  • plug_compile.ts the plug compiler
  • scripts/: Useful scripts
  • website/: silverbullet.md website content

Requirements

  • Node.js 24+ and npm 10+: Used to build the frontend and plugs
  • Go: Used to build the backend

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

It's convenient to also install air for development, this will automatically rebuild both the frontend and backend when changes are made:

go install github.com/air-verse/air@latest

Make sure your $GOPATH/bin is in your $PATH.

First, install dependencies:

make setup

To build everything and run the server (which automatically restarts upon file changing):

air <PATH-TO-YOUR-SPACE>

Alternatively, to build:

make

To run the resulting server:

./silverbullet <PATH-TO-YOUR-SPACE>

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 Go locally installed for this to work:

docker build -t silverbullet .

To run:

docker run -p 3000:3000 -v <PATH-TO-YOUR-SPACE>:/space silverbullet

Extension points exported contracts — how you extend this code

LuaQueryCollection (Interface)
(no doc) [6 implementers]
client/space_lua/query_collection.ts
KvPrimitives (Interface)
(no doc) [6 implementers]
client/data/kv_primitives.ts
Hook (Interface)
(no doc) [8 implementers]
client/plugos/types.ts
SpacePrimitives (Interface)
(no doc) [5 implementers]
client/spaces/space_primitives.ts
ShellBackend (Interface)
Shell backend interface [2 implementers]
server/types.go
DomWidget (Interface)
(no doc) [2 implementers]
client/codemirror/code_widget.ts
Option (FuncType)
Option configures a test server.
server/servertest/servertest.go
ManagedBlock (Interface)
(no doc)
plugs/configuration-manager/config_block.ts

Core symbols most depended-on inside this repo

get
called by 492
client/space_lua/runtime.ts
set
called by 226
client/space_lua/runtime.ts
syscall
called by 218
plug-api/syscall.ts
parseExpressionString
called by 207
client/space_lua/parse.ts
rawSet
called by 132
client/space_lua/runtime.ts
findNodeOfType
called by 118
plug-api/lib/tree.ts
jsToLuaValue
called by 114
client/space_lua/runtime.ts
rawGet
called by 106
client/space_lua/runtime.ts

Shape

Function 1,689
Method 720
Class 170
Struct 40
Interface 36
FuncType 4
Enum 1
TypeAlias 1

Languages

TypeScript86%
Go14%

Modules by API surface

client/space_lua/runtime.ts113 symbols
plug-api/syscalls/editor.ts101 symbols
client/space_lua/eval.ts67 symbols
client/data/object_index.ts43 symbols
client/client.ts42 symbols
plugs/object-graph/ui/components/graph_canvas.tsx40 symbols
client/space_lua/parse.ts38 symbols
client/space_lua/ast_narrow.ts34 symbols
client/space_lua/stdlib/pattern.ts30 symbols
website/Library/mermaid.plug.js29 symbols
client/space_lua/stdlib/format.ts26 symbols
client/data/mq.datastore.ts26 symbols

Dependencies from manifests, versioned

github.com/Diogenesoftoronto/go-gitignorev1.1.0 · 1×
github.com/ajg/formv1.5.1 · 1×
github.com/beorn7/perksv1.0.1 · 1×
github.com/cespare/xxhash/v2v2.3.0 · 1×
github.com/charlievieth/fastwalkv1.0.14 · 1×
github.com/chromedp/cdprotov0.0.0-2025072421293 · 1×
github.com/chromedp/sysutilv1.1.0 · 1×
github.com/djherbis/timesv1.6.0 · 1×

For agents

$ claude mcp add silverbullet \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact