I’ve vibe-coded a fully functioning HTTP server for Logseq’s CLI. This was just meant to be a proof of concept after a discussion I had with @danzu, who came up with the idea, but it turned into a two-week project, and I now have it running full time on my computer. The idea is simple: Logeq DB has a command line interface that duplicates many features of the previous API, so why not replace the API with this so that other apps can talk to your database even when the application (or a specific graph) is not running?
This fixes a problem I’ve long had with tools like Logseq Copilot (a browser search plugin that surfaces Logseq search results as you search the web), which is that they would often not work because the API wasn’t running.
It isn’t perfect; the current implementation doesn’t have all the features of the API, like the ability to write to the graph, and the CLI isn’t always showing the latest version of your data (you have to “save” updates with cmd-S if you make changes while it is running). But it works well enough that I was able to make my own fork of Logseq Copilot, which I’m calling Logseq Sidekick that uses the new HTTP CLI server. It is far stripped down from the original plugin, but meets my needs. (And works with Logseq DB.)
More importantly, this is really a proof of concept, intended to encourage other people to build on my work. As I said, this is all vibe-coded with Claude Code, and so I can’t promise it will work or that things won’t break. @danzu did test it, and it worked on his computer after he restarted the browser. But don’t expect much in the way of customer support! Also, you have to be somewhat comfortable in the command line to get everything installed and working. I’m not planning on putting it in the Chrome Extension Marketplace.
On macOS the server has a launch agent and will run in the background. There is a little AppleScript to control it, I might later upgrade this to a menu-bar app if I am motivated to, but don’t hold your breath. On other systems it should theoretically work in the terminal, but I can’t promise anything as I’ve only tested it on macOS.
Anyway, for those who are interested in playing around, here is a link to the server: