SilverBullet v2: The Path Forward

SilverBullet has grown into a large project over the last three years. About half a year ago I started working on Lua integration, and this make me discover a significantly more elegant way to implement a bunch of features in SilverBullet than all the custom features I had built before.

Initially, I implemented this “alternative universe” style, but lately this has become a significant burden for me to mentally handle and maintain both these universes long term. Therefore, I contemplated taking a more radical approach and introducing a “v2” where I would do some serious rapture-style removal of features to simplify the product, but also keep it more sustainable by — well — primarily me (although I do get more and more outside contributions, which is great).

This is the topic where that conversation happened:

Honestly, it was :heart: warming to hear all the positive responses to this concern and this path forward.

To be clear, this move will be somewhat disruptive to you — my valued users — since you will be the one burdened to migrate all your existing queries, templates and scripts (a migration guide is forthcoming), and to accept that certain features are simply gone. My only argument against this is that you can pin your version, and stick with the “v1” series (technically 0.x) indefinitely and migrate whenever you like (or never). However, to keep my motivation to keep working on SilverBullet high, I need to do this.

So, we’re heading towards a v2 future, and it will come soon.

So partially this will be a release that removes certain features that have Lua equivalents, but there are also a few features that I will remove to simplify the code base and architecture. And some of those may be controversial.

Let me walk through some of those features and the reasoning behind it.

  • Online mode. This is likely the most controversial one. There was a long discussion already some time ago here: Who's using Online mode? about SilverBullet’s two modes. At the time I was ok keeping both Online and Sync mode, but as part of v2 have decided to cut the cord and go with Sync mode only. Likely I’ll add back a light-weight Online mode, that offers access basic access to your space without having to sync all content to your device (as Sync mode does), but likely not immediately. For me having an offline-capable mode is a must have feature, and supporting two modes is architecturally tricky. SilverBullet v2 will now be “Local First” and basically Local only. The server will just function as content delivery layer. I know some people have found issues with sync, this would be a reason to prioritize fixing those. That said, I have been using Sync mode on all my devices for essentially years with rare issues.
  • Query language: this will be superseded by Space Lua/Lua Integrated Query
  • Template/Expression language: this will be superseded by Lua expressions
  • Command links: this will be superseded by a button Lua widget
  • Space Script: this will be superseded by Space Lua
  • Schemas: this was an early day feature that I think was not widely adopted, I may add something like this in a more “Lua way”
  • Space Config/Settings: this will also be superseded by a simple Lua API

Code wise this has lead to being able to delete 12k lines already :exploding_head:

Soon I’ll likely do a final “v1” (0.x) release, and then merge the current v2 branch into main, and that will be that. The releases that follow will be on the v2 code base. I don’t want to keep the v2 branch separate too long, because already I need to constantly port fixes between branches, which adds to that whole “keeping the whole thing manageable” thing.

If you want to be brave, you can try out v2 today: https://v2.silverbullet.md Website content very much in progress. The install instructions there are updated to pull the v2 docker images: Install/Docker

As to stability: I’m using v2 as my main SilverBullet instance myself, currently with all custom plugs removed and it’s been good. But no guarantees.

More updates as things develop.

14 Likes

I’m hyped for the first official v2 release. :slight_smile: My workflow sticks to pretty much standard SilverBullet stuff, so I don’t expect many issues migrating.

I’ve heard about schema’s before and it sounds like an amazing feature to make sure multiple pages can always be queried (i.e., you can’t forget a property or misname it). But in practice I haven’t used it yet. The techie inside me hopes it will make it to v2 (eventually) though!

1 Like

Is :v2 a temporary tag or is it just Edge for v2?

It’s edge for v2. Once the first proper release will happen, I think I’ll switch :latest over to it too.

3 Likes

the perfect excuse to start learning Lua

2 Likes

One reason I liked only is I could guarantee performance on the server I am hosting it on. I am not sure how well will the workers (indexing, minor computations, latex compilation etc) work on my phone, I never tried sync mode there. I am also concerned about sync conflicts.

I respect it, especially given the personal project nature of SilverBullet, but unfortunately I think losing Online mode puts me into Org-Mode which I had just started playing with on the side.

That’s sync only as well, but I had started toying with it for filling gaps in my workflow and trying to start organizing some documents and other media in addition to my notes. Silverbullet was able to be a personal Wiki and also an Apple Notes alternative for me, but need something in Online mode for my contemporaneous notes because I jump between phone and computer a lot.

May still have use for SilverBullet, going to try to find some good reason to keep playing with it, but for now I’m not sure what to do with it.

I was in your mindset but I must admit that once set up properly the sync is very stable and slick and very fast indeed. Online isn’t guaranteed to be perfect either, it’s just another way of syncing content with the filesystem via a browser. There will be the possibility of snafus, but I think that’s a given in this kind of game. I am reassured that this will be the snappiest safest sync possible with a friendly responsive developer. The tradeoffs - the benefits - of going v2 are massive, I think SB will offer a real-life power and portability which no other system I’m aware of has (he says :person_bowing: offering supplication to Carsten Dominik).

4 Likes

Love what Zef has done here for sure - and I’m not uninstalling anything, my Raspberry Pi plugged in near my modem will stay exactly where it is… plenty to love about the project and it may just change how I use it instead of forcing me not to use it.

Using Org on the side was because of things that SilverBullet isn’t designed to handle anyway - and with the flexibility of a browser based text prompt with linking there’s a good chance I just adjust my usage. New application just isn’t determined yet and I won’t know til I start doing it - thinking now maybe it just becomes more journal than notes and might live in my Org directory.

1 Like

I’m new to the whole SilverBullet community but I just wanted to post some positive words. I love the product you’ve built so far and I’m excited to see where you take this project! Lua is an awesome language and I think it’s the perfect choice for a project like this. Thanks for building an awesome piece of software

2 Likes

Hey Ryan,

Welcome to the Silverbullet Community. I too am having a blast using Silverbullet and finding new ways to use it. You’ll find that the people here are friendly and willing to help where they can. So, enjoy and have fun!!

2 Likes

Update

  • I’ve now replaced the main branch with the v2 branch. So v2 now is the main line of development. I’ve created a v1 branch for further 0.x maintenance.
  • I’ve switched over https://silverbullet.md to v2 as well, the old website now lives at https://v1.silverbullet.md
  • Docker images for v2 are still pushed only to :v2 until I’m ready for a “full proper release”. The install instructions website tells you to use :v2 now, though.

What this should not have affected:

  • the :edge Docker images are no longer updated, and frozen where they were ~11 days ago
  • The :latest Docker image is also untouched
  • Both of these will still give you 0.x releases

So no “magic” upgrade should happen for anybody who did not explicitly opt into v2 earlier. However, new people arriving to https://silverbullet.md will now simply onboard to v2.

Non-docker (so “pure Deno”) installations will return. I just need to figure out how to properly do this. Until then, I’ve removed instructions from the website.

The website content, while not complete should now at least reflect SilverBullet v2 and its feature set as it exists today. I’ve removed documentation for features that are gone, or have not yet been been brought back.

8 Likes