Some context:
SilverBullet it is aimed for single-user, private use. I know some of you have public instances (and of course silverbullet.md is one), and some apparently even share access with multiple people, but this is not the primary, intended use case.
Nevertheless, I have a need, and I think many people do, to share content kept in SilverBullet with the outside world. Not all of it, but pieces. At least individual pages.
Some examples:
- Blog posts: I do all my blog and article writing in SilverBullet, I publish my blogs to Ghost.
- Social network posts: mastodon, BlueSky, ā¦
- Random quick notes to show to people (Github gists)
- SilverBullet libraries
- Google Docs (spoiler alert: this will be harder to support)
Without any āinfrastructuralā support from SilverBullet itself, what you can do is simply start in SilverBullet, copy and paste that content into another tool and forget about it. The rich text export helps for tools like Confluence and Google Docs. For some use cases, this may be ok.
But I donāt like this because Iād like to keep the content in SilverBullet as my source of truth. Some of this content Iād like to be able to keep updating over time (and publishing updates to). If I start in SB, then export and edit externally, those changes never make it back.
In v1 I had this concept of Sharing that was based on a āmagicā frontmatter key $share, that based on a URI scheme would figure out what type of sharing youād want to do. This sharing was one way: you update your page, add a $share key, hit Share (Cmd-s at the time) and it would push your content out to whatever targets you had configured (could be multiple).
I scrapped this concept in v2, and replaced it with Export and Import. This design was less restrictive on having to use a $share key in frontmatter, in fact it doesnāt standardize much other than the extension mechanism. It did add the āinwardā direction with Import.
Still, Iāve never been truly happy with this design, so now Iām rethinking it again. This is partially triggered in the context of Library management - #7 by zef because also there thereās a need to pull content in from an external place, and (for library developers) to push content out (to that same place) and to keep these things in sync.
Effectively whatās called for is a way of syncing pieces of content with an external place.
Sadly sync is an overloaded term in SilverBullet, because we already have sync going on between the client and server.
The working title for this feature Iāll go with for now is āRemote Sync.ā If anybody has a better name for it, Iām all ears. There are only two hard problems in computer science as we know.
What this would be
Essentially what Iām looking to introduce is a way to say:
āThis particular SilverBullet page is available out there somewhere (can be a Ghost blog, Mastodon post, Github repo file, Gist, you name it). Iād like to keep the page in SilverBullet as the source of truth, but then be able to easily publish my local updates there and also (potentially) use that remote place as a type of āsync pointā: if there are new versions published there (either by me, or somebody else) I want to have the ability to pull them in.ā
When I trigger this āremote syncā action, if I made no local changes since the last sync, but changes were made remotely, it would just update my local copy based on what it fetched from the remote location. If local changes were made locally but not remotely, just push them out. If both sides were changes, ask me what to do. This is exactly how regular SB sync works, except itās with a remote endpoint.
How this could work
Letās say we go back to the standardized frontmatter approach, Iād suggest reserving the remote key for this:
---
# Publish this to a Ghost blog
remote.uri: ghost:alt.management:my-post
# Or: publish this to a Github repo
remote.uri: github:zefhemel/silverbullet-libraries/Git.md
# Automatically injected and kept up by the sync mechanism
remote.localHash: 1232321321321
remote.remoteHash: 1232321321321
---
Thereās a separate topic of introducing a generic URI reading/writing infrastructure in SilverBullet (which I also have in development) so that libraries can implement these github: style āprotocolsā to do the right thing (theyād have a read and write and getMeta style operations). But letās just assume that is already in place.
Then, there would be a āRemote: Syncā command that would do the following:
- If thereās already a
remotekey configured, perform a remote sync as described earlier - If not, it would ask for a provider (Ghost, Github, ā¦) to use, which could start a provider specific flow, put the resulting URI in frontmatter, perform an initial sync and update the local and remote hashes). If the remote place already exists, it would push the local version to the remote place.
I could also imagine there could be a āRemote: Sync Allā command that would find all pages with a remote attribute configured, and perform a sync step on each individually.
Infrastructure
As with many SilverBullet features, this would be built in an extensible way. Iād likely only distribute a Github and Gist integrations out of the box. The community can then implement more in Space Lua and distribute them as libraries.
Thoughts?

