SilverBullet CLI
sb brings your SilverBullet spaces to the terminal: run queries and Space Lua against your live space, and script your knowledge from the shell, a cron job or a coding agent.
# Every open task, from every page
sb query 'from t = index.tasks() where not t.done select t.name'
# The five pages that changed last
sb query 'from p = index.pages() order by p.lastModified desc limit 5 select p.name'
# Everything waiting in @pete’s Mention Inbox
sb lua 'identity.mentions("pete")' --json
# Run a Space Lua script against your live space
sb lua --file weekly-review.luaFeatures
- Queries and Space Lua from the terminal.
sb queryruns the same queries you write in your pages, andsb luaruns Space Lua against your live space, with your libraries and data: inline, from a file, or piped in.sb --helpshows what you can query. Edge - Made for scripts and coding agents. Plain text in a terminal, JSON when piped, and a distinct exit code for every kind of failure, so it fits shell scripts and scheduled jobs.
sb helpgives an agent the space’s skills and a map of the space to start from. Edge - Remote pages as files.
sb fslists, reads, writes and edits the files in a space on a SilverBullet Server, without a copy on your machine. Every edit checks the page’s revision first, so you never overwrite a change someone made in the meantime. - Search and screenshots.
sb searchfinds pages by text,sb relatedfinds pages similar in meaning, andsb screenshotcaptures a page as it renders, widgets and queries included. Edge
Install
On macOS, Linux and FreeBSD:
curl -fsSL https://silverbullet.md/install-sb.sh | shOn Windows, in PowerShell:
irm https://silverbullet.md/install-sb.ps1 | iexpowershellOr download sb for your platform from the latest release on GitHub. After that, it upgrades itself with sb upgrade.