Thanks to visit codestin.com
Credit goes to github.com

Skip to content

An open source personal productivity platform built on Markdown, turbo charged with the scripting power of Lua

License

Notifications You must be signed in to change notification settings

silverbulletmd/silverbullet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SilverBullet

SilverBullet is an open source personal productivity platform built on Markdown, turbo charged with the scripting power of Lua. You self host it on your server, access it via any modern browser on any device (desktop, laptop, mobile). Since SilverBullet is built as a Local First PWA, it is fully offline capable. Temporarily don't have network access? No problem, SilverBullet will sync your content when you get back online.

You may start your SilverBullet journey by simply thinking of it as a note taking app. Because, well, it is. You write notes in Markdown and get Live Preview. It looks WYSIWYG while still easily accessing the markdown that lies underneath. You can create Links to other pages, via the [[other page]] syntax. As you navigate your Space (that's what we call a SilverBullet instance) by clicking these links, you will see Linked Mentions to get a feel of how your pages are inter-linked.

Then you learn that in SilverBullet, you can embed Space Lua (SilverBullet's Lua dialect) right into your pages, using the special ${lua expression} syntax. You try something simple, like ${10 + 2}. Ok, that's cool. As you learn more, you start tagging pages and adding Frontmatter. As it turns out, pages (and other things) are indexed as Objects. You realize you can query these objects like a database.

Imagine the possibilities. Before you know it — you realize you're effectively building applications in your notes app. End-User Programming, y'all. It's cool.

You may have been told there is no such thing as a silver bullet.

You were told wrong.

Introduction to SilverBullet

Features

SilverBullet...

  • At its core is a note taking application, a kind of personal wiki, storing its notes in the universal Markdown format in a folder on your server.
  • Is a web application and therefore accessible from wherever a (modern) web browser is available.
  • Is built as a Local First PWA keeping a copy of your content in your browser's local database, syncing back to the server when a network connection is available, enabling 100% offline operation.
  • Provides an enjoyable Markdown writing experience with a clean UI, rendering text using Live Preview, further reducing visual noise while still providing direct access to the underlying markdown syntax.
  • Supports wiki-style page linking using the [[page link]] syntax. Incoming links are indexed and appear as Linked Mentions at the bottom of the pages linked to thereby providing bi-directional linking.
  • Is optimized for keyboard-based operation:
    • Quickly navigate between pages using the page switcher (triggered with Cmd-k on Mac or Ctrl-k on Linux and Windows).
    • Run commands via their keyboard shortcuts or the command palette (triggered with Cmd-/ or Ctrl-/ on Linux and Windows).
    • Use Slash Commands to perform common text editing operations.
  • Is a platform for End-User Programming through its support for Objects and Space Lua.
  • Can be extended using Space Lua and Plugs, and a lot of core functionality is built that way.
  • Is self-hosted: you own your data. Your space is stored as plain files in a folder on disk on your server. Back it up, sync, edit, publish, script it with any additional tools you like.
  • Is free, open source, MIT licensed software.

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 both the front-end.

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

  • Deno: Used to build the frontend and plugs
  • Go: Used to build the backend

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.

To build everything and run the server:

air <PATH-TO-YOUR-SPACE>

Alternatively, to build just the frontend:

deno task build

To build the backend (note: this will bundle the frontend into the same binary, so be sure to build that first):

go build

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

Build a docker container

Note, you do not need Deno 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

About

An open source personal productivity platform built on Markdown, turbo charged with the scripting power of Lua

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages